Function at 0x409350
Capabilities:
Create thread

Disassembly:
mov eax, 0x16f0
call fcn.0043a490
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov dword [esp + 0x14], ebx
call fcn.0040a380
cmp dword [ebx + 0x370], 1
jne 0x40942e
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x3ec]
test eax, eax
je 0x4096f8
mov ecx, dword [ebx + 0x3f0]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x14]
cmp eax, edx
jae 0x4096f8
mov eax, dword [ebx + 4]
test eax, eax
je 0x409419
mov ecx, dword [ebx + 0x3ec]
mov edx, dword [esp + 0x10]
mov esi, dword [0x44526c]
mov eax, dword [ecx + edx + 0xc]
lea edi, [ecx + edx]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x4c]
mov ebp, dword [edi + 0x18]
cmp eax, 1
je 0x409419
push ebp
mov ecx, esi
call fcn.004099a0
push eax
mov ecx, esi
call fcn.00409790
test eax, eax
je 0x409419
mov dword [esi + 0x4c], 1
mov edx, dword [edi]
lea ecx, [esi + 0x2a]
push ebp
mov dword [ecx], edx
mov ax, word [edi + 4]
mov word [ecx + 4], ax
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.00409710
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
inc ecx
add eax, 0x1c
mov dword [esp + 0x14], ecx
jmp 0x40937c
mov dword [esp + 0x20], 0
xor edi, edi
mov eax, dword [ebx + 0x3fc]
mov dword [esp + 0x18], edi
test eax, eax
je 0x4096f8
mov ecx, dword [ebx + 0x400]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x20]
cmp eax, edx
jae 0x4096f8
mov dword [esp + 0x1c], 0
mov eax, dword [ebx + 0x328]
test eax, eax
je 0x4096e7
mov ecx, dword [ebx + 0x32c]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
mov eax, dword [esp + 0x1c]
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp eax, edx
jae 0x4096e7
mov eax, dword [ebx + 4]
test eax, eax
je 0x4096c8
mov esi, dword [0x44526c]
test esi, esi
je 0x4096c8
mov edx, dword [ebx + 0x328]
mov ecx, dword [ebx + 0x3fc]
mov eax, dword [edx + edi + 8]
lea ebp, [edx + edi]
mov edx, dword [ecx + edi + 8]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x24], edx
cmp eax, 1
je 0x4096c8
mov eax, dword [esi + 0x18]
lea ecx, [esp + 0x258]
push eax
call fcn.00432670
test eax, eax
je 0x4095a0
mov eax, dword [esp + 0x258]
mov dword [esp + 0x10], 0
test eax, eax
jle 0x4095a0
lea ebx, [esp + 0x284]
mov edx, dword [ebx]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
xor ecx, ecx
push edx
mov dword [esp + 0x30], ecx
push 0x4443b4
mov dword [esp + 0x38], ecx
lea eax, [esp + 0x60]
mov dword [esp + 0x3c], ecx
push 0x100
push eax
mov dword [esp + 0x48], ecx
call fcn.00421960
add esp, 0x10
lea eax, [esi + 0x24]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x58]
push eax
push ecx
push edx
mov ecx, esi
call fcn.004083f0
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, dword [esp + 0x24]
je 0x4096da
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x258]
inc eax
add ebx, 4
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x409522
mov ebx, dword [esp + 0x14]
xor edi, edi
mov ecx, dword [esi + 0x18]
push ecx
lea ecx, [esp + 0xcb0]
call fcn.00432670
test eax, eax
je 0x4096c8
test edi, edi
jl 0x4096c8
mov edx, dword [esp + 0xcac]
dec edx
cmp edi, edx
jg 0x4096c8
mov eax, dword [esp + edi*4 + 0xcd8]
lea ebx, [esp + edi*4 + 0xcd8]
push 0
push eax
lea ecx, [esi + 0x1c]
call fcn.00432740
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x158]
rep stosd dword es:[edi], eax
lea edi, [esi + 0x36]
xor ecx, ecx
mov edx, edi
mov eax, dword [ebx]
push eax
push 0x4443b4
mov dword [edx], ecx
push 0x100
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
lea ecx, [esp + 0x164]
push ecx
call fcn.00421960
add esp, 0x10
lea ebx, [esi + 0x24]
lea edx, [esp + 0x158]
mov ecx, esi
push ebx
push edi
push edx
call fcn.004083f0
mov ecx, ebp
mov dword [esi + 0x4c], 1
lea eax, [esi + 0x2a]
lea edi, [esp + 0x3c]
mov edx, dword [ecx]
add esi, 0x30
mov dword [eax], edx
mov edx, dword [esp + 0x28]
mov cx, word [ecx + 4]
push 0
mov word [eax + 4], cx
mov ecx, 7
xor eax, eax
push 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebx]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x5a], ecx
mov cx, word [ebp + 4]
mov dword [esp + 0x44], edx
mov dx, word [ebx + 4]
mov word [esp + 0x4c], cx
mov dword [esp + 0x50], eax
mov eax, dword [ebp]
mov word [esp + 0x5e], dx
mov edx, dword [esi]
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x4c], eax
mov ax, word [esi + 4]
push 0x408550
push 0
push 0
mov dword [esp + 0x64], edx
mov word [esp + 0x68], ax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
inc eax
mov dword [esp + 0x1c], eax
jmp 0x409476
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
jmp 0x4095a2
mov ecx, dword [esp + 0x20]
inc ecx
add edi, 0xc
mov dword [esp + 0x20], ecx
jmp 0x409438
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x16f0
ret