Function at 0x410c50
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x140
mov cl, byte [0x446fdc]
push ebx
push ebp
mov ebp, dword [esp + 0x14c]
push esi
push edi
mov eax, dword [ebp + 0x16c]
mov byte [esp + 0x50], cl
mov dword [esp + 0x3c], eax
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
mov ebx, dword [ebp]
xor esi, esi
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebx + 0x70]
mov byte [esp + 0x13], 0
cmp eax, esi
mov dword [esp + 0x14], esi
je 0x410d54
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
push eax
call edi
cmp eax, 0xffffffff
je 0x410cc3
mov edx, dword [ebx + 0x70]
push esi
push edx
push eax
call fcn.0040c8d0
add esp, 0xc
mov dword [esp + 0x14], eax
jmp 0x410d4e
mov ecx, dword [ebx + 0x70]
lea eax, [esp + 0x50]
push 0x100
push eax
push ecx
call fcn.00402ff0
add esp, 0xc
test eax, eax
je 0x410cf9
lea edx, [esp + 0x50]
push edx
call edi
lea ecx, [esp + 0x50]
push esi
push ecx
push eax
call fcn.0040c8d0
add esp, 0xc
mov dword [esp + 0x14], eax
jmp 0x410d4e
mov edi, dword [ebx + 0x70]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jbe 0x410d54
lea edx, [esp + 0x24]
lea eax, [esp + 0x50]
push edx
push esi
push eax
push ebp
mov dword [esp + 0x34], esi
call fcn.00403260
add esp, 0x10
cmp eax, 1
jne 0x410d36
lea ecx, [esp + 0x24]
push ecx
push ebp
call fcn.0040cad0
add esp, 8
mov eax, dword [esp + 0x24]
cmp eax, esi
je 0x410d54
mov edx, dword [eax]
push eax
push ebx
mov dword [esp + 0x1c], edx
call fcn.00403420
add esp, 8
cmp dword [esp + 0x14], esi
jne 0x410d86
mov edx, dword [ebp + 0xa0]
lea eax, [esp + 0x28]
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
mov dword [esp + 0x34], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x410d81
push str.getsockname___failed
jmp 0x410f6b
mov byte [esp + 0x13], 1
push esi
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x410f66
mov eax, dword [ebp + 0xa4]
cmp eax, 0xffffffff
je 0x410dae
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, byte [esp + 0x13]
mov dword [ebp + 0xa4], edi
test al, al
jne 0x410de2
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx]
mov dword [esp + 0x2c], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x30], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x34], edx
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x30], esi
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x2c]
push 0x10
push ecx
push edi
mov word [esp + 0x3a], si
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x410f5f
lea edx, [esp + 0x28]
lea eax, [esp + 0x40]
push edx
push eax
push edi
mov dword [esp + 0x34], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x410e24
push str.getsockname___failed
jmp 0x410f6b
mov ecx, dword [esp + 0x42]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
push 1
push edi
mov esi, eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jge 0x410e48
push str.listen_2__failed_on_socket
jmp 0x410f6b
mov al, byte [esp + 0x13]
push 0x100
test al, al
je 0x410e6b
lea edx, [esp + 0x54]
lea eax, [esp + 0x34]
push edx
push eax
push 2
call fcn.0040b0b0
add esp, 0x10
jmp 0x410e7d
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x54]
push ecx
push edx
call fcn.00403090
add esp, 0xc
lea eax, [esp + 0x1e]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x1e]
push ecx
lea eax, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x60]
push str._hu._hu._hu._hu
push ecx
call fcn.004208fd
add esp, 0x18
cmp eax, 4
jne 0x410f74
mov edx, dword [esp + 0x1e]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x1a]
and esi, 0xffff
and edx, 0xffff
push esi
push edx
mov edx, dword [esp + 0x20]
and eax, 0xffff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
push str.Telling_server_to_connect_to__d._d._d._d:_d_n
push ebx
call fcn.0040dbf0
mov ecx, dword [esp + 0x3a]
mov edx, dword [esp + 0x38]
mov eax, esi
and ecx, 0xffff
and eax, 0xff
and edx, 0xffff
shr esi, 8
push eax
mov eax, dword [esp + 0x3a]
push esi
push ecx
mov ecx, dword [esp + 0x40]
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
push str.PORT__d__d__d__d__d__d
push ebp
call fcn.00412d10
add esp, 0x3c
test eax, eax
jne 0x410f79
mov edx, dword [esp + 0x14]
push edx
call fcn.0040c8a0
mov eax, dword [esp + 0x40]
push 0x19
push ebp
mov dword [eax + 0x48], 2
call fcn.004109e0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret
push str.bind_2__failed_on_socket
jmp 0x410f6b
push str.socket_2__failed___s_
push ebx
call fcn.0040dc60
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret