Function at 0x10035870
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push edi
mov edi, ecx
mov eax, dword [edi]
call dword [eax + 0x15c]
test eax, eax
je 0x10035ac2
lea eax, [edi + 0x164]
push eax
lea ecx, [ebp - 4]
call fcn.1002f6f0
cmp dword [edi + 0x5c], 3
jne 0x10035aa7
mov eax, dword [ebp - 4]
mov ecx, edi
mov dword [edi + 0x5c], 0
mov dword [eax], 0
mov eax, dword [edi]
call dword [eax + 0x160]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], 0
test ecx, ecx
je 0x100358d7
cmp word [ecx], 0
je 0x100358d7
mov edx, 1
jmp 0x100358d9
xor edx, edx
xor eax, eax
mov dword [ebp + 8], edx
push ebx
mov word [ebp - 0x20], ax
test edx, edx
push esi
lea eax, [ebp - 0x20]
push eax
mov eax, str.0.0.0.0
cmovne eax, ecx
push 0
push eax
call fcn.1002f330
add esp, 0xc
test eax, eax
je 0x10035a75
movzx eax, word [ebp - 0x20]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x10035a75
cmp word [ebp - 0x20], 2
mov eax, 0x10
mov ecx, 0x1c
cmove ecx, eax
lea eax, [ebp - 0x20]
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
cmp eax, 0xffffffff
je 0x10035996
push esi
call fcn.1002e630
push esi
mov dword [edi + 0x48], eax
call fcn.1002e6a0
add esp, 8
mov dword [edi + 0x4c], eax
cmp dword [ebp + 8], 0
je 0x1003598d
lea ecx, [edi + 0x64]
lea eax, [ebp - 0x20]
cmp eax, ecx
je 0x1003598d
cmp word [ebp - 0x20], 2
mov edx, 0x10
mov eax, 0x1c
cmove eax, edx
push eax
lea eax, [ebp - 0x20]
push eax
push ecx
call fcn.101c0150
add esp, 0xc
mov dword [ebp - 4], 1
jmp 0x100359a6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov dword [edi + 0x60], 4
call ebx
push 1
push 0xff
push esi
call fcn.1002e980
add esp, 0xc
cmp dword [ebp - 4], 0
je 0x10035a8b
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [edi + 0x58], eax
test eax, eax
jne 0x100359ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [edi + 0x60], 7
call ebx
cmp dword [edi + 0x58], 0
je 0x10035a8b
xor esi, esi
cmp dword [edi + 0x18], esi
jbe 0x10035a42
push 0
push 0
push edi
push 0x10036030
push 0
push 0
call fcn.101cbd22
add esp, 0x18
mov dword [ebp + 8], eax
test eax, eax
je 0x10035a66
mov ecx, dword [edi + 0x84]
cmp ecx, dword [edi + 0x88]
je 0x10035a2c
mov dword [ecx], eax
add dword [edi + 0x84], 4
jmp 0x10035a3c
lea eax, [ebp + 8]
push eax
push ecx
lea ecx, [edi + 0x80]
call fcn.1002dcd0
inc esi
cmp esi, dword [edi + 0x18]
jb 0x100359f6
mov eax, dword [ebp + 0xc]
push dword [edi + 0x44]
mov dword [edi + 0x54], eax
mov dword [edi + 0x5c], 1
call dword [sym.imp.KERNEL32.dll_ResetEvent]
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x60], 8
jmp 0x10035a88
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [edi + 0x60], 3
push eax
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
mov esi, eax
call dword [edx]
push esi
call ebx
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 8
push 0x139f
mov dword [edi + 0x60], 1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 4]
mov dword [eax], 0
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 8