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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
mov eax, dword [0x5a0800]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 0x2e
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x634], eax
add eax, 0x230
mov dword [ebp - 0x65c], eax
lea eax, [ebp - 0x33]
push 0
push eax
mov dword [ebp - 0x644], esi
mov dword [ebp - 0x64c], 0xffffffff
mov byte [ebp - 0x34], 0
call fcn.004ea040
mov ecx, dword [esi + 0x50c]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x660], eax
xor ebx, ebx
mov dword [ebp - 0x654], ecx
mov dword [ebp - 0x664], eax
mov dword [ebp - 0x658], eax
mov dword [ebp - 0x640], eax
mov byte [ebp - 0x635], 1
mov dword [ebp - 0x650], eax
test ecx, ecx
je 0x4a7de7
mov edx, ecx
lea eax, [edx + 1]
mov dword [ebp - 0x63c], eax
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x4a7ba0
sub edx, dword [ebp - 0x63c]
cmp edx, 1
jbe 0x4a7de7
mov al, byte [ecx]
cmp al, 0x5b
jne 0x4a7bef
lea ebx, [ecx + 1]
mov esi, ebx
push 0x5d
push esi
call fcn.004edcc0
mov ecx, eax
add esp, 8
xor eax, eax
test ecx, ecx
cmove ebx, eax
mov eax, ecx
mov dword [ebp - 0x650], ebx
sub eax, esi
mov esi, dword [ebp - 0x644]
mov ebx, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
jmp 0x4a7c3b
cmp al, 0x3a
je 0x4a7c4f
push 0x3a
push ecx
call fcn.004edcc0
mov ebx, eax
mov dword [ebp - 0x63c], eax
mov eax, dword [ebp - 0x654]
add esp, 8
mov dword [ebp - 0x650], eax
test ebx, ebx
je 0x4a7cc1
lea ecx, [ebp - 0x628]
sub ebx, eax
push ecx
push eax
push 0x17
call fcn.004b8790
add esp, 0xc
lea ecx, [eax - 1]
neg ecx
sbb ecx, ecx
and ecx, dword [ebp - 0x63c]
xor edx, edx
mov dword [ebp - 0x640], 0
test ecx, ecx
je 0x4a7cdb
push 0x3a
push ecx
call fcn.004edcc0
add esp, 8
mov dword [ebp - 0x654], eax
xor edx, edx
mov dword [ebp - 0x640], 0
test eax, eax
je 0x4a7cdb
push 0xa
push edx
inc eax
push eax
call fcn.00514723
push eax
call fcn.0048b520
push 0x2d
push dword [ebp - 0x654]
movzx eax, ax
mov dword [ebp - 0x640], eax
call fcn.004edcc0
add esp, 0x18
test eax, eax
je 0x4a7cb6
push 0xa
inc eax
push 0
push eax
call fcn.00514723
push eax
call fcn.0048b520
add esp, 0x10
movzx edx, ax
jmp 0x4a7cdb
mov eax, dword [ebp - 0x640]
movzx edx, ax
jmp 0x4a7cdb
mov ebx, eax
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4a7cc6
sub ebx, ecx
mov dword [ebp - 0x640], 0
xor edx, edx
xor ecx, ecx
movzx eax, dx
cmp word [ebp - 0x640], dx
cmovbe ecx, eax
movzx eax, cx
xor ecx, ecx
cmp word [ebp - 0x640], dx
mov dword [ebp - 0x63c], eax
mov eax, dword [ebp - 0x640]
movzx eax, ax
cmovbe ecx, eax
movzx eax, cx
mov dword [ebp - 0x654], eax
test ebx, ebx
je 0x4a7dcf
cmp ebx, 0x32
jae 0x4a8352
push ebx
push dword [ebp - 0x650]
lea eax, [ebp - 0x68]
push eax
call fcn.004e9540
add esp, 0xc
mov byte [ebp + ebx - 0x68], 0
lea eax, [ebp - 0x5b0]
push 0x401
push eax
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x634]
push dword [eax + 0x308]
mov eax, dword [eax + 0x24]
add eax, 0x10
push eax
call fcn.004bfbb0
mov ebx, dword [ebp - 0x634]
add esp, 4
push eax
mov eax, dword [ebx + 0x24]
push dword [eax]
call fcn.004bfba0
add esp, 0x18
sub eax, 0
je 0x4a7d9a
sub eax, 1
je 0x4a8352
sub eax, 1
jne 0x4a7da5
lea eax, [ebp - 0x5b0]
mov dword [ebp - 0x660], eax
jmp 0x4a7da7
lea eax, [ebp - 0x68]
mov dword [ebp - 0x660], eax
jmp 0x4a7da7
xor eax, eax
mov ecx, dword [ebp - 0x654]
movzx edx, cx
mov ecx, dword [ebp - 0x63c]
movzx ecx, cx
mov dword [ebp - 0x658], edx
mov dword [ebp - 0x640], ecx
test eax, eax
jne 0x4a7e99
jmp 0x4a7ded
mov ecx, dword [ebp - 0x63c]
movzx eax, ax
mov dword [ebp - 0x658], eax
movzx eax, cx
mov dword [ebp - 0x640], eax
mov ebx, dword [ebp - 0x634]
lea eax, [ebp - 0x648]
mov dword [ebp - 0x648], 0x80
push eax
lea eax, [ebp - 0x630]
push eax
push dword [ebx + 0x108]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4a7e41
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00473060
push eax
push str.getsockname___failed:__s
push esi
call fcn.00488da0
add esp, 0x18
jmp 0x4a8352
mov ax, word [ebp - 0x630]
cmp ax, 0x17
je 0x4a7e59
lea ecx, [ebp - 0x62c]
movzx eax, ax
jmp 0x4a7e64
lea ecx, [ebp - 0x628]
mov eax, 0x17
push 0x401
lea edx, [ebp - 0x5b0]
movzx eax, ax
push edx
push ecx
push eax
call fcn.004b6da0
add esp, 0x10
test eax, eax
je 0x4a8352
lea eax, [ebp - 0x5b0]
xor dl, dl
mov dword [ebp - 0x660], eax
mov byte [ebp - 0x635], dl
lea ecx, [ebp - 0x664]
push ecx
push 0
push 0
push eax
push esi
call fcn.0048ed30
add esp, 0x14
cmp eax, 1
jne 0x4a7ec3
lea eax, [ebp - 0x664]
push eax
push esi
call fcn.0047f530
add esp, 8
mov eax, dword [ebp - 0x664]
test eax, eax
je 0x4a833d
mov ebx, dword [eax]
push eax
push esi
mov dword [ebp - 0x63c], ebx
call fcn.0048f0d0
add esp, 8
test ebx, ebx
je 0x4a833d
nop dword [eax + eax]
lea eax, [ebp - 0x64c]
push eax
mov eax, dword [ebp - 0x634]
movzx eax, byte [eax + 0x312]
push eax
push 0
push ebx
push esi
call fcn.004b2700
add esp, 0x14
test eax, eax
je 0x4a7f4e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov dword [ebp - 0x63c], ebx
test ebx, ebx
jne 0x4a7ef0
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.00473060
push eax
push str.socket_failure:__s
push esi
call fcn.00488da0
add esp, 0x18
jmp 0x4a8352
push dword [ebx + 0x10]
lea eax, [ebp - 0x630]
push dword [ebx + 0x18]
push eax
call fcn.004e9540
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov ebx, dword [ebp - 0x644]
mov dword [ebp - 0x648], eax
mov eax, dword [ebp - 0x658]
movzx esi, ax
cmp ax, word [ebp - 0x640]
ja 0x4a832d
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [ebp - 0x648]
mov word [ebp - 0x62e], ax
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x64c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4a80af
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov cl, byte [ebp - 0x635]
test cl, cl
je 0x4a803c
cmp eax, 0x2741
jne 0x4a803c
push 0x100
lea eax, [ebp - 0x1ac]
push eax
push 0x2741
call fcn.00473060
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push ebx
call fcn.00488e60
mov esi, dword [ebp - 0x634]
lea eax, [ebp - 0x648]
add esp, 0x1c
mov dword [ebp - 0x648], 0x80
push eax
lea eax, [ebp - 0x630]
push eax
push dword [esi + 0x108]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4a8059
mov eax, dword [ebp - 0x658]
xor dl, dl
movzx esi, ax
mov byte [ebp - 0x635], dl
jmp 0x4a7f88
cmp eax, 0x2740
je 0x4a8048
cmp eax, 0xd
jne 0x4a8085
inc esi
mov byte [ebp - 0x635], cl
movzx eax, si
mov esi, eax
jmp 0x4a7f7b
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00473060
push eax
push str.getsockname___failed:__s
push ebx
call fcn.00488da0
add esp, 0x18
jmp 0x4a835e
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.00473060
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push ebx
call fcn.00488da0
add esp, 0x1c
jmp 0x4a8358
cmp si, word [ebp - 0x640]
ja 0x4a832d
lea eax, [ebp - 0x648]
mov dword [ebp - 0x648], 0x80
push eax
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x64c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4a8110
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00473060
push eax
push str.getsockname___failed:__s
push ebx
call fcn.00488da0
add esp, 0x18
jmp 0x4a8358
push 1
push dword [ebp - 0x64c]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4a814e
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00473060
push eax
push str.socket_failure:__s
push ebx
call fcn.00488da0
add esp, 0x18
jmp 0x4a8358
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x63c]
call fcn.0048ece0
mov eax, dword [ebp - 0x634]
add esp, 0xc
cmp byte [eax + 0x1ba], 0
jne 0x4a8181
cmp byte [eax + 0x1b4], 0
je 0x4a8181
mov byte [eax + 0x1ba], 1
cmp edi, 2
je 0x4a81e9
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x630]
cmp byte [eax + 0x1ba], 0
jne 0x4a81a0
test edi, edi
je 0x4a81e3
cmp edi, 1
jne 0x4a81ab
cmp cx, 2
jne 0x4a81e3
movzx eax, cx
sub eax, 2
je 0x4a81b8
sub eax, 0x15
jne 0x4a81dd
push dword [ebp - 0x62e]
call esi
movzx eax, ax
mov dword [ebp - 0x63c], eax
test edi, edi
je 0x4a82cf
cmp edi, 1
je 0x4a822e
mov cx, word [ebp - 0x630]
mov eax, dword [ebp - 0x634]
inc edi
cmp edi, 2
jne 0x4a8193
mov esi, dword [ebp - 0x65c]
lea eax, [ebp - 0x64c]
mov dword [esi + 0xa0], edi
mov esi, dword [ebp - 0x634]
push eax
push 1
push esi
push ebx
call fcn.004b24d0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4a8363
mov dword [ebp - 0x64c], 0xffffffff
mov byte [ebp - 0x63c], 0x1c
jmp 0x4a836a
lea edx, [ebp - 0xac]
mov ebx, 0x2c
lea esi, [ebp - 0x34]
nop dword [eax]
mov cl, byte [esi]
test cl, cl
je 0x4a8257
cmp cl, 0x2e
movzx eax, cl
cmove eax, ebx
mov byte [edx], al
inc edx
add esi, 1
jne 0x4a8240
mov eax, dword [ebp - 0x63c]
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.004778e0
mov esi, dword [ebp - 0x65c]
lea eax, [ebp - 0xac]
mov ebx, dword [ebp - 0x644]
push eax
push str.PORT
push 0x57c8cc
push esi
push ebx
call fcn.004bea60
add esp, 0x28
mov dword [ebp - 0x650], eax
test eax, eax
je 0x4a81ef
mov edi, eax
push edi
call fcn.004731e0
push eax
push str.Failure_sending_PORT_command:__s
push ebx
call fcn.00488da0
mov esi, dword [ebp - 0x634]
add esp, 0x10
jmp 0x4a8363
mov esi, dword [ebp - 0x65c]
movzx eax, ax
push eax
lea eax, [ebp - 0x34]
push eax
xor eax, eax
cmp word [ebp - 0x630], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push esi
push ebx
call fcn.004bea60
add esp, 0x1c
mov dword [ebp - 0x650], eax
test eax, eax
je 0x4a81ef
mov edi, eax
push edi
call fcn.004731e0
push eax
push str.Failure_sending_EPRT_command:__s
push ebx
call fcn.00488da0
mov esi, dword [ebp - 0x634]
add esp, 0x10
jmp 0x4a8363
push str.bind___failed__we_ran_out_of_ports
push ebx
call fcn.00488da0
add esp, 8
jmp 0x4a8358
mov eax, dword [ebp - 0x660]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push esi
call fcn.00488da0
add esp, 0xc
mov ebx, dword [ebp - 0x644]
mov esi, dword [ebp - 0x634]
mov edi, 0x1e
mov byte [ebp - 0x63c], 0
push dword [ebp - 0x63c]
mov eax, ebx
push eax
call fcn.004a5610
mov eax, dword [ebp - 0x64c]
add esp, 8
cmp eax, 0xffffffff
je 0x4a8391
push eax
push esi
push ebx
call fcn.004b26e0
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e6d11
mov esp, ebp
pop ebp
ret