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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9b4
mov eax, dword [0x5b31c8]
xor eax, esp
mov dword [esp + 0x9b0], eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [esp + 0x28], edx
push 0xff
lea eax, [esp + 0xb5]
mov byte [esp + 0xb4], 0
push 0
mov ebx, dword [esi]
push eax
mov dword [esp + 0x18], ebx
call sub.MSVCR120.dll_memset
mov ebx, dword [ebx + 0x364]
xor eax, eax
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
mov edi, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], 1
test ebx, ebx
je 0x511543
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x511432
sub ecx, edx
cmp ecx, 1
jbe 0x511543
mov edx, ebx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x511449
sub edx, ecx
push 0x16
pop ecx
cmp edx, ecx
jb 0x511467
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x51145e
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x5b6c50]
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x511482
push 0x1b
jmp 0x5119de
cmp byte [ebx], 0x3a
jne 0x51148b
mov ecx, ebx
jmp 0x5114c2
push 0x3a
push ebx
call dword [sym.imp.MSVCR120.dll_strchr]
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x5114b4
sub ecx, ebx
push ecx
push ebx
push edi
call dword [sym.imp.MSVCR120.dll_strncpy]
mov ecx, dword [esp + 0x2c]
add esp, 0xc
jmp 0x5114c2
mov edx, edi
sub edx, ebx
mov al, byte [ebx]
mov byte [edx + ebx], al
inc ebx
test al, al
jne 0x5114b8
test ecx, ecx
je 0x511530
push 0x3a
push ecx
call dword [sym.imp.MSVCR120.dll_strchr]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x511530
push 0xa
lea ecx, [ebx + 1]
push 0
push ecx
call dword [sym.imp.MSVCR120.dll_strtoul]
add esp, 0xc
movzx eax, ax
mov dword [esp + 0x24], eax
push 0x2d
push ebx
call dword [sym.imp.MSVCR120.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x511516
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.MSVCR120.dll_strtoul]
movzx ecx, ax
add esp, 0xc
mov eax, dword [esp + 0x24]
jmp 0x51151d
mov eax, dword [esp + 0x24]
movzx ecx, ax
mov dword [esp + 0x1c], ecx
cmp ax, cx
jbe 0x511530
and dword [esp + 0x1c], 0
and dword [esp + 0x24], 0
xor eax, eax
cmp byte [edi], al
cmovne eax, edi
mov dword [esp + 0x14], eax
test eax, eax
jne 0x5115c8
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x80
push eax
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x130]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x51159b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.005188fe
push eax
push str.getsockname___failed:__s
push dword [esp + 0x14]
call fcn.00500d35
add esp, 0xc
test edi, edi
je 0x5119dc
push edi
call dword [0x5b6c48]
pop ecx
jmp 0x5119dc
movzx ecx, word [esp + 0x30]
lea eax, [esp + 0x5b0]
push 0x401
push eax
lea edx, [esp + 0x3c]
call fcn.00518218
and dword [esp + 0x34], 0
lea eax, [esp + 0x5b8]
pop ecx
pop ecx
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x10]
mov edx, eax
push ecx
push 0
mov ecx, esi
call fcn.0050036f
pop ecx
pop ecx
cmp eax, 1
jne 0x5115ea
lea edx, [esp + 0x10]
mov ecx, esi
call fcn.00500a48
mov edx, dword [esp + 0x10]
test edx, edx
je 0x5115ff
mov ecx, dword [esp + 0xc]
mov ebx, dword [edx]
call fcn.005004ce
jmp 0x511601
xor ebx, ebx
test ebx, ebx
jne 0x511613
push dword [esp + 0x14]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
jmp 0x51157a
test edi, edi
je 0x51161f
push edi
call dword [0x5b6c48]
pop ecx
or dword [esp + 0x14], 0xffffffff
xor edi, edi
lea eax, [esp + 0x14]
mov edx, ebx
push eax
push 0
mov ecx, esi
call fcn.0050007f
mov dword [esp + 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x51164f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov edi, eax
test ebx, ebx
jne 0x511626
test ebx, ebx
jne 0x511673
mov edx, edi
mov ecx, esi
call fcn.005188fe
push eax
push str.socket_failure:__s
push dword [esp + 0x14]
call fcn.00500d35
add esp, 0xc
jmp 0x5119dc
push dword [ebx + 0x10]
lea eax, [esp + 0x34]
push dword [ebx + 0x18]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
cmp dx, cx
mov edi, dword [esp + 0x14]
mov dword [esp + 0x18], eax
movzx eax, dx
mov dword [esp + 0x10], eax
ja 0x5119c3
push 2
pop ecx
cmp word [esp + 0x30], cx
jne 0x5116bf
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x32], ax
push dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x5117ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x2c], 0
je 0x511740
mov ecx, 0x2741
cmp eax, ecx
jne 0x511740
mov edx, ecx
mov ecx, esi
call fcn.005188fe
push eax
mov eax, dword [esp + 0x14]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [esp + 0x18]
call fcn.00500cc1
add esp, 0x10
mov dword [esp + 0x18], 0x80
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x130]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x51175d
mov eax, dword [esp + 0x24]
and dword [esp + 0x2c], 0
movzx eax, ax
jmp 0x511751
cmp eax, 0x2740
je 0x51174c
cmp eax, 0xd
jne 0x511783
mov eax, dword [esp + 0x10]
inc eax
mov ecx, dword [esp + 0x1c]
cmp ax, cx
jmp 0x51169f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.005188fe
push eax
push str.getsockname___failed:__s
push dword [esp + 0x14]
call fcn.00500d35
add esp, 0xc
jmp 0x5119d3
mov edx, eax
mov ecx, esi
call fcn.005188fe
push eax
mov eax, dword [esp + 0x14]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push dword [esp + 0x18]
call fcn.00500d35
add esp, 0x10
jmp 0x5119d3
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
cmp ax, cx
ja 0x5119c3
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x80
push eax
lea eax, [esp + 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x51175d
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x511800
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.005188fe
push eax
push str.socket_failure:__s
jmp 0x511772
push 0x100
lea edx, [esp + 0xb4]
mov ecx, ebx
call fcn.0050012a
mov ebx, dword [esp + 0x2c]
pop ecx
push 2
pop edx
cmp ebx, edx
je 0x511871
mov cx, word [esp + 0x30]
cmp dword [esi + 0x1e4], 0
jne 0x511831
test ebx, ebx
je 0x511868
cmp ebx, 1
jne 0x51183b
cmp cx, dx
jne 0x511868
movzx eax, cx
sub eax, edx
jne 0x511868
push dword [esp + 0x32]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x51194e
cmp ebx, 1
je 0x5118b0
mov cx, word [esp + 0x30]
push 2
pop edx
inc ebx
mov dword [esp + 0x28], ebx
cmp ebx, edx
jne 0x511824
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
mov dword [esi + 0x438], edx
mov edx, dword [esi + 0x134]
cmp edx, 0xffffffff
je 0x511891
mov ecx, esi
call fcn.0050004b
mov dword [esi + 0x134], edi
mov dword [esi + 0x1c8], 1
mov dword [esi + 0x444], 0x1c
jmp 0x5119bf
lea edx, [esp + 0x1b0]
lea ebx, [esp + 0xb0]
mov cl, byte [ebx]
test cl, cl
je 0x5118dd
cmp cl, 0x2e
movzx eax, cl
mov dword [esp + 0x20], 0x2c
cmove eax, dword [esp + 0x20]
mov byte [edx], al
inc edx
inc ebx
jne 0x5118be
mov eax, dword [esp + 0x14]
movzx ecx, ax
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.0050af08
add esp, 0x14
lea eax, [esp + 0x1b0]
push eax
push str.PORT
lea eax, [esi + 0x3d0]
push str._s__s
push eax
call fcn.0051b0f3
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x511875
mov ecx, ebx
call fcn.00518240
push eax
push str.Failure_sending_PORT_command:__s
push dword [esp + 0x14]
call fcn.00500d35
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.0050004b
jmp 0x5119b8
movzx eax, ax
push eax
lea eax, [esp + 0xb4]
push eax
push 2
pop ecx
xor eax, eax
cmp word [esp + 0x38], cx
setne al
inc eax
push eax
push str.EPRT
lea eax, [esi + 0x3d0]
push str._s__d_s_hu
push eax
call fcn.0051b0f3
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x511875
mov ecx, ebx
call fcn.00518240
push eax
push str.Failure_sending_EPRT_command:__s
push dword [esp + 0x14]
call fcn.00500d35
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.0050004b
mov dword [esi + 0x438], 1
and dword [esi + 0x444], 0
mov eax, ebx
jmp 0x5119df
push str.bind___failed__we_ran_out_of_ports_
push dword [esp + 0x10]
call fcn.00500d35
pop ecx
pop ecx
mov edx, edi
mov ecx, esi
call fcn.0050004b
push 0x1e
pop eax
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0054e63c
mov esp, ebp
pop ebp
ret