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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9b4
mov eax, dword [0x4931e0]
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 0x439907
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4397f6
sub ecx, edx
cmp ecx, 1
jbe 0x439907
mov edx, ebx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x43980d
sub edx, ecx
push 0x16
pop ecx
cmp edx, ecx
jb 0x43982b
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x439822
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x493218]
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x439846
push 0x1b
jmp 0x439da2
cmp byte [ebx], 0x3a
jne 0x43984f
mov ecx, ebx
jmp 0x439886
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 0x439878
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 0x439886
mov edx, edi
sub edx, ebx
mov al, byte [ebx]
mov byte [edx + ebx], al
inc ebx
test al, al
jne 0x43987c
test ecx, ecx
je 0x4398f4
push 0x3a
push ecx
call dword [sym.imp.MSVCR120.dll_strchr]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x4398f4
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 0x4398da
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 0x4398e1
mov eax, dword [esp + 0x24]
movzx ecx, ax
mov dword [esp + 0x1c], ecx
cmp ax, cx
jbe 0x4398f4
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 0x43998c
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 0x43995f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.00440317
push eax
push str.getsockname___failed:__s
push dword [esp + 0x14]
call fcn.00428799
add esp, 0xc
test edi, edi
je 0x439da0
push edi
call dword [0x493210]
pop ecx
jmp 0x439da0
movzx ecx, word [esp + 0x30]
lea eax, [esp + 0x5b0]
push 0x401
push eax
lea edx, [esp + 0x3c]
call fcn.0043fc31
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.00427e28
pop ecx
pop ecx
cmp eax, 1
jne 0x4399ae
lea edx, [esp + 0x10]
mov ecx, esi
call fcn.004284ac
mov edx, dword [esp + 0x10]
test edx, edx
je 0x4399c3
mov ecx, dword [esp + 0xc]
mov ebx, dword [edx]
call fcn.00427f87
jmp 0x4399c5
xor ebx, ebx
test ebx, ebx
jne 0x4399d7
push dword [esp + 0x14]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
jmp 0x43993e
test edi, edi
je 0x4399e3
push edi
call dword [0x493210]
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.00427afc
mov dword [esp + 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x439a13
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov edi, eax
test ebx, ebx
jne 0x4399ea
test ebx, ebx
jne 0x439a37
mov edx, edi
mov ecx, esi
call fcn.00440317
push eax
push str.socket_failure:__s
push dword [esp + 0x14]
call fcn.00428799
add esp, 0xc
jmp 0x439da0
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 0x439d87
push 2
pop ecx
cmp word [esp + 0x30], cx
jne 0x439a83
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 0x439b6f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x2c], 0
je 0x439b04
mov ecx, 0x2741
cmp eax, ecx
jne 0x439b04
mov edx, ecx
mov ecx, esi
call fcn.00440317
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.00428725
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 0x439b21
mov eax, dword [esp + 0x24]
and dword [esp + 0x2c], 0
movzx eax, ax
jmp 0x439b15
cmp eax, 0x2740
je 0x439b10
cmp eax, 0xd
jne 0x439b47
mov eax, dword [esp + 0x10]
inc eax
mov ecx, dword [esp + 0x1c]
cmp ax, cx
jmp 0x439a63
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.00440317
push eax
push str.getsockname___failed:__s
push dword [esp + 0x14]
call fcn.00428799
add esp, 0xc
jmp 0x439d97
mov edx, eax
mov ecx, esi
call fcn.00440317
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.00428799
add esp, 0x10
jmp 0x439d97
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
cmp ax, cx
ja 0x439d87
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 0x439b21
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x439bc4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.00440317
push eax
push str.socket_failure:__s
jmp 0x439b36
push 0x100
lea edx, [esp + 0xb4]
mov ecx, ebx
call fcn.00427be3
mov ebx, dword [esp + 0x2c]
pop ecx
push 2
pop edx
cmp ebx, edx
je 0x439c35
mov cx, word [esp + 0x30]
cmp dword [esi + 0x208], 0
jne 0x439bf5
test ebx, ebx
je 0x439c2c
cmp ebx, 1
jne 0x439bff
cmp cx, dx
jne 0x439c2c
movzx eax, cx
sub eax, edx
jne 0x439c2c
push dword [esp + 0x32]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x439d12
cmp ebx, 1
je 0x439c74
mov cx, word [esp + 0x30]
push 2
pop edx
inc ebx
mov dword [esp + 0x28], ebx
cmp ebx, edx
jne 0x439be8
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
mov dword [esi + 0x460], edx
mov edx, dword [esi + 0x134]
cmp edx, 0xffffffff
je 0x439c55
mov ecx, esi
call fcn.00427ac8
mov dword [esi + 0x134], edi
mov dword [esi + 0x1ec], 1
mov dword [esi + 0x46c], 0x1c
jmp 0x439d83
lea edx, [esp + 0x1b0]
lea ebx, [esp + 0xb0]
mov cl, byte [ebx]
test cl, cl
je 0x439ca1
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 0x439c82
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.00422167
add esp, 0x14
lea eax, [esp + 0x1b0]
push eax
push str.PORT
lea eax, [esi + 0x3f8]
push str._s__s
push eax
call fcn.00444ea0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x439c39
mov ecx, ebx
call fcn.0043fc59
push eax
push str.Failure_sending_PORT_command:__s
push dword [esp + 0x14]
call fcn.00428799
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00427ac8
jmp 0x439d7c
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 + 0x3f8]
push str._s__d_s_hu
push eax
call fcn.00444ea0
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x439c39
mov ecx, ebx
call fcn.0043fc59
push eax
push str.Failure_sending_EPRT_command:__s
push dword [esp + 0x14]
call fcn.00428799
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00427ac8
mov dword [esi + 0x460], 1
and dword [esi + 0x46c], 0
mov eax, ebx
jmp 0x439da3
push str.bind___failed__we_ran_out_of_ports_
push dword [esp + 0x10]
call fcn.00428799
pop ecx
pop ecx
mov edx, edi
mov ecx, esi
call fcn.00427ac8
push 0x1e
pop eax
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0047259d
mov esp, ebp
pop ebp
ret