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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c0
mov eax, dword [0x4f9b3c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax]
mov dword [ebp - 0x9bc], ecx
lea ecx, [eax + 0x400]
xor ebx, ebx
push 0xff
mov dword [ebp - 0x998], eax
lea eax, [ebp - 0x10b]
push ebx
push eax
mov dword [ebp - 0x9b0], ecx
mov dword [ebp - 0x9a0], edi
mov byte [ebp - 0x10c], bl
call fcn.00492b40
mov esi, dword [edi + 0x3ac]
add esp, 0xc
mov dword [ebp - 0x9a4], ebx
mov dword [ebp - 0x9b4], ebx
mov dword [ebp - 0x9ac], ebx
mov dword [ebp - 0x9b8], 1
mov dword [ebp - 0x99c], ebx
cmp esi, ebx
je 0x4212e3
push esi
call fcn.00493670
pop ecx
cmp eax, 1
jbe 0x4212e3
push esi
call fcn.00493670
pop ecx
cmp eax, 0x16
jae 0x4211d7
push 0x16
pop eax
jmp 0x4211de
push esi
call fcn.00493670
pop ecx
inc eax
push 1
push eax
call dword [0x4fb074]
xor ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 0x99c], eax
cmp eax, ebx
jne 0x4211fe
push 0x1b
pop eax
jmp 0x421703
cmp byte [esi], 0x3a
jne 0x421207
mov edi, esi
jmp 0x421239
push 0x3a
push esi
call fcn.00498a20
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x42122b
sub eax, esi
push eax
push esi
push dword [ebp - 0x99c]
call fcn.00497a00
add esp, 0xc
jmp 0x421239
push esi
push dword [ebp - 0x99c]
call fcn.00498b20
pop ecx
pop ecx
cmp edi, ebx
je 0x4212b1
push 0x3a
push edi
call fcn.00498a20
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x4212b1
push 0xa
lea eax, [esi + 1]
push ebx
push eax
call fcn.00499eb1
add esp, 0xc
push eax
call fcn.004166ba
add esp, 4
movzx edi, ax
push 0x2d
push esi
mov dword [ebp - 0x9b4], edi
call fcn.00498a20
pop ecx
pop ecx
cmp eax, ebx
je 0x421297
push 0xa
inc eax
push ebx
push eax
call fcn.00499eb1
add esp, 0xc
push eax
call fcn.004166ba
add esp, 4
movzx eax, ax
jmp 0x42129a
movzx eax, di
mov dword [ebp - 0x9ac], eax
cmp di, ax
jbe 0x4212b1
mov dword [ebp - 0x9ac], ebx
mov dword [ebp - 0x9b4], ebx
mov ecx, dword [ebp - 0x99c]
cmp byte [ecx], bl
je 0x4212d3
call fcn.004288a5
sub eax, ebx
je 0x4212cf
dec eax
je 0x421345
dec eax
jne 0x4212dd
jmp 0x421373
mov ebx, ecx
jmp 0x4212d5
xor ebx, ebx
test ebx, ebx
jne 0x421379
mov edi, dword [ebp - 0x9a0]
mov esi, dword [ebp - 0x998]
lea eax, [ebp - 0x9a8]
push eax
lea eax, [ebp - 0x994]
push eax
push dword [esi + 0x154]
mov dword [ebp - 0x9a8], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x42134c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
mov ebx, eax
call fcn.00428f6a
pop ecx
push eax
push str.getsockname___failed:__s
push edi
call fcn.0040ec0a
add esp, 0xc
cmp dword [ebp - 0x99c], 0
je 0x421345
push dword [ebp - 0x99c]
call dword [0x4fb068]
pop ecx
push 0x1e
jmp 0x4211f8
lea eax, [ebp - 0x990]
push 0x401
push eax
movzx eax, word [ebp - 0x994]
lea esi, [ebp - 0x514]
call fcn.00428889
and dword [ebp - 0x9b8], 0
pop ecx
pop ecx
lea ebx, [ebp - 0x514]
lea eax, [ebp - 0x9a4]
push eax
push 0
push ebx
push dword [ebp - 0x998]
call fcn.0040dc44
add esp, 0x10
cmp eax, 1
jne 0x4213a7
mov esi, dword [ebp - 0x998]
lea eax, [ebp - 0x9a4]
call fcn.0040e2db
mov edi, dword [ebp - 0x9a4]
test edi, edi
je 0x4213c6
mov eax, dword [edi]
mov esi, dword [ebp - 0x9a0]
mov dword [ebp - 0x9a4], eax
call fcn.0040dd9b
jmp 0x4213cd
and dword [ebp - 0x9a4], 0
mov edi, dword [ebp - 0x9a4]
xor esi, esi
cmp edi, esi
jne 0x4213f8
push ebx
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0x9a0]
call fcn.0040ec0a
add esp, 0xc
cmp dword [ebp - 0x99c], esi
jmp 0x421336
cmp dword [ebp - 0x99c], esi
je 0x42140d
push dword [ebp - 0x99c]
call dword [0x4fb068]
pop ecx
or dword [ebp - 0x99c], 0xffffffff
mov ecx, dword [ebp - 0x998]
push edi
lea ebx, [ebp - 0x99c]
xor edx, edx
call fcn.0040d8a1
pop ecx
mov dword [ebp - 0x9a4], eax
test eax, eax
je 0x421442
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [edi + 0x1c]
mov esi, eax
test edi, edi
jne 0x421414
test edi, edi
jne 0x42146d
push dword [ebp - 0x998]
mov ebx, esi
call fcn.00428f6a
pop ecx
push eax
push str.socket_failure:__s
push dword [ebp - 0x9a0]
call fcn.0040ec0a
add esp, 0xc
jmp 0x421345
push dword [edi + 0x10]
lea eax, [ebp - 0x994]
push dword [edi + 0x18]
push eax
call fcn.004927d0
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x9a8], eax
mov eax, dword [ebp - 0x9b4]
add esp, 0xc
movzx esi, ax
cmp ax, word [ebp - 0x9ac]
ja 0x421576
mov ebx, 0x2741
cmp word [ebp - 0x994], 2
jne 0x4214be
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x992], ax
push dword [ebp - 0x9a8]
lea eax, [ebp - 0x994]
push eax
push dword [ebp - 0x99c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x42156d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x9b8], 0
je 0x421553
cmp eax, ebx
jne 0x421553
push dword [ebp - 0x998]
call fcn.00428f6a
pop ecx
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0x9a0]
call fcn.0040eb9d
add esp, 0x10
lea eax, [ebp - 0x9a8]
push eax
lea eax, [ebp - 0x994]
push eax
mov eax, dword [ebp - 0x998]
push dword [eax + 0x154]
mov dword [ebp - 0x9a8], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x42158a
movzx esi, word [ebp - 0x9b4]
and dword [ebp - 0x9b8], eax
jmp 0x421560
cmp eax, 0x2740
je 0x42155f
cmp eax, 0xd
jne 0x4215c8
inc esi
cmp si, word [ebp - 0x9ac]
jbe 0x4214a6
cmp si, word [ebp - 0x9ac]
jbe 0x4215f0
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0x9a0]
call fcn.0040ec0a
pop ecx
pop ecx
jmp 0x4215b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push dword [ebp - 0x998]
mov ebx, eax
call fcn.00428f6a
pop ecx
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x9a0]
call fcn.0040ec0a
add esp, 0xc
mov esi, dword [ebp - 0x99c]
mov eax, dword [ebp - 0x998]
call fcn.0040d85b
jmp 0x421345
push dword [ebp - 0x998]
mov ebx, eax
call fcn.00428f6a
pop ecx
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x9a0]
call fcn.0040ec0a
add esp, 0x10
jmp 0x4215b2
lea eax, [ebp - 0x9a8]
push eax
lea eax, [ebp - 0x994]
push eax
push dword [ebp - 0x99c]
mov dword [ebp - 0x9a8], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x42158a
push 1
push dword [ebp - 0x99c]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x42164d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push dword [ebp - 0x998]
mov ebx, eax
call fcn.00428f6a
pop ecx
push eax
push str.socket_failure:__s
jmp 0x4215a4
push 0x100
lea esi, [ebp - 0x10c]
mov ecx, edi
call fcn.0040d99d
mov edi, dword [ebp - 0x9bc]
pop ecx
push 2
pop ebx
jmp 0x4216b4
mov eax, dword [ebp - 0x998]
cmp dword [eax + 0x210], 0
jne 0x42167e
test edi, edi
je 0x4216b3
cmp edi, 1
jne 0x42168c
cmp word [ebp - 0x994], bx
jne 0x4216b3
movzx eax, word [ebp - 0x994]
sub eax, ebx
jne 0x4216b3
push dword [ebp - 0x992]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
test edi, edi
je 0x421712
cmp edi, 1
je 0x42178e
inc edi
cmp edi, ebx
jne 0x42166b
mov ebx, dword [ebp - 0x9a4]
mov eax, dword [ebp - 0x9b0]
mov ecx, dword [ebp - 0x998]
mov dword [eax + 0x68], edi
lea edi, [ecx + 0x158]
mov esi, dword [edi]
cmp esi, 0xffffffff
je 0x4216e7
mov eax, ecx
call fcn.0040d85b
mov ecx, dword [ebp - 0x998]
mov eax, dword [ebp - 0x99c]
push 0x1c
mov dword [edi], eax
mov dword [ecx + 0x1f4], 1
pop eax
call fcn.00420fc1
mov eax, ebx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004927bf
leave
ret
push esi
lea eax, [ebp - 0x10c]
push eax
xor eax, eax
cmp word [ebp - 0x994], bx
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push dword [ebp - 0x9b0]
call fcn.0042b923
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x4216be
call fcn.004288a8
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0x9a0]
call fcn.0040ec0a
mov esi, dword [ebp - 0x99c]
mov eax, dword [ebp - 0x998]
add esp, 0xc
call fcn.0040d85b
mov eax, dword [ebp - 0x9b0]
mov dword [eax + 0x68], 1
mov ecx, dword [ebp - 0x998]
xor eax, eax
jmp 0x4216fc
lea ecx, [ebp - 0x914]
lea edx, [ebp - 0x10c]
mov al, byte [edx]
test al, al
je 0x4217af
cmp al, 0x2e
jne 0x4217a9
mov byte [ecx], 0x2c
jmp 0x4217ab
mov byte [ecx], al
inc ecx
inc edx
jne 0x42179a
mov eax, esi
mov edx, esi
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.004193e0
add esp, 0x14
lea eax, [ebp - 0x914]
push eax
push str.PORT
push 0x4e11c8
push dword [ebp - 0x9b0]
call fcn.0042b923
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x4216be
call fcn.004288a8
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0x9a0]
call fcn.0040ec0a
mov esi, dword [ebp - 0x99c]
mov eax, dword [ebp - 0x998]
add esp, 0xc
call fcn.0040d85b
jmp 0x421781