.text:100031F0 push ebp
.text:100031F1 mov ebp, esp
.text:100031F3 sub esp, 8
.text:100031F6 push esi
.text:100031F7 push edi
.text:100031F8 push 4
.text:100031FA call ds:__imp_??2@YAPAXI@Z ; operator new(uint)
.text:10003200 mov ecx, [ebp+lpAddress]
.text:10003203 mov esi, ds:VirtualProtect
.text:10003209 add esp, 4
.text:1000320C lea eax, [ebp+flOldProtect]
.text:1000320F push eax ; lpflOldProtect
.text:10003210 push 40h ; flNewProtect
.text:10003212 push 1 ; dwSize
.text:10003214 xor edi, edi
.text:10003216 push ecx ; lpAddress
.text:10003217 mov [ebp+flOldProtect], edi
.text:1000321A mov [ebp+flNewProtect], edi
.text:1000321D call esi ; VirtualProtect
.text:1000321F lea edx, [ebp+flNewProtect]
.text:10003222 push edx ; lpflOldProtect
.text:10003223 push 40h ; flNewProtect
.text:10003225 push 1 ; dwSize
.text:10003227 push 44402Bh ; lpAddress
.text:1000322C call esi ; VirtualProtect
.text:1000322E mov eax, [ebp+lpAddress]
.text:10003231 lea ecx, [ebp+flNewProtect]
.text:10003234 push ecx ; lpflOldProtect
.text:10003235 mov ds:44402Bh, eax
.text:1000323A mov edx, [ebp+flNewProtect]
.text:1000323D push edx ; flNewProtect
.text:1000323E push 1 ; dwSize
.text:10003240 push 44402Bh ; lpAddress
.text:10003245 call esi ; VirtualProtect
.text:10003247 mov ecx, [ebp+flOldProtect]
.text:1000324A mov edx, [ebp+lpAddress]
.text:1000324D lea eax, [ebp+flOldProtect]
.text:10003250 push eax ; lpflOldProtect
.text:10003251 push ecx ; flNewProtect
.text:10003252 push 1 ; dwSize
.text:10003254 push edx ; lpAddress
.text:10003255 call esi ; VirtualProtect
.text:10003257 mov ecx, [ebp+arg_4]
.text:1000325A lea eax, [ebp+flOldProtect]
.text:1000325D push eax ; lpflOldProtect
.text:1000325E push 40h ; flNewProtect
.text:10003260 push 1 ; dwSize
.text:10003262 push ecx ; lpAddress
.text:10003263 mov [ebp+flOldProtect], edi
.text:10003266 mov [ebp+lpAddress], edi
.text:10003269 call esi ; VirtualProtect
.text:1000326B lea edx, [ebp+lpAddress]
.text:1000326E push edx ; lpflOldProtect
.text:1000326F push 40h ; flNewProtect
.text:10003271 push 1 ; dwSize
.text:10003273 push 4440A6h ; lpAddress
.text:10003278 call esi ; VirtualProtect
.text:1000327A mov eax, [ebp+arg_4]
.text:1000327D lea ecx, [ebp+lpAddress]
.text:10003280 push ecx ; lpflOldProtect
.text:10003281 mov ds:4440A6h, eax
.text:10003286 mov edx, [ebp+lpAddress]
.text:10003289 push edx ; flNewProtect
.text:1000328A push 1 ; dwSize
.text:1000328C push 4440A6h ; lpAddress
.text:10003291 call esi ; VirtualProtect
.text:10003293 mov ecx, [ebp+flOldProtect]
.text:10003296 mov edx, [ebp+arg_4]
.text:10003299 lea eax, [ebp+flOldProtect]
.text:1000329C push eax ; lpflOldProtect
.text:1000329D push ecx ; flNewProtect
.text:1000329E push 1 ; dwSize
.text:100032A0 push edx ; lpAddress
.text:100032A1 call esi ; VirtualProtect
.text:100032A3 mov ecx, [ebp+arg_8]
.text:100032A6 lea eax, [ebp+arg_4]
.text:100032A9 push eax ; lpflOldProtect
.text:100032AA push 40h ; flNewProtect
.text:100032AC push 1 ; dwSize
.text:100032AE push ecx ; lpAddress
.text:100032AF mov [ebp+arg_4], edi
.text:100032B2 mov [ebp+lpAddress], edi
.text:100032B5 call esi ; VirtualProtect
.text:100032B7 lea edx, [ebp+lpAddress]
.text:100032BA push edx ; lpflOldProtect
.text:100032BB push 40h ; flNewProtect
.text:100032BD push 1 ; dwSize
.text:100032BF push 4440ADh ; lpAddress
.text:100032C4 call esi ; VirtualProtect
.text:100032C6 mov eax, [ebp+arg_8]
.text:100032C9 lea ecx, [ebp+lpAddress]
.text:100032CC push ecx ; lpflOldProtect
.text:100032CD mov ds:4440ADh, eax
.text:100032D2 mov edx, [ebp+lpAddress]
.text:100032D5 push edx ; flNewProtect
.text:100032D6 push 1 ; dwSize
.text:100032D8 push 4440ADh ; lpAddress
.text:100032DD call esi ; VirtualProtect
.text:100032DF mov ecx, [ebp+arg_4]
.text:100032E2 mov edx, [ebp+arg_8]
.text:100032E5 lea eax, [ebp+arg_4]
.text:100032E8 push eax ; lpflOldProtect
.text:100032E9 push ecx ; flNewProtect
.text:100032EA push 1 ; dwSize
.text:100032EC push edx ; lpAddress
.text:100032ED call esi ; VirtualProtect
.text:100032EF lea eax, [ebp+arg_4]
.text:100032F2 push eax ; lpflOldProtect
.text:100032F3 push 40h ; flNewProtect
.text:100032F5 push 1 ; dwSize
.text:100032F7 push ebx ; lpAddress
.text:100032F8 mov [ebp+arg_4], edi
.text:100032FB mov [ebp+lpAddress], edi
.text:100032FE call esi ; VirtualProtect
.text:10003300 lea ecx, [ebp+lpAddress]
.text:10003303 push ecx ; lpflOldProtect
.text:10003304 push 40h ; flNewProtect
.text:10003306 push 1 ; dwSize
.text:10003308 push 4440BAh ; lpAddress
.text:1000330D call esi ; VirtualProtect
.text:1000330F lea edx, [ebp+lpAddress]
.text:10003312 push edx ; lpflOldProtect
.text:10003313 mov ds:4440BAh, ebx
.text:10003319 mov eax, [ebp+lpAddress]
.text:1000331C push eax ; flNewProtect
.text:1000331D push 1 ; dwSize
.text:1000331F push 4440BAh ; lpAddress
.text:10003324 call esi ; VirtualProtect
.text:10003326 mov edx, [ebp+arg_4]
.text:10003329 lea ecx, [ebp+arg_4]
.text:1000332C push ecx ; lpflOldProtect
.text:1000332D push edx ; flNewProtect
.text:1000332E push 1 ; dwSize
.text:10003330 push ebx ; lpAddress
.text:10003331 call esi ; VirtualProtect
.text:10003333 lea eax, [ebp+arg_4]
.text:10003336 push eax ; lpflOldProtect
.text:10003337 push 40h ; flNewProtect
.text:10003339 push 1 ; dwSize
.text:1000333B push 14h ; lpAddress
.text:1000333D mov [ebp+arg_4], edi
.text:10003340 mov [ebp+lpAddress], edi
.text:10003343 call esi ; VirtualProtect
.text:10003345 lea ecx, [ebp+lpAddress]
.text:10003348 push ecx ; lpflOldProtect
.text:10003349 push 40h ; flNewProtect
.text:1000334B push 1 ; dwSize
.text:1000334D push 444129h ; lpAddress
.text:10003352 call esi ; VirtualProtect
.text:10003354 lea edx, [ebp+lpAddress]
.text:10003357 push edx ; lpflOldProtect
.text:10003358 mov dword ptr ds:444129h, 14h
.text:10003362 mov eax, [ebp+lpAddress]
.text:10003365 push eax ; flNewProtect
.text:10003366 push 1 ; dwSize
.text:10003368 push 444129h ; lpAddress
.text:1000336D call esi ; VirtualProtect
.text:1000336F mov edx, [ebp+arg_4]
.text:10003372 lea ecx, [ebp+arg_4]
.text:10003375 push ecx ; lpflOldProtect
.text:10003376 push edx ; flNewProtect
.text:10003377 push 1 ; dwSize
.text:10003379 push 14h ; lpAddress
.text:1000337B call esi ; VirtualProtect
.text:1000337D mov eax, [ebp+arg_C]
.text:10003380 cmp eax, edi
.text:10003382 jle short loc_10003395
.text:10003384 mov esi, eax