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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9b0
mov eax, dword [0x547e80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
or dword [ebp - 0x990], 0xffffffff
push ebx
push edi
mov edi, dword [esi]
xor ebx, ebx
push 0xff
mov dword [ebp - 0x9ac], eax
lea eax, [ebp - 0x103]
push ebx
push eax
mov dword [ebp - 0x994], edi
mov byte [ebp - 0x104], bl
call fcn.004463e0
lea eax, [edi + 0x3ac]
mov edi, dword [eax]
mov dword [ebp - 0x9b0], ebx
mov eax, dword [eax]
add esp, 0xc
mov dword [ebp - 0x9a0], ebx
mov dword [ebp - 0x9a4], ebx
mov dword [ebp - 0x9a8], 1
mov dword [ebp - 0x98c], ebx
cmp eax, ebx
je 0x422c50
push eax
call fcn.00445aa0
pop ecx
cmp eax, 1
jbe 0x422c50
push edi
call fcn.00445aa0
pop ecx
cmp eax, 0x16
jae 0x422b1b
push 0x16
pop eax
jmp 0x422b22
push edi
call fcn.00445aa0
pop ecx
inc eax
push 1
push eax
call dword [0x5476f4]
pop ecx
pop ecx
mov dword [ebp - 0x98c], eax
cmp eax, ebx
jne 0x422b40
push 0x1b
pop eax
jmp 0x423068
cmp byte [edi], 0x3a
jne 0x422b4d
mov dword [ebp - 0x998], edi
jmp 0x422b83
push 0x3a
push edi
call fcn.00447700
pop ecx
pop ecx
mov dword [ebp - 0x998], eax
cmp eax, ebx
je 0x422b75
sub eax, edi
push eax
push edi
push dword [ebp - 0x98c]
call fcn.004478c0
add esp, 0xc
jmp 0x422b83
push edi
push dword [ebp - 0x98c]
call fcn.004477c0
pop ecx
pop ecx
cmp dword [ebp - 0x998], ebx
je 0x422c04
push 0x3a
push dword [ebp - 0x998]
call fcn.00447700
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x422c04
push 0xa
lea eax, [edi + 1]
push ebx
push eax
call fcn.00447c3a
push eax
call fcn.0042bb2e
movzx eax, ax
push 0x2d
push edi
mov dword [ebp - 0x9a0], eax
call fcn.00447700
add esp, 0x18
cmp eax, ebx
je 0x422be2
push 0xa
inc eax
push ebx
push eax
call fcn.00447c3a
push eax
call fcn.0042bb2e
add esp, 0x10
movzx eax, ax
jmp 0x422be9
movzx eax, word [ebp - 0x9a0]
mov dword [ebp - 0x9a4], eax
cmp word [ebp - 0x9a0], ax
jbe 0x422c04
mov dword [ebp - 0x9a4], ebx
mov dword [ebp - 0x9a0], ebx
mov eax, dword [ebp - 0x98c]
cmp byte [eax], bl
je 0x422c46
push 0x401
lea ecx, [ebp - 0x508]
push ecx
push eax
push dword [esi + 0x88]
mov eax, dword [esi + 0x4c]
push dword [eax + 4]
call fcn.0042f2fa
add esp, 0x14
sub eax, ebx
je 0x422c3e
dec eax
je 0x422cae
dec eax
jne 0x422c50
jmp 0x422cde
mov edi, dword [ebp - 0x98c]
jmp 0x422c48
xor edi, edi
cmp edi, ebx
jne 0x422ce4
lea eax, [ebp - 0x99c]
push eax
lea eax, [ebp - 0x988]
push eax
push dword [esi + 0x154]
mov dword [ebp - 0x99c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x422cb5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00414bcb
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x994]
call fcn.00410708
add esp, 0x14
cmp dword [ebp - 0x98c], ebx
je 0x422cae
push dword [ebp - 0x98c]
call dword [0x5476e8]
pop ecx
push 0x1e
jmp 0x422b3a
push 0x401
lea eax, [ebp - 0x508]
push eax
lea eax, [ebp - 0x984]
push eax
movzx eax, word [ebp - 0x988]
push eax
call fcn.004183a5
add esp, 0x10
mov dword [ebp - 0x9a8], ebx
lea edi, [ebp - 0x508]
lea eax, [ebp - 0x9b0]
push eax
push ebx
push edi
push esi
call fcn.00408bff
add esp, 0x10
cmp eax, 1
jne 0x422d0a
lea eax, [ebp - 0x9b0]
push eax
push esi
call fcn.00407e64
pop ecx
pop ecx
mov eax, dword [ebp - 0x9b0]
cmp eax, ebx
je 0x422d2c
mov ecx, dword [eax]
push eax
push dword [ebp - 0x994]
mov dword [ebp - 0x998], ecx
call fcn.00408d6a
pop ecx
pop ecx
jmp 0x422d32
mov dword [ebp - 0x998], ebx
cmp dword [ebp - 0x998], ebx
jne 0x422d53
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0x994]
call fcn.00410708
add esp, 0xc
jmp 0x422c99
cmp dword [ebp - 0x98c], ebx
je 0x422d68
push dword [ebp - 0x98c]
call dword [0x5476e8]
pop ecx
or dword [ebp - 0x990], 0xffffffff
mov edi, dword [ebp - 0x998]
mov dword [ebp - 0x98c], ebx
lea eax, [ebp - 0x990]
push eax
push ebx
push edi
push esi
call fcn.004127d9
add esp, 0x10
mov dword [ebp - 0x998], eax
cmp eax, ebx
je 0x422daa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [edi + 0x1c]
mov dword [ebp - 0x98c], eax
cmp edi, ebx
jne 0x422d7b
cmp edi, ebx
jne 0x422dd3
push dword [ebp - 0x98c]
push esi
call fcn.00414bcb
push eax
push str.socket_failure:__s
push dword [ebp - 0x994]
call fcn.00410708
add esp, 0x14
jmp 0x422cae
push dword [edi + 0x10]
lea eax, [ebp - 0x988]
push dword [edi + 0x18]
push eax
call fcn.00443e60
mov eax, dword [edi + 0x10]
movzx ebx, word [ebp - 0x9a0]
mov dword [ebp - 0x99c], eax
mov ax, word [ebp - 0x9a4]
add esp, 0xc
cmp word [ebp - 0x9a0], ax
ja 0x422ed8
cmp word [ebp - 0x988], 2
jne 0x422e24
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x986], ax
push dword [ebp - 0x99c]
lea eax, [ebp - 0x988]
push eax
push dword [ebp - 0x990]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x422ecb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x9a8], 0
je 0x422eb1
cmp eax, 0x2741
jne 0x422eb1
push eax
push esi
call fcn.00414bcb
push eax
movzx eax, bx
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0x994]
call fcn.0041069e
add esp, 0x18
lea eax, [ebp - 0x99c]
push eax
lea eax, [ebp - 0x988]
push eax
push dword [esi + 0x154]
mov dword [ebp - 0x99c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x422efc
movzx ebx, word [ebp - 0x9a0]
and dword [ebp - 0x9a8], eax
jmp 0x422ebe
cmp eax, 0x2740
je 0x422ebd
cmp eax, 0xd
jne 0x422f2e
inc ebx
cmp bx, word [ebp - 0x9a4]
jbe 0x422e0c
cmp bx, word [ebp - 0x9a4]
jbe 0x422f5e
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0x994]
call fcn.00410708
push dword [ebp - 0x990]
push esi
call fcn.00412787
add esp, 0x10
jmp 0x422cae
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00414bcb
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x994]
call fcn.00410708
push dword [ebp - 0x990]
push esi
call fcn.00412787
add esp, 0x1c
jmp 0x422cae
push eax
push esi
call fcn.00414bcb
push eax
movzx eax, bx
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x994]
call fcn.00410708
push dword [ebp - 0x990]
push esi
call fcn.00412787
add esp, 0x20
jmp 0x422cae
lea eax, [ebp - 0x99c]
push eax
lea eax, [ebp - 0x988]
push eax
push dword [ebp - 0x990]
mov dword [ebp - 0x99c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x422efc
push 1
push dword [ebp - 0x990]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x422fb4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00414bcb
push eax
push str.socket_failure:__s
jmp 0x422f0f
push pe_nt_image_headers32
lea eax, [ebp - 0x104]
push eax
push edi
call fcn.0040895b
mov ebx, dword [ebp - 0x9ac]
add esp, 0xc
jmp 0x42301b
cmp dword [esi + 0x230], 0
jne 0x422fde
test ebx, ebx
je 0x423014
cmp ebx, 1
jne 0x422fed
cmp word [ebp - 0x988], 2
jne 0x423014
movzx eax, word [ebp - 0x988]
dec eax
dec eax
jne 0x423014
push dword [ebp - 0x986]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
test ebx, ebx
je 0x423076
cmp ebx, 1
je 0x4230e4
inc ebx
mov dword [ebp - 0x9ac], ebx
cmp ebx, 2
jne 0x422fd1
mov ebx, dword [ebp - 0x998]
mov eax, dword [ebp - 0x9ac]
mov dword [esi + 0x488], eax
mov eax, dword [esi + 0x158]
cmp eax, 0xffffffff
je 0x423046
push eax
push esi
call fcn.00412787
pop ecx
pop ecx
mov eax, dword [ebp - 0x990]
push 0x1c
mov dword [esi + 0x158], eax
mov dword [esi + 0x214], 1
pop eax
mov ecx, esi
call fcn.0042297d
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00446098
leave
ret
push edi
lea eax, [ebp - 0x104]
push eax
xor eax, eax
cmp word [ebp - 0x988], 2
lea edi, [esi + 0x420]
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.0042f617
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x423026
push ebx
call fcn.004144b5
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0x994]
call fcn.00410708
push dword [ebp - 0x990]
push esi
call fcn.00412787
mov dword [edi + 0x68], 1
add esp, 0x18
xor eax, eax
jmp 0x42305f
lea ecx, [ebp - 0x908]
lea edx, [ebp - 0x104]
mov al, byte [edx]
test al, al
je 0x423105
cmp al, 0x2e
jne 0x4230ff
mov byte [ecx], 0x2c
jmp 0x423101
mov byte [ecx], al
inc ecx
inc edx
jne 0x4230f0
mov eax, edi
mov edx, edi
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.00413966
lea eax, [ebp - 0x908]
push eax
push str.PORT
lea eax, [esi + 0x420]
push 0x5034e4
push eax
call fcn.0042f617
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x423026
push ebx
call fcn.004144b5
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0x994]
call fcn.00410708
push dword [ebp - 0x990]
push esi
call fcn.00412787
jmp 0x4230da