Function at 0x40e240
Capabilities:
Create thread

Disassembly:
sub esp, 4
push ebx
push esi
push edi
mov esi, ecx
push ebp
mov ebx, 0x20000
test byte [esi + 0xf7], 0x10
jne 0x40e263
mov ebx, dword [esi + 0xf8]
add ebx, 0x1000
lea edx, [esi + 0x388]
xor eax, eax
mov edi, edx
mov ecx, 0x1e
rep stosd dword es:[edi], eax
test byte [esi + 0xf4], 8
je 0x40e283
mov dword [edx], 1
xor ecx, ecx
lea eax, [esi + 0x4a8]
mov dword [esi + 0x408], ecx
mov dword [esi + 0x4a0], ecx
push 2
mov dword [eax], 1
mov dword [eax + 4], ecx
mov dword [esi + 0x4b8], ecx
lea eax, [esi + 0x4b0]
mov dword [esi + 0x40c], ecx
mov dword [esi + 0x41c], ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
lea ecx, [esi + 0x430]
call fcn.00404890
lea ecx, [esi + 0x488]
call fcn.00412160
lea ecx, [esi + 0x490]
call fcn.00412160
push 0x10000
lea ecx, [esi + 0x248]
push 0x8000
call fcn.00404aa0
test byte [esi + 0xf7], 0x10
je 0x40e313
push 0x8000000
lea ecx, [esi + 0x258]
push 0x100000
call fcn.00404aa0
cmp dword [esi + 0xe8], 3
jne 0x40e35d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x400], eax
lea eax, [esp + 0x10]
push eax
push 0
push esi
push 0x40faa0
push 0
push 0
call dword [sym.imp.MSVCRT40.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 0x424], eax
test eax, eax
je 0x40e417
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [esi + 0xfc]
lea ebp, [esi + 0x1f8]
shl eax, 2
push eax
call sub.MSVCRT40.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ecx, ebp
lea edi, [esi + 0x208]
mov dword [esi + 0x4b8], eax
mov dword [esi + 0x4bc], 0
push 0x8000000
push 0x40000
call fcn.00404aa0
push 0x8000000
mov ecx, edi
push 0x40000
call fcn.00404aa0
push 0x8000000
lea ecx, [esi + 0x218]
push 0x40000
call fcn.00404aa0
push 0x2000000
lea ecx, [esi + 0x228]
push 0x10000
call fcn.00404aa0
test byte [esi + 0xf4], 0x20
je 0x40e3f5
push 0x10000
lea ecx, [esi + 0x238]
push 0x2000
call fcn.00404aa0
push 0
lea ecx, [esi + 0x1e8]
push ebx
call fcn.00404aa0
test eax, eax
jne 0x40e428
push 0
mov ecx, esi
push 0
push str.Cant_alloc_main_buf
call fcn.004113c0
mov ecx, esi
call fcn.00410ed0
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [esi + 0x1e8]
mov dword [esi + 0x49c], eax
mov dword [esi + 0x498], eax
cmp dword [0x41666c], 0
je 0x40e495
cmp dword [esi + 0xf0], 0
je 0x40e495
mov eax, dword [esi + 0x1ec]
add eax, 0x600000
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetProcessWorkingSetSize]
lea ecx, [esi + 0x1e8]
call fcn.00404af0
mov ecx, ebp
call fcn.00404af0
mov ecx, edi
call fcn.00404af0
lea ecx, [esi + 0x218]
call fcn.00404af0
lea ecx, [esi + 0x228]
call fcn.00404af0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x400], eax
lea eax, [esp + 0x10]
push eax
mov edi, dword [sym.imp.MSVCRT40.dll__beginthreadex]
push 0
push esi
push 0x40e500
push 0
push 0
call edi
add esp, 0x18
mov dword [esi + 0x424], eax
test eax, eax
je 0x40e417
lea eax, [esp + 0x10]
push eax
push 0
push esi
push 0x40fed0
push 0
push 0
call edi
add esp, 0x18
mov dword [esi + 0x428], eax
test eax, eax
je 0x40e417
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret