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

Disassembly:
push ebp
lea ebp, [esp - 0x988]
sub esp, 0xa08
mov eax, dword [0x4bf070]
xor eax, ebp
mov dword [ebp + 0x984], eax
and dword [ebp - 0x28], 0
mov eax, dword [ebp + 0x990]
add eax, 0x500
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x990]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
or dword [ebp - 0x20], 0xffffffff
mov al, byte [0x4cc84e]
mov byte [ebp + 0x884], al
push 0xff
push 0
lea eax, [ebp + 0x885]
push eax
call fcn.004179d0
add esp, 0xc
lea eax, [ebp]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
and dword [ebp - 0x34], 0
push 4
pop eax
imul eax, eax, 0xc
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax + 0x528]
mov dword [ebp - 0x1c], eax
and dword [ebp - 0x48], 0
xor eax, eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 4], ax
mov byte [ebp - 0xd], 1
and dword [ebp - 0x24], 0
push 4
pop eax
imul eax, eax, 0xc
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + eax + 0x528], 0
je 0x478a3b
push 4
pop eax
imul eax, eax, 0xc
mov ecx, dword [ebp - 0xc]
push dword [ecx + eax + 0x528]
call fcn.00421050
pop ecx
cmp eax, 1
jbe 0x478a3b
push dword [ebp - 0x1c]
call fcn.00421050
pop ecx
cmp eax, 0x41
jae 0x478826
mov dword [ebp - 0x6c], 0x41
jmp 0x478832
push dword [ebp - 0x1c]
call fcn.00421050
pop ecx
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x58], eax
and dword [ebp - 0x2c], 0
and dword [ebp - 0x4c], 0
and dword [ebp - 0x5c], 0
push 1
mov eax, dword [ebp - 0x78]
inc eax
push eax
call dword [0x4bfa44]
pop ecx
pop ecx
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x47886a
push 0x1b
pop eax
jmp 0x47915a
mov eax, dword [ebp - 0x1c]
movsx eax, byte [eax]
cmp eax, 0x5b
jne 0x4788ab
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x58], eax
push 0x5d
push dword [ebp - 0x1c]
call fcn.004180b0
pop ecx
pop ecx
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4788a6
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x58]
push eax
push dword [ebp - 0x58]
push dword [ebp - 0x24]
call fcn.00421360
add esp, 0xc
jmp 0x47892d
mov eax, dword [ebp - 0x1c]
movsx eax, byte [eax]
cmp eax, 0x3a
jne 0x4788be
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
jmp 0x47892d
push 0x3a
push dword [ebp - 0x1c]
call fcn.004180b0
pop ecx
pop ecx
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x478920
push dword [ebp - 0x50]
push dword [ebp - 0x1c]
push 0x17
call fcn.00468562
add esp, 0xc
cmp eax, 1
jne 0x478909
xor eax, eax
mov word [ebp - 4], ax
mov ax, word [ebp - 4]
mov word [ebp - 8], ax
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call fcn.00421490
pop ecx
pop ecx
and dword [ebp - 0x2c], 0
jmp 0x47891e
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x58]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call fcn.00421360
add esp, 0xc
jmp 0x47892d
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call fcn.00421490
pop ecx
pop ecx
cmp dword [ebp - 0x2c], 0
je 0x47899f
push 0x3a
push dword [ebp - 0x2c]
call fcn.004180b0
pop ecx
pop ecx
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x47899f
push 0xa
push 0
mov eax, dword [ebp - 0x4c]
inc eax
push eax
call fcn.00427828
add esp, 0xc
push eax
call fcn.00446759
pop ecx
mov word [ebp - 8], ax
push 0x2d
push dword [ebp - 0x4c]
call fcn.004180b0
pop ecx
pop ecx
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x478997
push 0xa
push 0
mov eax, dword [ebp - 0x5c]
inc eax
push eax
call fcn.00427828
add esp, 0xc
push eax
call fcn.00446759
pop ecx
mov word [ebp - 4], ax
jmp 0x47899f
mov ax, word [ebp - 8]
mov word [ebp - 4], ax
movzx eax, word [ebp - 8]
movzx ecx, word [ebp - 4]
cmp eax, ecx
jle 0x4789b9
xor eax, eax
mov word [ebp - 4], ax
mov ax, word [ebp - 4]
mov word [ebp - 8], ax
mov eax, dword [ebp - 0x24]
movsx eax, byte [eax]
test eax, eax
je 0x478a37
push 0x401
lea eax, [ebp + 0x480]
push eax
push dword [ebp - 0x24]
mov eax, dword [ebp + 0x990]
push dword [eax + 0x90]
mov eax, dword [ebp + 0x990]
mov eax, dword [eax + 0x54]
push dword [eax + 0x18]
call fcn.004685b1
pop ecx
push eax
mov eax, dword [ebp + 0x990]
mov eax, dword [eax + 0x54]
push dword [eax + 4]
call fcn.004685aa
add esp, 0x18
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x478a1c
cmp dword [ebp - 0x60], 1
je 0x478a24
cmp dword [ebp - 0x60], 2
je 0x478a2c
jmp 0x478a35
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
jmp 0x478a35
push 0x1e
pop eax
jmp 0x47915a
lea eax, [ebp + 0x480]
mov dword [ebp - 0x34], eax
jmp 0x478a3b
and dword [ebp - 0x34], 0
cmp dword [ebp - 0x34], 0
jne 0x478b0b
mov dword [ebp - 0x3c], 0x80
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x14]
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp + 0x990]
push dword [ecx + eax + 0x1a8]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x478aa7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 0x990]
call fcn.004680bc
pop ecx
pop ecx
push eax
push 0x4c6ce8
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push dword [ebp - 0x24]
call dword [0x4bfa3c]
pop ecx
push 0x1e
pop eax
jmp 0x47915a
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0x17
je 0x478ab8
jmp 0x478adc
push 0x401
lea eax, [ebp + 0x480]
push eax
mov eax, dword [ebp - 0x50]
add eax, 8
push eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
push eax
call fcn.00468a8f
add esp, 0x10
jmp 0x478afe
push 0x401
lea eax, [ebp + 0x480]
push eax
mov eax, dword [ebp - 0x68]
add eax, 4
push eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
push eax
call fcn.00468a8f
add esp, 0x10
lea eax, [ebp + 0x480]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0xd], 0
lea eax, [ebp - 0x48]
push eax
push 0
push dword [ebp - 0x34]
push dword [ebp + 0x990]
call fcn.00449b1e
add esp, 0x10
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 1
jne 0x478b3c
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0x990]
call fcn.00453f4b
pop ecx
pop ecx
cmp dword [ebp - 0x48], 0
je 0x478b59
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
mov dword [ebp - 0x64], eax
push dword [ebp - 0x48]
push dword [ebp - 0xc]
call fcn.00449d4d
pop ecx
pop ecx
jmp 0x478b5d
and dword [ebp - 0x64], 0
cmp dword [ebp - 0x64], 0
jne 0x478b88
push dword [ebp - 0x34]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push dword [ebp - 0x24]
call dword [0x4bfa3c]
pop ecx
push 0x1e
pop eax
jmp 0x47915a
push dword [ebp - 0x24]
call dword [0x4bfa3c]
pop ecx
and dword [ebp - 0x34], 0
or dword [ebp - 0x20], 0xffffffff
and dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x30], eax
jmp 0x478baf
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x478be4
lea eax, [ebp - 0x20]
push eax
push 0
push dword [ebp - 0x30]
push dword [ebp + 0x990]
call fcn.00446960
add esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x478be0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x38], eax
jmp 0x478ba6
jmp 0x478be4
cmp dword [ebp - 0x30], 0
jne 0x478c13
push dword [ebp - 0x38]
push dword [ebp + 0x990]
call fcn.004680bc
pop ecx
pop ecx
push eax
push 0x4c6d38
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push 0x1e
pop eax
jmp 0x47915a
mov eax, dword [ebp - 0x30]
push dword [eax + 0x10]
mov eax, dword [ebp - 0x30]
push dword [eax + 0x18]
push dword [ebp - 0x14]
call fcn.00417b30
add esp, 0xc
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x3c], eax
mov ax, word [ebp - 8]
mov word [ebp - 0x18], ax
movzx eax, word [ebp - 0x18]
movzx ecx, word [ebp - 4]
cmp eax, ecx
jg 0x478db2
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
cmp eax, 2
jne 0x478c68
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x68]
mov word [ecx + 2], ax
jmp 0x478c78
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x50]
mov word [ecx + 2], ax
push dword [ebp - 0x3c]
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x478d9f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x38], eax
movzx eax, byte [ebp - 0xd]
test eax, eax
je 0x478d50
cmp dword [ebp - 0x38], 0x2741
jne 0x478d50
push dword [ebp - 0x38]
push dword [ebp + 0x990]
call fcn.004680bc
pop ecx
pop ecx
push eax
movzx eax, word [ebp - 0x18]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0xc]
call fcn.004460bd
add esp, 0x10
mov dword [ebp - 0x3c], 0x80
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x14]
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp + 0x990]
push dword [ecx + eax + 0x1a8]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x478d3f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 0x990]
call fcn.004680bc
pop ecx
pop ecx
push eax
push 0x4c6d7c
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push dword [ebp - 0x20]
push dword [ebp + 0x990]
call fcn.00446a9c
pop ecx
pop ecx
push 0x1e
pop eax
jmp 0x47915a
mov ax, word [ebp - 8]
mov word [ebp - 0x18], ax
mov byte [ebp - 0xd], 0
jmp 0x478c3b
cmp dword [ebp - 0x38], 0x2740
je 0x478d9d
cmp dword [ebp - 0x38], 0xd
je 0x478d9d
push dword [ebp - 0x38]
push dword [ebp + 0x990]
call fcn.004680bc
pop ecx
pop ecx
push eax
movzx eax, word [ebp - 0x18]
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0x10
push dword [ebp - 0x20]
push dword [ebp + 0x990]
call fcn.00446a9c
pop ecx
pop ecx
push 0x1e
pop eax
jmp 0x47915a
jmp 0x478da1
jmp 0x478db2
mov ax, word [ebp - 0x18]
add ax, 1
mov word [ebp - 0x18], ax
jmp 0x478c3b
movzx eax, word [ebp - 0x18]
movzx ecx, word [ebp - 4]
cmp eax, ecx
jle 0x478de5
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0xc]
call fcn.004465bf
pop ecx
pop ecx
push dword [ebp - 0x20]
push dword [ebp + 0x990]
call fcn.00446a9c
pop ecx
pop ecx
push 0x1e
pop eax
jmp 0x47915a
mov dword [ebp - 0x3c], 0x80
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x478e3d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 0x990]
call fcn.004680bc
pop ecx
pop ecx
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push dword [ebp - 0x20]
push dword [ebp + 0x990]
call fcn.00446a9c
pop ecx
pop ecx
push 0x1e
pop eax
jmp 0x47915a
push 1
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x478e89
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 0x990]
call fcn.004680bc
pop ecx
pop ecx
push eax
push str.socket_failure:__s
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push dword [ebp - 0x20]
push dword [ebp + 0x990]
call fcn.00446a9c
pop ecx
pop ecx
push 0x1e
pop eax
jmp 0x47915a
push 0x100
lea eax, [ebp + 0x884]
push eax
push dword [ebp - 0x30]
call fcn.00449aa5
add esp, 0xc
mov eax, dword [ebp + 0x990]
movzx eax, byte [eax + 0x289]
test eax, eax
jne 0x478ecf
mov eax, dword [ebp + 0x990]
movzx eax, byte [eax + 0x27f]
test eax, eax
je 0x478ecf
mov eax, dword [ebp + 0x990]
mov byte [eax + 0x289], 1
jmp 0x478ede
mov eax, dword [ebp + 0x994]
inc eax
mov dword [ebp + 0x994], eax
cmp dword [ebp + 0x994], 2
je 0x479106
mov eax, dword [ebp + 0x990]
movzx eax, byte [eax + 0x289]
test eax, eax
jne 0x478f07
cmp dword [ebp + 0x994], 0
jne 0x478f07
jmp 0x478ed1
cmp dword [ebp + 0x994], 1
jne 0x478f1d
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
cmp eax, 2
je 0x478f1d
jmp 0x478ed1
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 2
je 0x478f34
cmp dword [ebp - 0x70], 0x17
je 0x478f48
jmp 0x478f5c
mov eax, dword [ebp - 0x68]
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18], ax
jmp 0x478f61
mov eax, dword [ebp - 0x50]
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18], ax
jmp 0x478f61
jmp 0x478ed1
cmp dword [ebp + 0x994], 0
jne 0x47900e
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
cmp eax, 2
jne 0x478f82
mov dword [ebp - 0x74], 1
jmp 0x478f89
mov dword [ebp - 0x74], 2
movzx eax, word [ebp - 0x18]
push eax
lea eax, [ebp + 0x884]
push eax
push dword [ebp - 0x74]
imul eax, dword [ebp + 0x994], 5
add eax, str.EPRT
push eax
push str._s__d_s_hu
push dword [ebp - 0x54]
call fcn.0048847b
add esp, 0x18
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x479009
push dword [ebp - 0x28]
call fcn.00467c0c
pop ecx
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push dword [ebp - 0x20]
push dword [ebp + 0x990]
call fcn.00446a9c
pop ecx
pop ecx
mov eax, dword [ebp - 0x54]
mov dword [eax + 0x6c], 1
push 0
push dword [ebp + 0x990]
call fcn.00479485
pop ecx
pop ecx
mov eax, dword [ebp - 0x28]
jmp 0x47915a
jmp 0x479106
cmp dword [ebp + 0x994], 1
jne 0x479101
lea eax, [ebp + 0x884]
mov dword [ebp - 0x44], eax
lea eax, [ebp + 0x80]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x44], 0
je 0x47906a
mov eax, dword [ebp - 0x44]
movsx eax, byte [eax]
test eax, eax
je 0x47906a
mov eax, dword [ebp - 0x44]
movsx eax, byte [eax]
cmp eax, 0x2e
jne 0x479050
mov eax, dword [ebp - 0x40]
mov byte [eax], 0x2c
jmp 0x47905a
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x44]
mov cl, byte [ecx]
mov byte [eax], cl
mov eax, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x44]
inc eax
mov dword [ebp - 0x44], eax
jmp 0x47902d
mov eax, dword [ebp - 0x40]
mov byte [eax], 0
movzx eax, word [ebp - 0x18]
and eax, 0xff
push eax
movzx eax, word [ebp - 0x18]
sar eax, 8
push eax
push str.__d__d
push 0x14
push dword [ebp - 0x40]
call fcn.00466e9a
add esp, 0x14
lea eax, [ebp + 0x80]
push eax
imul eax, dword [ebp + 0x994], 5
add eax, str.EPRT
push eax
push 0x4c6e44
push dword [ebp - 0x54]
call fcn.0048847b
add esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4790ff
push dword [ebp - 0x28]
call fcn.00467c0c
pop ecx
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0xc]
call fcn.004465bf
add esp, 0xc
push dword [ebp - 0x20]
push dword [ebp + 0x990]
call fcn.00446a9c
pop ecx
pop ecx
push 0
push dword [ebp + 0x990]
call fcn.00479485
pop ecx
pop ecx
mov eax, dword [ebp - 0x28]
jmp 0x47915a
jmp 0x479106
jmp 0x478ed1
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp + 0x994]
mov dword [eax + 0x6c], ecx
push dword [ebp + 0x990]
call fcn.00479dd6
pop ecx
push 4
pop eax
shl eax, 0
mov ecx, dword [ebp + 0x990]
mov edx, dword [ebp - 0x20]
mov dword [ecx + eax + 0x1a8], edx
xor eax, eax
inc eax
shl eax, 0
mov ecx, dword [ebp + 0x990]
mov byte [ecx + eax + 0x281], 1
push 0x1c
push dword [ebp + 0x990]
call fcn.00479485
pop ecx
pop ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x984]
xor ecx, ebp
call fcn.0041553e
add ebp, 0x988
mov esp, ebp
pop ebp
ret