Function at 0x1000ca70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x54
cmp word [esp + 0x5c], 2
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], ecx
jne 0x1000cca4
push 0
push 1
push 2
call dword [0x10043438]
mov esi, eax
call dword [0x10043240]
push eax
call fcn.1002f424
mov ebx, dword [reloc.WS2_32.dll_inet_addr]
mov ebp, dword [reloc.WS2_32.dll_htons]
mov edi, dword [reloc.WS2_32.dll_bind]
add esp, 4
mov dword [esp + 0x10], 0
mov edi, edi
push str.127.0.0.1
mov word [esp + 0x40], 2
call ebx
mov dword [esp + 0x40], eax
call fcn.1002f431
cdq
mov ecx, 0x7d0
idiv ecx
add edx, 0xbb8
push edx
call ebp
push 0x10
lea edx, [esp + 0x40]
push edx
push esi
mov word [esp + 0x4a], ax
call edi
test eax, eax
je 0x1000cb0b
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, 0x64
mov dword [esp + 0x10], eax
jl 0x1000cac0
xor eax, eax
mov dword [esp + 0x1c], eax
push str.127.0.0.1
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov word [esp + 0x20], 2
call ebx
mov edi, dword [esp + 0x18]
mov bx, word [esp + 0x74]
mov dword [esp + 0x20], eax
xor eax, eax
add edi, 0x106a9c
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov ecx, edi
mov word [esp + 0x1e], bx
mov dword [esp + 0x14], 0x10
call edx
push 0x10
lea eax, [esp + 0x20]
push eax
push esi
call fcn.10003d20
test eax, eax
je 0x1000cb8d
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0x18
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x30]
push edx
push esi
call dword [0x10043490]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x58]
push ecx
push esi
call fcn.10003de0
mov ebp, dword [reloc.WS2_32.dll_setsockopt]
push 4
lea edx, [esp + 0x70]
push edx
push 8
push 0xffff
push esi
mov byte [esp + 0x80], 1
call ebp
push 4
lea eax, [esp + 0x78]
push eax
push 0x80
push 0xffff
push esi
mov word [esp + 0x88], 1
mov word [esp + 0x8a], 2
call ebp
mov ax, word [esp + 0x68]
mov edx, dword [esp + 0x70]
mov word [esp + 0x4e], ax
movzx eax, word [esp + 0x2e]
mov word [esp + 0x50], ax
mov al, byte [esp + 0x78]
mov byte [esp + 0x3c], al
mov al, byte [esp + 0x7c]
mov byte [esp + 0x3d], al
movzx eax, word [esp + 0x56]
mov word [esp + 0x4c], bx
mov ebx, dword [esp + 0x3c]
mov word [esp + 0x52], ax
sub esp, 0x18
mov eax, esp
mov dword [eax], ebx
mov ebx, dword [esp + 0x30]
xor ecx, ecx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x64]
mov dword [eax + 8], esi
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x68]
mov dword [eax + 0x10], ecx
mov ecx, ebx
mov dword [eax + 0x14], edx
call fcn.1000c880
mov eax, dword [edi]
mov edx, dword [eax + 8]
mov ecx, edi
call edx
push 0x64
call dword [0x10043200]
call dword [0x10043434]
mov edi, eax
push edi
push esi
mov ecx, ebx
call fcn.1000c2c0
test eax, eax
jge 0x1000cc9b
push edi
call dword [0x10043440]
push esi
call fcn.10003db0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0x18
push 0x21
push edi
push esi
call fcn.10003e40
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret 0x18