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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x62c
mov eax, dword [0xae4064]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x600], eax
add eax, 0x378
push 0x2f
mov dword [ebp - 0x628], eax
lea eax, [ebp - 0x34]
push 0
push eax
mov dword [ebp - 0x62c], ebx
mov dword [ebp - 0x618], 0xffffffff
call fcn.00a5b4a0
mov esi, dword [ebx + 0x51c]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x61c], eax
mov dword [ebp - 0x624], eax
mov dword [ebp - 0x608], eax
mov dword [ebp - 0x60c], eax
mov byte [ebp - 0x601], 1
mov dword [ebp - 0x620], eax
test esi, esi
je 0xa405f2
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0xa40410
sub ecx, edx
cmp ecx, 1
jbe 0xa405f2
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0xa40427
sub ecx, edx
cmp ecx, 0x16
jae 0xa4043c
mov ecx, 0x16
jmp 0xa4044a
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0xa40441
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0xae410c]
add esp, 8
mov dword [ebp - 0x620], eax
test eax, eax
jne 0xa4046b
lea esi, [eax + 0x1b]
jmp 0xa40ac9
cmp byte [esi], 0x3a
je 0xa404a1
push 0x3a
push esi
call fcn.00a5f210
add esp, 8
mov dword [ebp - 0x610], eax
test eax, eax
je 0xa40515
sub eax, esi
push eax
push esi
push dword [ebp - 0x620]
call fcn.00a63760
mov esi, dword [ebp - 0x610]
add esp, 0xc
test esi, esi
je 0xa4052d
push 0x3a
push esi
call fcn.00a5f210
mov esi, eax
add esp, 8
test esi, esi
je 0xa4052d
push 0xa
lea eax, [esi + 1]
push 0
push eax
call fcn.00a6db85
push eax
call fcn.00a20490
movzx eax, ax
push 0x2d
push esi
mov dword [ebp - 0x608], eax
call fcn.00a5f210
add esp, 0x18
test eax, eax
je 0xa40504
push 0xa
inc eax
push 0
push eax
call fcn.00a6db85
push eax
call fcn.00a20490
movzx ecx, ax
add esp, 0x10
mov dword [ebp - 0x60c], ecx
jmp 0xa4052d
mov eax, dword [ebp - 0x608]
movzx ecx, ax
mov dword [ebp - 0x60c], ecx
jmp 0xa4052d
mov ecx, dword [ebp - 0x620]
sub ecx, esi
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0xa40520
mov esi, dword [ebp - 0x60c]
xor ecx, ecx
cmp word [ebp - 0x608], si
movzx eax, si
cmovbe ecx, eax
movzx eax, cx
xor ecx, ecx
cmp word [ebp - 0x608], si
mov edx, eax
mov dword [ebp - 0x610], eax
mov eax, dword [ebp - 0x608]
movzx eax, ax
cmovbe ecx, eax
mov eax, dword [ebp - 0x620]
movzx esi, cx
cmp byte [eax], 0
je 0xa405e2
push 0x401
lea ecx, [ebp - 0x57c]
push ecx
push eax
mov eax, dword [ebp - 0x600]
mov eax, dword [eax + 0x40]
push dword [eax]
call fcn.00478ea0
add esp, 0x10
sub eax, 0
je 0xa405b1
sub eax, 1
je 0xa40ac4
sub eax, 1
jne 0xa405bf
lea ecx, [ebp - 0x57c]
mov dword [ebp - 0x61c], ecx
jmp 0xa405c1
mov ecx, dword [ebp - 0x620]
mov dword [ebp - 0x61c], ecx
jmp 0xa405c1
xor ecx, ecx
mov eax, esi
mov dword [ebp - 0x608], eax
mov eax, dword [ebp - 0x610]
movzx esi, ax
mov dword [ebp - 0x60c], esi
test ecx, ecx
jne 0xa4068a
jmp 0xa405f2
mov eax, esi
mov dword [ebp - 0x608], eax
mov eax, edx
mov dword [ebp - 0x60c], eax
lea eax, [ebp - 0x614]
mov dword [ebp - 0x614], 0x80
push eax
lea eax, [ebp - 0x5fc]
push eax
mov eax, dword [ebp - 0x600]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0xa4064c
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00a2f720
push eax
push str.getsockname___failed:__s
push ebx
call fcn.00a1e960
add esp, 0x18
jmp 0xa40ac4
push 0x401
lea eax, [ebp - 0x57c]
push eax
lea eax, [ebp - 0x5f8]
push eax
movzx eax, word [ebp - 0x5fc]
push eax
call fcn.00a4cb40
add esp, 0x10
test eax, eax
je 0xa40ac4
lea ecx, [ebp - 0x57c]
mov byte [ebp - 0x601], 0
mov dword [ebp - 0x61c], ecx
lea eax, [ebp - 0x624]
push eax
push 0
push 0
push ecx
push ebx
call fcn.00a23800
add esp, 0x14
cmp eax, 1
jne 0xa406b4
lea eax, [ebp - 0x624]
push eax
push ebx
call fcn.00a14c80
add esp, 8
mov eax, dword [ebp - 0x624]
test eax, eax
je 0xa40aaf
mov esi, dword [eax]
push eax
push ebx
mov dword [ebp - 0x610], esi
call fcn.00a23b20
add esp, 8
test esi, esi
je 0xa40aaf
mov dword [ebp - 0x61c], 0
nop word [eax + eax]
lea eax, [ebp - 0x618]
push eax
mov eax, dword [ebp - 0x600]
movzx eax, byte [eax + 0x44b]
push eax
push 0
push esi
push ebx
call fcn.00a4ae80
add esp, 0x14
test eax, eax
je 0xa40730
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x61c], eax
mov dword [ebp - 0x610], esi
test esi, esi
jne 0xa406f0
jmp 0xa4073a
test esi, esi
jne 0xa40760
mov eax, dword [ebp - 0x61c]
push 0x100
lea ecx, [ebp - 0x178]
push ecx
push eax
call fcn.00a2f720
push eax
push str.socket_failure:__s
push ebx
call fcn.00a1e960
add esp, 0x18
jmp 0xa40ac4
push dword [esi + 0x10]
lea eax, [ebp - 0x5fc]
push dword [esi + 0x18]
push eax
call fcn.00a5af20
mov eax, dword [esi + 0x10]
add esp, 0xc
mov dword [ebp - 0x614], eax
mov eax, dword [ebp - 0x608]
movzx esi, ax
cmp ax, word [ebp - 0x60c]
ja 0xa4086a
cmp word [ebp - 0x5fc], 2
jne 0xa407ac
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x5fa], ax
push dword [ebp - 0x614]
lea eax, [ebp - 0x5fc]
push eax
push dword [ebp - 0x618]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0xa408a7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x601], 0
je 0xa40850
cmp eax, 0x2741
jne 0xa40850
push 0x100
lea eax, [ebp - 0x178]
push eax
push 0x2741
call fcn.00a2f720
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push ebx
call fcn.00a1ea20
add esp, 0x1c
mov dword [ebp - 0x614], 0x80
lea eax, [ebp - 0x614]
push eax
lea eax, [ebp - 0x5fc]
push eax
mov eax, dword [ebp - 0x600]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0xa40620
mov eax, dword [ebp - 0x608]
movzx esi, ax
mov byte [ebp - 0x601], 0
jmp 0xa4085d
cmp eax, 0x2740
je 0xa4085c
cmp eax, 0xd
jne 0xa4087d
inc esi
cmp si, word [ebp - 0x60c]
jbe 0xa40794
push str.bind___failed__we_ran_out_of_ports
push ebx
call fcn.00a1e960
add esp, 8
jmp 0xa40ac4
push 0x100
lea ecx, [ebp - 0x178]
push ecx
push eax
call fcn.00a2f720
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push ebx
call fcn.00a1e960
add esp, 0x1c
jmp 0xa40ac4
cmp si, word [ebp - 0x60c]
ja 0xa4086a
lea eax, [ebp - 0x614]
mov dword [ebp - 0x614], 0x80
push eax
lea eax, [ebp - 0x5fc]
push eax
push dword [ebp - 0x618]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0xa40620
push 1
push dword [ebp - 0x618]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0xa4091a
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00a2f720
push eax
push str.socket_failure:__s
push ebx
call fcn.00a1e960
add esp, 0x18
jmp 0xa40ac4
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x610]
call fcn.00a237d0
add esp, 0xc
cmp edi, 2
je 0xa40997
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x5fc]
mov eax, dword [ebp - 0x600]
cmp byte [eax + 0x1d2], 0
jne 0xa40953
test edi, edi
je 0xa40991
cmp edi, 1
jne 0xa4095e
cmp cx, 2
jne 0xa40991
movzx eax, cx
sub eax, 2
jne 0xa4098b
push dword [ebp - 0x5fa]
call esi
movzx eax, ax
mov dword [ebp - 0x610], eax
test edi, edi
je 0xa40a5e
cmp edi, 1
je 0xa409d7
mov cx, word [ebp - 0x5fc]
mov eax, dword [ebp - 0x600]
inc edi
cmp edi, 2
jne 0xa40946
mov eax, dword [ebp - 0x628]
mov dword [eax + 0x90], edi
lea eax, [ebp - 0x618]
mov edi, dword [ebp - 0x600]
push eax
push 1
push edi
push ebx
call fcn.00a4abd0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0xa40acf
mov dword [ebp - 0x618], 0xffffffff
push 0x1c
jmp 0xa40ad1
lea edx, [ebp - 0x78]
mov ebx, 0x2c
lea esi, [ebp - 0x34]
mov cl, byte [esi]
test cl, cl
je 0xa409f9
cmp cl, 0x2e
movzx eax, cl
cmove eax, ebx
mov byte [edx], al
inc edx
add esi, 1
jne 0xa409e2
mov eax, dword [ebp - 0x610]
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.00a2d9b0
mov ebx, dword [ebp - 0x62c]
lea eax, [ebp - 0x78]
push eax
push str.PORT
push 0xac4da4
push dword [ebp - 0x628]
push ebx
call fcn.00a567e0
mov esi, eax
add esp, 0x28
test esi, esi
je 0xa40997
push esi
call fcn.00a2f8a0
push eax
push str.Failure_sending_PORT_command:__s
push ebx
call fcn.00a1e960
add esp, 0x10
jmp 0xa40ac9
movzx eax, ax
push eax
lea eax, [ebp - 0x34]
push eax
xor eax, eax
cmp word [ebp - 0x5fc], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push dword [ebp - 0x628]
push ebx
call fcn.00a567e0
mov esi, eax
add esp, 0x1c
test esi, esi
je 0xa40997
push esi
call fcn.00a2f8a0
push eax
push str.Failure_sending_EPRT_command:__s
push ebx
call fcn.00a1e960
add esp, 0x10
jmp 0xa40ac9
mov eax, dword [ebp - 0x61c]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ebx
call fcn.00a1e960
add esp, 0xc
mov esi, 0x1e
mov edi, dword [ebp - 0x600]
push 0
push ebx
call fcn.00a3df80
mov eax, dword [ebp - 0x618]
add esp, 8
cmp eax, 0xffffffff
je 0xa40af0
push eax
push edi
push ebx
call fcn.00a4add0
add esp, 0xc
push dword [ebp - 0x620]
call dword [0xae4100]
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, esi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00a0828c
mov esp, ebp
pop ebp
ret