Function at 0x487e4a
Capabilities:
Create thread

Disassembly:
sub esp, 0x534
mov eax, dword [0x6d1d44]
xor eax, esp
mov dword [esp + 0x52c], eax
push ebx
push ebp
push esi
mov esi, ecx
push edi
test esi, esi
je 0x488383
xor edi, edi
cmp dword [esi + 0x524], edi
jne 0x487e7b
call fcn.00487db9
xor ebp, ebp
mov dword [esp + 0x230], edi
inc ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x128], edi
cmp dword [esi], edi
jne 0x488133
cmp dword [esi + 0x51c], edi
jne 0x487eb6
push edi
push edi
push esi
push 0x48692d
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x518], eax
cmp dword [esi], edi
jne 0x488133
lea ebx, [esi + 0x2e8]
lea ebp, [esi + 0x4f0]
cmp dword [esi + 0x50c], 2
mov dword [esp + 0x230], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x128], edi
jne 0x487eeb
mov dword [esi + 0x50c], edi
mov ecx, dword [esi + 0x500]
call fcn.0048b185
mov dword [esi + 0x528], 0x5265c00
jmp 0x487f7c
mov ecx, dword [esi + 0x52c]
call fcn.0048b1c4
test eax, eax
je 0x487f8a
cmp dword [eax], edi
je 0x487f51
mov ecx, dword [esi + 0x528]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x130]
push ecx
lea ecx, [esp + 0x23c]
push ecx
push eax
call dword [eax]
mov eax, dword [esp + 0x24]
add esp, 0x14
cmp eax, dword [esi + 0x528]
jge 0x487f51
mov dword [esi + 0x528], eax
mov ecx, dword [esi + 0x52c]
call fcn.0048b160
mov eax, dword [eax + 4]
test eax, eax
jle 0x487f71
cmp eax, dword [esi + 0x528]
jge 0x487f71
mov dword [esi + 0x528], eax
mov ecx, dword [esi + 0x52c]
call fcn.0048b1af
mov dword [esi + 0x52c], eax
test eax, eax
jne 0x487f02
mov eax, dword [esi + 0x528]
mov ecx, 0x3e8
cdq
idiv ecx
mov ecx, dword [esi + 0x504]
mov dword [esp + 0x18], eax
imul eax, edx, 0x3e8
mov dword [esp + 0x1c], eax
call fcn.0048b3fe
test eax, eax
jle 0x48801d
mov ecx, dword [esi + 0x504]
call fcn.0048b185
mov ecx, eax
mov dword [esi + 0x52c], eax
call fcn.0048b1c4
mov ecx, dword [esi + 0x500]
mov edi, eax
mov edx, edi
call fcn.0048b2bf
mov ecx, dword [esi + 0x52c]
call fcn.0048b261
test edi, edi
je 0x48800c
mov eax, dword [edi + 8]
test eax, eax
je 0x487ff6
push edi
call eax
pop ecx
mov ecx, dword [edi + 0x18]
call fcn.00484cd3
or dword [edi + 0x1c], 0xffffffff
push 1
push edi
call fcn.005ed680
pop ecx
pop ecx
mov ecx, dword [esi + 0x504]
call fcn.0048b3fe
test eax, eax
jg 0x487fb5
xor edi, edi
inc dword [esi + 0x510]
lea eax, [esp + 0x20]
push edi
push dword [esi + 0x2e4]
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], edi
push eax
lea eax, [esp + 0x134]
mov dword [ebp], edi
push eax
lea eax, [esp + 0x240]
mov ecx, ebx
push eax
lea eax, [esp + 0x2c]
push ebp
push eax
call fcn.00485a5e
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x24c]
add esp, 0x1c
mov dword [esi + 0x530], eax
mov ecx, esi
push dword [ebp]
push eax
push ebx
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x138]
push eax
call fcn.0048553c
add esp, 0x14
mov ebx, eax
inc dword [esi + 0x514]
cmp ebx, 0xffffffff
jne 0x4880a6
mov dword [esp + 0x230], edi
mov dword [esp + 0x128], edi
mov dword [esp + 0x20], edi
mov ecx, dword [esi + 0x500]
call fcn.0048b185
mov dword [esi + 0x52c], eax
test eax, eax
je 0x488122
mov ecx, dword [esi + 0x52c]
call fcn.0048b1c4
mov edi, eax
test edi, edi
je 0x488120
mov eax, dword [edi + 4]
test eax, eax
je 0x4880ef
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x12c]
push ecx
lea ecx, [esp + 0x238]
push ecx
push ebx
push edi
call eax
add esp, 0x14
mov ecx, dword [esi + 0x52c]
call fcn.0048b160
mov eax, dword [eax]
test eax, eax
je 0x48810b
push dword [esi + 0x52c]
push edi
call eax
pop ecx
pop ecx
mov ecx, dword [esi + 0x52c]
call fcn.0048b1af
mov dword [esi + 0x52c], eax
test eax, eax
jne 0x4880bb
xor edi, edi
lea ebx, [esi + 0x2e8]
cmp dword [esi], edi
je 0x487eca
xor ebp, ebp
inc ebp
cmp dword [esi + 0x518], edi
je 0x488147
push dword [esi + 0x520]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [esi + 0x4fc]
test ecx, ecx
je 0x488193
call fcn.0048b185
jmp 0x48817c
mov ecx, edi
call fcn.0048b1c4
mov ebx, eax
test ebx, ebx
je 0x488175
push dword [ebx + 4]
push esi
call dword [ebx]
push ebp
push ebx
call fcn.005ed680
add esp, 0x10
mov ecx, edi
call fcn.0048b1af
mov edi, eax
test edi, edi
jne 0x488158
mov ecx, dword [esi + 0x4fc]
call fcn.0048b3c9
mov dword [esi + 0x4fc], edi
mov ecx, dword [esi + 0x500]
call fcn.0048b185
mov dword [esi + 0x52c], eax
test eax, eax
je 0x4881b5
mov ecx, eax
call fcn.0048b1af
mov dword [esi + 0x52c], eax
mov dword [esi], ebp
cmp dword [esi + 0x52c], edi
je 0x488207
mov ecx, dword [esi + 0x52c]
call fcn.0048b1c4
mov edi, eax
test edi, edi
je 0x488205
mov eax, dword [edi + 8]
test eax, eax
je 0x4881db
push edi
call eax
pop ecx
mov ecx, dword [edi + 0x18]
call fcn.00484cd3
or dword [edi + 0x1c], 0xffffffff
push ebp
push edi
call fcn.005ed680
pop ecx
pop ecx
mov ecx, dword [esi + 0x52c]
call fcn.0048b261
mov dword [esi + 0x52c], eax
test eax, eax
jne 0x4881bf
xor edi, edi
mov eax, edi
mov dword [esp + 0x10], eax
mov ecx, dword [esi + eax*4 + 0x2e8]
test ecx, ecx
je 0x48822c
cmp dword [esi + eax*4 + 0x3e8], edi
jne 0x48822c
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 0x40
jl 0x48820d
mov ecx, dword [esi + 0x2e4]
call fcn.0048b3c9
mov eax, dword [0x74cbf8]
xor ecx, ecx
cmp eax, esi
cmove eax, ecx
mov ecx, dword [esi + 0x500]
mov dword [0x74cbf8], eax
call fcn.0048b185
mov dword [esi + 0x52c], eax
test eax, eax
je 0x488295
mov ecx, eax
call fcn.0048b1c4
mov edi, eax
test edi, edi
je 0x488295
push edi
call dword [edi + 8]
pop ecx
mov ecx, dword [edi + 0x18]
call fcn.00484cd3
or dword [edi + 0x1c], 0xffffffff
push ebp
push edi
call fcn.005ed680
and dword [esi + 0x4f4], 0
pop ecx
pop ecx
mov ecx, dword [esi + 0x500]
call fcn.0048b3c9
mov ecx, dword [esi + 0x504]
call fcn.0048b185
jmp 0x4882e9
mov ecx, dword [esi + 0x52c]
call fcn.0048b1c4
mov edi, eax
test edi, edi
je 0x4882f3
mov eax, dword [edi + 8]
test eax, eax
je 0x4882c9
push edi
call eax
pop ecx
mov ecx, dword [edi + 0x18]
call fcn.00484cd3
or dword [edi + 0x1c], 0xffffffff
push ebp
push edi
call fcn.005ed680
pop ecx
pop ecx
mov ecx, dword [esi + 0x52c]
call fcn.0048b1af
mov dword [esi + 0x52c], eax
test eax, eax
jne 0x4882ad
mov ecx, dword [esi + 0x504]
call fcn.0048b3c9
mov ecx, dword [esi + 0x508]
test ecx, ecx
je 0x488312
push 0
xor edx, edx
call fcn.0048b588
pop ecx
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp dword [0x74cbe8], ebp
jne 0x488374
push dword [0x74cbf0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x74cbc8], 0
je 0x488374
push 0x1114
push 0x73ef48
push 0x74cbf0
push 0x73ef64
lea eax, [esp + 0x348]
push 0x200
push eax
call fcn.0040117f
push 0
push dword [0x74cbf4]
lea eax, [esp + 0x358]
push eax
call dword [0x74cbc8]
add esp, 0x24
dec dword [0x74cbe8]
push ebp
push esi
call fcn.005ed680
pop ecx
pop ecx
mov ecx, dword [esp + 0x53c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b8900
add esp, 0x534
ret