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

Disassembly:
sub esp, 0x9ac
mov eax, dword [0x5bafe0]
xor eax, esp
mov dword [esp + 0x9a8], eax
mov eax, dword [esp + 0x9b0]
push ebx
push ebp
mov ebp, dword [edi]
push esi
xor ebx, ebx
push 0xff
lea ecx, [esp + 0xb5]
push ebx
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], 0xffffffff
mov byte [esp + 0xbc], bl
call fcn.00530110
mov esi, dword [ebp + 0x3ac]
mov dword [esp + 0x30], ebx
mov eax, dword [ebp + 0x3ac]
add esp, 0xc
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], 1
cmp eax, ebx
je 0x4faad8
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4fa990
sub eax, edx
cmp eax, 1
jbe 0x4faad8
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4fa9a7
sub eax, edx
cmp eax, 0x41
jae 0x4fa9bc
mov eax, 0x41
jmp 0x4fa9ca
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4fa9c1
sub eax, edx
inc eax
push 1
push eax
call dword [0x5ba02c]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4fa9f8
pop esi
pop ebp
lea eax, [ebx + 0x1b]
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.0052b755
add esp, 0x9ac
ret
mov al, byte [esi]
cmp al, 0x5b
jne 0x4fab4a
lea edx, [esi + 1]
push 0x5d
push esi
mov dword [esp + 0x28], edx
call fcn.00530640
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4faa9c
mov eax, dword [esp + 0x20]
mov ecx, ebp
sub ecx, eax
push ecx
push eax
push ebx
call fcn.00530500
add esp, 0xc
test ebp, ebp
je 0x4faa9c
push 0x3a
push ebp
call fcn.00530640
mov esi, eax
add esp, 8
test esi, esi
je 0x4faa9c
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.00530e17
push eax
call fcn.004e7720
movzx ebp, ax
push 0x2d
push esi
mov dword [esp + 0x34], ebp
call fcn.00530640
xor esi, esi
add esp, 0x18
cmp eax, esi
je 0x4fabbf
push 0xa
inc eax
push esi
push eax
call fcn.00530e17
push eax
call fcn.004e7720
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x18], eax
cmp bp, ax
jbe 0x4faa9c
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
cmp byte [ebx], 0
je 0x4faad8
mov ecx, dword [edi + 0x88]
mov edx, dword [edi + 0x4c]
push 0x401
lea eax, [esp + 0x1b4]
push eax
mov eax, dword [edx + 4]
push ebx
push ecx
push eax
call fcn.0048d590
add esp, 0x14
sub eax, 0
je 0x4fabcb
dec eax
je 0x4fab2d
dec eax
je 0x4fac05
mov eax, dword [edi + 0x154]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4fabcf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004e9aa0
mov ecx, dword [esp + 0x18]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.004e4210
add esp, 0x14
test ebx, ebx
je 0x4fab2d
push ebx
call dword [0x5ba020]
add esp, 4
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.0052b755
add esp, 0x9ac
ret
cmp al, 0x3a
jne 0x4fab55
mov ebp, esi
jmp 0x4faa31
push 0x3a
push esi
call fcn.00530640
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4fabaa
lea edx, [esp + 0x30]
push edx
push esi
push 0x17
call fcn.004ea540
add esp, 0xc
cmp eax, 1
jne 0x4fab9f
xor eax, eax
mov edx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, esi
sub edx, esi
jmp 0x4fab90
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4fab90
jmp 0x4faa9c
mov eax, ebp
sub eax, esi
push eax
push esi
jmp 0x4faa28
mov edx, ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4fabb0
jmp 0x4faa9c
movzx edx, bp
mov dword [esp + 0x18], edx
jmp 0x4faa9c
mov esi, ebx
jmp 0x4fac0c
movzx eax, word [esp + 0x30]
push 0x401
lea edx, [esp + 0x1b4]
push edx
cmp eax, 0x17
je 0x4fabee
lea ecx, [esp + 0x3c]
push ecx
push eax
jmp 0x4fabf5
lea eax, [esp + 0x40]
push eax
push 0x17
call fcn.004ed4a0
add esp, 0x10
mov dword [esp + 0x28], 0
lea esi, [esp + 0x1b0]
lea ecx, [esp + 0x24]
push ecx
push 0
push esi
push edi
call fcn.004dae30
add esp, 0x10
cmp eax, 1
jne 0x4fac30
lea edx, [esp + 0x24]
push edx
push edi
call fcn.004d9ec0
add esp, 8
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4fac4c
mov ebp, dword [eax]
push eax
mov eax, dword [esp + 0x14]
push eax
call fcn.004db050
add esp, 8
test ebp, ebp
jne 0x4fac64
mov ecx, dword [esp + 0x10]
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.004e4210
add esp, 0xc
jmp 0x4fab1f
test ebx, ebx
je 0x4fac72
push ebx
call dword [0x5ba020]
add esp, 4
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0xc], 0xffffffff
xor esi, esi
lea edx, [esp + 0xc]
push edx
push 0
push ebp
push edi
call fcn.004e6db0
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x4faca8
call ebx
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x4fac82
jmp 0x4facac
test ebp, ebp
jne 0x4faccb
push esi
push edi
call fcn.004e9aa0
push eax
mov eax, dword [esp + 0x1c]
push str.socket_failure:__s
push eax
call fcn.004e4210
add esp, 0x14
jmp 0x4fab2d
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
push ecx
push edx
lea eax, [esp + 0x38]
push eax
call fcn.00530190
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x14], ecx
movzx esi, ax
cmp ax, word [esp + 0x18]
ja 0x4fadff
mov ebx, dword [esp + 0x28]
lea ecx, [ecx]
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov word [esp + 0x32], ax
push edx
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4fadf8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
je 0x4fad84
cmp eax, 0x2741
jne 0x4fad84
push eax
push edi
call fcn.004e9aa0
movzx edx, si
mov esi, dword [esp + 0x18]
push eax
push edx
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.004e4180
mov edx, dword [edi + 0x154]
add esp, 0x18
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4fad9e
movzx esi, word [esp + 0x1c]
xor ebx, ebx
jmp 0x4fad91
cmp eax, 0x2740
je 0x4fad90
cmp eax, 0xd
jne 0x4fadca
inc esi
cmp si, word [esp + 0x18]
jbe 0x4fad00
jmp 0x4fadff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004e9aa0
push eax
push str.getsockname___failed:__s
push esi
call fcn.004e4210
mov eax, dword [esp + 0x20]
push eax
push edi
call fcn.004e6d50
add esp, 0x1c
jmp 0x4fab2d
push eax
push edi
call fcn.004e9aa0
mov edx, dword [esp + 0x18]
push eax
movzx ecx, si
push ecx
push str.bind_port_hu__failed:__s
push edx
call fcn.004e4210
mov eax, dword [esp + 0x24]
push eax
push edi
call fcn.004e6d50
add esp, 0x20
jmp 0x4fab2d
cmp si, word [esp + 0x18]
jbe 0x4fae21
mov ecx, dword [esp + 0x10]
push str.bind___failed__we_ran_out_of_ports_
push ecx
call fcn.004e4210
mov edx, dword [esp + 0x14]
push edx
push edi
call fcn.004e6d50
add esp, 0x10
jmp 0x4fab2d
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4fae72
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004e9aa0
push eax
push str.getsockname___failed:__s
mov eax, dword [esp + 0x20]
push eax
call fcn.004e4210
mov ecx, dword [esp + 0x20]
push ecx
push edi
call fcn.004e6d50
add esp, 0x1c
jmp 0x4fab2d
mov edx, dword [esp + 0xc]
push 1
push edx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4fae98
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004e9aa0
push eax
push str.socket_failure:__s
jmp 0x4fae55
push pe_nt_image_headers32
lea edx, [esp + 0xb4]
push edx
push ebp
call fcn.004dab20
add esp, 0xc
cmp dword [edi + 0x290], 0
jne 0x4faeca
cmp dword [edi + 0x268], 0
je 0x4faeca
mov dword [edi + 0x290], 1
mov ebp, dword [esp + 0x2c]
cmp ebp, 2
je 0x4faf2e
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x30]
mov edi, edi
cmp dword [edi + 0x290], 0
jne 0x4faeed
test ebp, ebp
je 0x4faf28
cmp ebp, 1
jne 0x4faef8
cmp cx, 2
jne 0x4faf28
movzx eax, cx
sub eax, 2
je 0x4faf0c
sub eax, 0x15
jne 0x4faf28
mov eax, dword [esp + 0x32]
push eax
jmp 0x4faf11
mov ecx, dword [esp + 0x32]
push ecx
call ebx
movzx esi, ax
test ebp, ebp
je 0x4faf85
cmp ebp, 1
je 0x4faffb
mov cx, word [esp + 0x30]
inc ebp
cmp ebp, 2
jne 0x4faee0
mov ebx, dword [esp + 0x20]
mov dword [edi + 0x580], ebp
mov eax, dword [edi + 0x158]
cmp eax, 0xffffffff
je 0x4faf4d
push eax
push edi
call fcn.004e6d50
add esp, 8
mov eax, dword [esp + 0xc]
mov dword [edi + 0x158], eax
mov dword [edi + 0x274], 1
mov dword [edi + 0x58c], 0x1c
mov ecx, dword [esp + 0x9b4]
pop esi
pop ebp
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0052b755
add esp, 0x9ac
ret
xor ecx, ecx
cmp word [esp + 0x30], 2
movzx edx, si
setne cl
push edx
lea eax, [esp + 0xb4]
push eax
lea esi, [edi + 0x518]
inc ecx
push ecx
push str.EPRT
push str._s__d_s_hu
push esi
call fcn.00509390
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x4faf32
push ebx
call fcn.004e9120
mov edx, dword [esp + 0x14]
push eax
push str.Failure_sending_EPRT_command:__s
push edx
call fcn.004e4210
mov eax, dword [esp + 0x1c]
push eax
push edi
call fcn.004e6d50
mov dword [esi + 0x68], 1
add esp, 0x18
mov dword [edi + 0x58c], 0
jmp 0x4faf6b
lea ecx, [esp + 0x5b4]
lea edx, [esp + 0xb0]
lea esp, [esp]
mov al, byte [edx]
test al, al
je 0x4fb025
cmp al, 0x2e
jne 0x4fb01f
mov byte [ecx], 0x2c
jmp 0x4fb021
mov byte [ecx], al
inc ecx
inc edx
jne 0x4fb010
movzx eax, si
mov edx, eax
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.004e8550
lea eax, [esp + 0x5c8]
push eax
push str.PORT
lea eax, [edi + 0x518]
push 0x5808b4
push eax
call fcn.00509390
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x4faf32
push ebx
call fcn.004e9120
mov ecx, dword [esp + 0x14]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.004e4210
mov edx, dword [esp + 0x1c]
push edx
push edi
call fcn.004e6d50
add esp, 0x18
mov dword [edi + 0x58c], 0
jmp 0x4faf6b