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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x668
mov eax, dword [0x5796f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x634], eax
add eax, 0x230
push 0x2f
mov dword [ebp - 0x660], eax
lea eax, [ebp - 0x34]
push 0
push eax
mov dword [ebp - 0x668], ebx
mov dword [ebp - 0x648], 0xffffffff
call fcn.004d7060
mov edx, dword [ebx + 0x50c]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x658], eax
xor edi, edi
mov dword [ebp - 0x650], edx
mov dword [ebp - 0x65c], eax
mov dword [ebp - 0x654], eax
mov dword [ebp - 0x640], eax
mov byte [ebp - 0x635], 1
mov dword [ebp - 0x64c], eax
test edx, edx
je 0x4b0a5a
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x63c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b0828
sub ecx, dword [ebp - 0x63c]
cmp ecx, 1
jbe 0x4b0a5a
mov al, byte [edx]
cmp al, 0x5b
jne 0x4b0870
lea eax, [edx + 1]
push 0x5d
push eax
mov dword [ebp - 0x63c], eax
call fcn.004d7600
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4b08d1
mov eax, dword [ebp - 0x63c]
mov edi, ecx
sub edi, eax
mov dword [ebp - 0x64c], eax
jmp 0x4b08d1
cmp al, 0x3a
jne 0x4b0878
mov ecx, edx
jmp 0x4b08d1
push 0x3a
push edx
call fcn.004d7600
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x650]
mov dword [ebp - 0x63c], ecx
mov dword [ebp - 0x64c], eax
test ecx, ecx
je 0x4b08ba
mov edi, ecx
lea ecx, [ebp - 0x628]
push ecx
push eax
push 0x17
sub edi, eax
call fcn.004c1070
add esp, 0xc
cmp eax, 1
jne 0x4b08cb
xor ecx, ecx
jmp 0x4b08d1
mov edi, eax
lea edx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x4b08c0
sub edi, edx
jmp 0x4b08d1
mov ecx, dword [ebp - 0x63c]
xor edx, edx
mov dword [ebp - 0x640], edx
test ecx, ecx
je 0x4b0946
push 0x3a
push ecx
call fcn.004d7600
xor edx, edx
mov dword [ebp - 0x650], eax
add esp, 8
mov dword [ebp - 0x640], edx
test eax, eax
je 0x4b0946
push 0xa
push edx
inc eax
push eax
call fcn.00514fd4
push eax
call fcn.00494080
push 0x2d
push dword [ebp - 0x650]
movzx eax, ax
mov dword [ebp - 0x640], eax
call fcn.004d7600
add esp, 0x18
test eax, eax
je 0x4b093d
push 0xa
inc eax
push 0
push eax
call fcn.00514fd4
push eax
call fcn.00494080
add esp, 0x10
jmp 0x4b0943
mov eax, dword [ebp - 0x640]
movzx edx, ax
xor ecx, ecx
movzx eax, dx
cmp word [ebp - 0x640], dx
cmovbe ecx, eax
movzx eax, cx
mov ecx, eax
mov dword [ebp - 0x63c], eax
mov eax, dword [ebp - 0x640]
mov dword [ebp - 0x664], ecx
xor ecx, ecx
cmp word [ebp - 0x640], dx
movzx eax, ax
cmovbe ecx, eax
movzx eax, cx
mov dword [ebp - 0x650], eax
test edi, edi
je 0x4b0a42
cmp edi, 0x32
jae 0x4b0bcb
push edi
push dword [ebp - 0x64c]
lea eax, [ebp - 0x68]
push eax
call fcn.004d6ae0
add esp, 0xc
mov byte [ebp + edi - 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.004c77f0
mov edi, dword [ebp - 0x634]
add esp, 4
push eax
mov eax, dword [edi + 0x24]
push dword [eax]
call fcn.00406830
add esp, 0x18
sub eax, 0
je 0x4b0a0d
sub eax, 1
je 0x4b0f93
sub eax, 1
jne 0x4b0a18
lea eax, [ebp - 0x5b0]
mov dword [ebp - 0x658], eax
jmp 0x4b0a1a
lea eax, [ebp - 0x68]
mov dword [ebp - 0x658], eax
jmp 0x4b0a1a
xor eax, eax
mov ecx, dword [ebp - 0x650]
movzx ecx, cx
mov dword [ebp - 0x654], ecx
mov ecx, dword [ebp - 0x63c]
movzx ecx, cx
mov dword [ebp - 0x640], ecx
test eax, eax
jne 0x4b0b04
jmp 0x4b0a60
movzx eax, ax
mov dword [ebp - 0x654], eax
mov eax, dword [ebp - 0x664]
movzx eax, ax
mov dword [ebp - 0x640], eax
mov edi, dword [ebp - 0x634]
lea eax, [ebp - 0x644]
mov dword [ebp - 0x644], 0x80
push eax
lea eax, [ebp - 0x630]
push eax
push dword [edi + 0x108]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b0aab
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004821a0
push eax
push str.getsockname___failed:__s
jmp 0x4b0bc2
mov ax, word [ebp - 0x630]
push 0x401
cmp ax, 0x17
je 0x4b0ad1
lea ecx, [ebp - 0x5b0]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x62c]
push ecx
push eax
jmp 0x4b0ae1
lea eax, [ebp - 0x5b0]
push eax
lea eax, [ebp - 0x628]
push eax
push 0x17
call fcn.004bf700
add esp, 0x10
test eax, eax
je 0x4b0bcb
lea eax, [ebp - 0x5b0]
mov byte [ebp - 0x635], 0
mov dword [ebp - 0x658], eax
lea ecx, [ebp - 0x65c]
push ecx
push 0
push 0
push eax
push ebx
call fcn.00498be0
add esp, 0x14
cmp eax, 1
jne 0x4b0b2e
lea eax, [ebp - 0x65c]
push eax
push ebx
call fcn.00488990
add esp, 8
mov eax, dword [ebp - 0x65c]
test eax, eax
je 0x4b0f79
mov edi, dword [eax]
push eax
push ebx
mov dword [ebp - 0x63c], edi
call fcn.00498f80
add esp, 8
test edi, edi
je 0x4b0f79
mov dword [ebp - 0x64c], 0
lea eax, [ebp - 0x648]
push eax
mov eax, dword [ebp - 0x634]
movzx eax, byte [eax + 0x312]
push eax
push 0
push edi
push ebx
call fcn.004bb110
add esp, 0x14
test eax, eax
je 0x4b0ba0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [edi + 0x1c]
mov dword [ebp - 0x64c], eax
mov dword [ebp - 0x63c], edi
test edi, edi
jne 0x4b0b60
jmp 0x4b0baa
test edi, edi
jne 0x4b0c0a
mov eax, dword [ebp - 0x64c]
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.004821a0
push eax
push str.socket_failure:__s
push ebx
call fcn.00491d50
add esp, 0x18
mov edi, 0x1e
mov esi, dword [ebp - 0x634]
push 0
push ebx
call fcn.004ae2b0
mov eax, dword [ebp - 0x648]
add esp, 8
cmp eax, 0xffffffff
je 0x4b0bf7
push eax
push esi
push ebx
call fcn.004bb0f0
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004edc3c
mov esp, ebp
pop ebp
ret
push dword [edi + 0x10]
lea eax, [ebp - 0x630]
push dword [edi + 0x18]
push eax
call fcn.004d6ae0
mov eax, dword [edi + 0x10]
add esp, 0xc
mov dword [ebp - 0x644], eax
mov eax, dword [ebp - 0x654]
cmp ax, word [ebp - 0x640]
movzx edi, ax
ja 0x4b0f66
mov eax, dword [sym.imp.WS2_32.dll_htons]
push edi
call eax
push dword [ebp - 0x644]
mov word [ebp - 0x62e], ax
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4b0d3e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x635], 0
je 0x4b0cfb
cmp eax, 0x2741
jne 0x4b0cfb
push 0x100
lea eax, [ebp - 0x1ac]
push eax
push 0x2741
call fcn.004821a0
push eax
movzx eax, di
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push ebx
call fcn.00491e10
add esp, 0x1c
mov dword [ebp - 0x644], 0x80
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x630]
push eax
mov eax, dword [ebp - 0x634]
push dword [eax + 0x108]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b0a88
mov eax, dword [ebp - 0x654]
movzx edi, ax
cmp di, word [ebp - 0x640]
mov byte [ebp - 0x635], 0
jmp 0x4b0c38
cmp eax, 0x2740
je 0x4b0d07
cmp eax, 0xd
jne 0x4b0d14
inc edi
cmp di, word [ebp - 0x640]
jmp 0x4b0c38
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.004821a0
push eax
movzx eax, di
push eax
push str.bind_port_hu__failed:__s
push ebx
call fcn.00491d50
add esp, 0x1c
jmp 0x4b0bcb
cmp di, word [ebp - 0x640]
ja 0x4b0f66
lea eax, [ebp - 0x644]
mov dword [ebp - 0x644], 0x80
push eax
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b0a88
push 1
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4b0da0
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4b0bb6
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x63c]
call fcn.00498b90
mov eax, dword [ebp - 0x634]
add esp, 0xc
cmp byte [eax + 0x1ba], 0
jne 0x4b0dd3
cmp byte [eax + 0x1b4], 0
je 0x4b0dd3
mov byte [eax + 0x1ba], 1
cmp esi, 2
je 0x4b0e3b
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x630]
cmp byte [eax + 0x1ba], 0
jne 0x4b0df2
test esi, esi
je 0x4b0e35
cmp esi, 1
jne 0x4b0dfd
cmp cx, 2
jne 0x4b0e35
movzx eax, cx
sub eax, 2
je 0x4b0e0a
sub eax, 0x15
jne 0x4b0e2f
push dword [ebp - 0x62e]
call edi
movzx eax, ax
mov dword [ebp - 0x63c], eax
test esi, esi
je 0x4b0f12
cmp esi, 1
je 0x4b0e7b
mov cx, word [ebp - 0x630]
mov eax, dword [ebp - 0x634]
inc esi
cmp esi, 2
jne 0x4b0de5
mov eax, dword [ebp - 0x660]
mov dword [eax + 0xa0], esi
lea eax, [ebp - 0x648]
mov esi, dword [ebp - 0x634]
push eax
push 1
push esi
push ebx
call fcn.004baee0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b0bd6
mov dword [ebp - 0x648], 0xffffffff
push 0x1c
jmp 0x4b0bd8
lea edx, [ebp - 0xac]
mov ebx, 0x2c
lea edi, [ebp - 0x34]
nop dword [eax]
mov cl, byte [edi]
test cl, cl
je 0x4b0ea7
cmp cl, 0x2e
movzx eax, cl
cmove eax, ebx
mov byte [edx], al
inc edx
add edi, 1
jne 0x4b0e90
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.004966d0
mov ebx, dword [ebp - 0x668]
lea eax, [ebp - 0xac]
push eax
push str.PORT
push 0x5493b4
push dword [ebp - 0x660]
push ebx
call fcn.004c66d0
mov edi, eax
add esp, 0x28
test edi, edi
je 0x4b0e3b
push edi
call fcn.00482290
push eax
push str.Failure_sending_PORT_command:__s
push ebx
call fcn.00491d50
add esp, 0x10
jmp 0x4b0bd0
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 dword [ebp - 0x660]
push ebx
call fcn.004c66d0
mov edi, eax
add esp, 0x1c
test edi, edi
je 0x4b0e3b
push edi
call fcn.00482290
push eax
push str.Failure_sending_EPRT_command:__s
push ebx
call fcn.00491d50
add esp, 0x10
jmp 0x4b0bd0
push str.bind___failed__we_ran_out_of_ports
push ebx
call fcn.00491d50
add esp, 8
jmp 0x4b0bcb
mov eax, dword [ebp - 0x658]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ebx
call fcn.00491d50
add esp, 0xc
jmp 0x4b0bcb
mov esi, edi
mov edi, 0x1e
jmp 0x4b0bd6