Function at 0x408380
Capabilities:
Create thread

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
mov ebx, 0x10000000
push edi
test dword [esi + 0xec], ebx
je 0x4083a0
mov dword [esp + 0x10], 0x20000
jmp 0x4083af
mov eax, dword [esi + 0xf0]
add eax, 0x1000
mov dword [esp + 0x10], eax
lea edx, [esi + 0x360]
mov ecx, 0x22
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
test byte [esi + 0xec], 8
je 0x4083cf
mov dword [edx], 1
xor edi, edi
mov dword [esi + 0x4d8], 1
mov dword [esi + 0x4e0], edi
push 2
lea ecx, [esi + 0x460]
mov dword [esi + 0x3f8], edi
mov dword [esi + 0x4d0], edi
mov dword [esi + 0x3fc], edi
mov dword [esi + 0x40c], edi
mov dword [esi + 0x4dc], edi
mov dword [esi + 0x4e4], edi
mov dword [esi + 0x4e8], edi
call fcn.00419ba0
lea ecx, [esi + 0x4b8]
call fcn.00417bf0
lea ecx, [esi + 0x4c0]
call fcn.00417bf0
push 0x400000
push 0x10000
lea ecx, [esi + 0x224]
call fcn.00419dd0
test dword [esi + 0xec], ebx
je 0x408460
push 0x8000000
push 0x100000
lea ecx, [esi + 0x234]
call fcn.00419dd0
cmp dword [esi + 0xe0], 3
jne 0x4084f1
mov eax, dword [esi + 0xec]
test ah, 0x18
je 0x4084b7
test ebx, eax
jne 0x4084b7
mov eax, dword [esp + 0x10]
push edi
push eax
lea ecx, [esi + 0x194]
call fcn.00419dd0
test eax, eax
jne 0x4084b0
push edi
push edi
push 0x40454c
mov ecx, esi
call fcn.0040da40
mov ecx, esi
call fcn.0040d580
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov ecx, esi
call fcn.0040b8c0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [esp + 0x14]
mov dword [esi + 0x3e8], eax
push ecx
push edi
push esi
push 0x40b2d0
push edi
push edi
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
cmp eax, edi
mov dword [esi + 0x454], eax
je 0x40849f
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
mov edx, dword [esi + 0xf4]
lea eax, [edx*4 + 0xfa0]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esi + 0xfc]
add esp, 4
mov dword [esi + 0x4ec], edi
lea edi, [esi + 0x1a4]
push ecx
push 0x40000
mov ecx, edi
mov dword [esi + 0x4e8], eax
call fcn.00419dd0
mov edx, dword [esi + 0x100]
lea ebx, [esi + 0x1b4]
push edx
push 0x40000
mov ecx, ebx
call fcn.00419dd0
mov eax, dword [esi + 0xfc]
lea ebp, [esi + 0x1c4]
push eax
push 0x40000
mov ecx, ebp
call fcn.00419dd0
mov eax, dword [esi + 0xfc]
lea ecx, [esi + 0x1d4]
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, 0xfff
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
shl eax, 0xc
push eax
push 0x10000
call fcn.00419dd0
test byte [esi + 0xec], 0x20
je 0x4085b0
push 0x10000
push 0x2000
lea ecx, [esi + 0x1e4]
call fcn.00419dd0
push 0x200000
push 0x10000
lea ecx, [esi + 0x1f4]
call fcn.00419dd0
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esi + 0x194]
push edx
call fcn.00419dd0
test eax, eax
jne 0x4085f5
test dword [esi + 0xec], 0x10000000
jne 0x4085f5
push 0
push 0
push 0x404534
jmp 0x408498
mov eax, dword [esi + 0x194]
mov dword [esi + 0x4cc], eax
mov dword [esi + 0x4c8], eax
mov eax, dword [0x41b4bc]
test eax, eax
je 0x408665
mov eax, dword [esi + 0xe8]
test eax, eax
je 0x408665
mov eax, dword [esi + 0x198]
lea ecx, [eax + 0x600000]
add eax, 0x600000
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetProcessWorkingSetSize]
lea ecx, [esi + 0x194]
call fcn.00419e20
mov ecx, edi
call fcn.00419e20
mov ecx, ebx
call fcn.00419e20
mov ecx, ebp
call fcn.00419e20
lea ecx, [esi + 0x1d4]
call fcn.00419e20
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.MSVCRT.dll__beginthreadex]
lea edx, [esp + 0x14]
push edx
push 0
push esi
push 0x4086d0
push 0
push 0
mov dword [esi + 0x3e8], eax
call edi
add esp, 0x18
mov dword [esi + 0x454], eax
test eax, eax
je 0x40849f
lea eax, [esp + 0x14]
push eax
push 0
push esi
push 0x40be20
push 0
push 0
call edi
add esp, 0x18
mov dword [esi + 0x458], eax
test eax, eax
je 0x40849f
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret