Function at 0x491627
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x565033
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5b31c8]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov edi, ecx
cmp byte [edi + 0x2e8], 0
je 0x4919af
xor ebx, ebx
cmp dword [edi + 0x2ec], 4
je 0x491788
mov dword [edi + 0x2ec], 4
cmp dword [edi + 0x524], ebx
je 0x4916e2
push dword [edi + 0x204]
push dword [edi + 0x200]
call fcn.00493510
lea esi, [edi + 0x500]
mov ecx, esi
call fcn.00529310
mov ecx, dword [edi + 0x588]
mov eax, dword [edi + 0x200]
mov dword [edi + 0x418], eax
mov eax, dword [edi + 0x204]
mov dword [edi + 0x460], ebx
mov dword [edi + 0x464], ebx
mov dword [edi + 0x41c], eax
mov eax, dword [ecx + 4]
mov dword [ecx + 8], eax
or dword [ecx + 0x18], 0xffffffff
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], ebx
mov ecx, esi
call fcn.00529320
mov ecx, edi
call fcn.0049020f
mov ecx, dword [edi + 0x51c]
push edi
call fcn.0047b081
push 8
mov byte [edi + 0x52c], bl
call dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
pop ecx
test eax, eax
je 0x49170f
mov dword [eax], edi
mov dword [eax + 4], ebx
jmp 0x491711
mov eax, ebx
push ebx
push ebx
mov dword [edi + 0x528], eax
mov esi, dword [edi + 0x528]
push esi
push 0x49caa7
push ebx
push ebx
call dword [sym.imp.MSVCR120.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x491739
mov dword [esi + 4], eax
jmp 0x49177b
mov eax, dword [edi + 0x528]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10], ebx
je 0x49175b
push ecx
mov ecx, dword [esp + 0x14]
call fcn.004919c2
push 0x582800
mov dword [edi + 0x528], ebx
push edi
mov byte [edi + 0x52c], bl
call fcn.0048ff45
pop ecx
pop ecx
mov ecx, edi
call fcn.004938b7
cmp dword [edi + 0x2ec], 4
jne 0x4919af
cmp dword [edi + 0x528], ebx
jne 0x4919af
cmp dword [edi + 0x524], ebx
je 0x4917b1
mov ecx, dword [edi + 0x524]
mov dword [edi + 0x524], ebx
test ecx, ecx
je 0x4917b1
call fcn.00496680
mov ecx, edi
call fcn.004949cd
cmp byte [edi + 0x52c], bl
je 0x4918cc
mov dword [edi + 0x2f0], ebx
xor eax, eax
xor ebx, ebx
mov dword [edi + 0x2ec], 6
inc ebx
mov byte [edi + 0x339], al
mov byte [edi + 0x338], bl
cmp dword [edi + 0x558], eax
je 0x49189a
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], eax
lea esi, [edi + 0x53c]
lea eax, [esp + 0x18]
mov ecx, esi
push eax
call fcn.0049d122
mov ecx, esi
call fcn.0047cb2e
mov dword [edi + 0x538], 0x32
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test eax, eax
cmove eax, ebx
mov dword [edi + 0x534], eax
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x18]
and dword [edi + 0x57c], 0
sar eax, 4
test eax, eax
je 0x49188a
sub esp, 0xc
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.0043019c
sub esp, 0x18
mov byte [esp + 0x54], bl
lea eax, [edi + 0x218]
mov ecx, esp
push eax
lea eax, [edi + 0x208]
push eax
call fcn.0042c3b3
lea ecx, [edi + 0x548]
mov byte [esp + 0x54], 0
call fcn.0049641d
or dword [esp + 0x30], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.00408eb1
xor eax, eax
push eax
mov ecx, edi
call fcn.0049426d
mov ecx, edi
call fcn.00493848
push ecx
mov ecx, edi
call fcn.00494330
push 0x58284c
push edi
call fcn.0048ff45
pop ecx
pop ecx
mov ecx, dword [edi + 0x51c]
push edi
call fcn.0047b081
jmp 0x491942
push ebx
push ebx
mov ecx, edi
mov dword [edi + 0x2f0], 4
call fcn.004942fd
mov ecx, edi
call fcn.004949cd
mov byte [edi + 0x2e8], bl
xor ebx, ebx
inc ebx
cmp dword [edi + 0x370], 0xff
mov byte [edi + 0x586], bl
je 0x491908
and dword [edi + 0x370], 0
dec dword [edi + 0x620]
cmp dword [edi + 0x620], 0
jg 0x49194b
mov ecx, edi
mov dword [edi + 0x2ec], 5
mov byte [edi + 0x338], bl
mov byte [edi + 0x339], 0
call fcn.00493848
push 0x582900
push edi
call fcn.0048ff45
pop ecx
pop ecx
mov ecx, edi
call fcn.00493a96
jmp 0x4919af
push 0x582924
push edi
call fcn.0048ff45
push dword [edi + 0x280]
xor ebx, ebx
mov dword [edi + 0x2ec], 2
push ebx
push dword [edi + 0x278]
call sub.MSVCR120.dll_memset
or dword [edi + 0x288], 0xffffffff
add esp, 0x14
or dword [edi + 0x28c], 0xffffffff
mov dword [edi + 0x418], ebx
mov dword [edi + 0x41c], ebx
mov dword [edi + 0x420], ebx
mov dword [edi + 0x424], ebx
mov dword [edi + 0x144], ebx
mov dword [edi + 0x158], ebx
mov dword [edi + 0x154], ebx
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret