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

Disassembly:
push ebp
lea ebp, [esp - 0x930]
sub esp, 0x9b0
mov eax, dword [0x4d4430]
xor eax, ebp
mov dword [ebp + 0x92c], eax
mov eax, dword [ebp + 0x938]
or dword [ebp - 0x60], 0xffffffff
push ebx
push edi
mov edi, dword [esi]
xor ebx, ebx
push 0xff
mov dword [ebp - 0x7c], eax
lea eax, [ebp + 0x82d]
push ebx
push eax
mov dword [ebp - 0x64], edi
mov byte [ebp + 0x82c], bl
call fcn.0040c970
lea eax, [edi + 0x3a4]
mov edi, dword [eax]
mov dword [ebp - 0x80], ebx
mov eax, dword [eax]
add esp, 0xc
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x78], 1
mov dword [ebp - 0x5c], ebx
cmp eax, ebx
je 0x46a52e
push eax
call fcn.0040b990
pop ecx
cmp eax, 1
jbe 0x46a52e
push edi
call fcn.0040b990
pop ecx
cmp eax, 0x16
jae 0x46a42d
push 0x16
pop eax
jmp 0x46a434
push edi
call fcn.0040b990
pop ecx
inc eax
push 1
push eax
call dword [0x4d5b08]
pop ecx
pop ecx
mov dword [ebp - 0x5c], eax
cmp eax, ebx
jne 0x46a44f
push 0x1b
pop eax
jmp 0x46a877
cmp byte [edi], 0x3a
jne 0x46a459
mov dword [ebp - 0x68], edi
jmp 0x46a486
push 0x3a
push edi
call fcn.00432190
pop ecx
pop ecx
mov dword [ebp - 0x68], eax
cmp eax, ebx
je 0x46a47b
sub eax, edi
push eax
push edi
push dword [ebp - 0x5c]
call fcn.004a94d0
add esp, 0xc
jmp 0x46a486
push edi
push dword [ebp - 0x5c]
call fcn.0040d8f0
pop ecx
pop ecx
cmp dword [ebp - 0x68], ebx
je 0x46a4ef
push 0x3a
push dword [ebp - 0x68]
call fcn.00432190
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x46a4ef
push 0xa
lea eax, [edi + 1]
push ebx
push eax
call fcn.0042d82b
push eax
call fcn.0047307f
movzx eax, ax
push 0x2d
push edi
mov dword [ebp - 0x70], eax
call fcn.00432190
add esp, 0x18
cmp eax, ebx
je 0x46a4dc
push 0xa
inc eax
push ebx
push eax
call fcn.0042d82b
push eax
call fcn.0047307f
add esp, 0x10
movzx eax, ax
jmp 0x46a4e0
movzx eax, word [ebp - 0x70]
mov dword [ebp - 0x74], eax
cmp word [ebp - 0x70], ax
jbe 0x46a4ef
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov eax, dword [ebp - 0x5c]
cmp byte [eax], bl
je 0x46a528
push 0x401
lea ecx, [ebp + 0x428]
push ecx
push eax
push dword [esi + 0x88]
mov eax, dword [esi + 0x4c]
push dword [eax + 4]
call fcn.00477005
add esp, 0x14
sub eax, ebx
je 0x46a523
dec eax
je 0x46a57a
dec eax
jne 0x46a52e
jmp 0x46a5a1
mov edi, dword [ebp - 0x5c]
jmp 0x46a52a
xor edi, edi
cmp edi, ebx
jne 0x46a5a7
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [esi + 0x154]
mov dword [ebp - 0x6c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x46a581
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.0045f9f4
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x64]
call fcn.0045b1fe
add esp, 0x14
cmp dword [ebp - 0x5c], ebx
je 0x46a57a
push dword [ebp - 0x5c]
call dword [0x4d5afc]
pop ecx
push 0x1e
jmp 0x46a449
push 0x401
lea eax, [ebp + 0x428]
push eax
lea eax, [ebp - 0x54]
push eax
movzx eax, word [ebp - 0x58]
push eax
call fcn.0045fc1b
add esp, 0x10
mov dword [ebp - 0x78], ebx
lea edi, [ebp + 0x428]
lea eax, [ebp - 0x80]
push eax
push ebx
push edi
push esi
call fcn.004537ce
add esp, 0x10
cmp eax, 1
jne 0x46a5c7
lea eax, [ebp - 0x80]
push eax
push esi
call fcn.004532e3
pop ecx
pop ecx
mov eax, dword [ebp - 0x80]
cmp eax, ebx
je 0x46a5e0
mov ecx, dword [eax]
push eax
push dword [ebp - 0x64]
mov dword [ebp - 0x68], ecx
call fcn.0045396a
pop ecx
pop ecx
jmp 0x46a5e3
mov dword [ebp - 0x68], ebx
cmp dword [ebp - 0x68], ebx
jne 0x46a5fe
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0x64]
call fcn.0045b1fe
add esp, 0xc
jmp 0x46a56b
cmp dword [ebp - 0x5c], ebx
je 0x46a60d
push dword [ebp - 0x5c]
call dword [0x4d5afc]
pop ecx
or dword [ebp - 0x60], 0xffffffff
mov edi, dword [ebp - 0x68]
mov dword [ebp - 0x5c], ebx
lea eax, [ebp - 0x60]
push eax
push ebx
push edi
push esi
call fcn.0045d4b6
add esp, 0x10
mov dword [ebp - 0x68], eax
cmp eax, ebx
je 0x46a63d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [edi + 0x1c]
mov dword [ebp - 0x5c], eax
cmp edi, ebx
jne 0x46a617
cmp edi, ebx
jne 0x46a660
push dword [ebp - 0x5c]
push esi
call fcn.0045f9f4
push eax
push str.socket_failure:__s
push dword [ebp - 0x64]
call fcn.0045b1fe
add esp, 0x14
jmp 0x46a57a
push dword [edi + 0x10]
lea eax, [ebp - 0x58]
push dword [edi + 0x18]
push eax
call fcn.0040ba20
mov eax, dword [edi + 0x10]
movzx ebx, word [ebp - 0x70]
mov dword [ebp - 0x6c], eax
mov ax, word [ebp - 0x74]
add esp, 0xc
cmp word [ebp - 0x70], ax
ja 0x46a724
cmp word [ebp - 0x58], 2
jne 0x46a69c
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x56], ax
push dword [ebp - 0x6c]
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x60]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x46a71e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x78], 0
je 0x46a707
cmp eax, 0x2741
jne 0x46a707
push eax
push esi
call fcn.0045f9f4
push eax
movzx eax, bx
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0x64]
call fcn.0045b194
add esp, 0x18
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [esi + 0x154]
mov dword [ebp - 0x6c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x46a742
movzx ebx, word [ebp - 0x70]
and dword [ebp - 0x78], eax
jmp 0x46a714
cmp eax, 0x2740
je 0x46a713
cmp eax, 0xd
jne 0x46a76e
inc ebx
cmp bx, word [ebp - 0x74]
jbe 0x46a68a
cmp bx, word [ebp - 0x74]
jbe 0x46a798
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0x64]
call fcn.0045b1fe
push dword [ebp - 0x60]
push esi
call fcn.0045d466
add esp, 0x10
jmp 0x46a57a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.0045f9f4
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x64]
call fcn.0045b1fe
push dword [ebp - 0x60]
push esi
call fcn.0045d466
add esp, 0x1c
jmp 0x46a57a
push eax
push esi
call fcn.0045f9f4
push eax
movzx eax, bx
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x64]
call fcn.0045b1fe
push dword [ebp - 0x60]
push esi
call fcn.0045d466
add esp, 0x20
jmp 0x46a57a
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x60]
mov dword [ebp - 0x6c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x46a742
push 1
push dword [ebp - 0x60]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x46a7db
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.0045f9f4
push eax
push str.socket_failure:__s
jmp 0x46a755
push 0x100
lea eax, [ebp + 0x82c]
push eax
push edi
call fcn.00453582
mov ebx, dword [ebp - 0x7c]
add esp, 0xc
jmp 0x46a833
cmp dword [esi + 0x210], 0
jne 0x46a802
test ebx, ebx
je 0x46a82f
cmp ebx, 1
jne 0x46a80e
cmp word [ebp - 0x58], 2
jne 0x46a82f
movzx eax, word [ebp - 0x58]
dec eax
dec eax
jne 0x46a82f
push dword [ebp - 0x56]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
test ebx, ebx
je 0x46a88e
cmp ebx, 1
je 0x46a8f3
inc ebx
mov dword [ebp - 0x7c], ebx
cmp ebx, 2
jne 0x46a7f5
mov ebx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x7c]
mov dword [esi + 0x468], eax
mov eax, dword [esi + 0x158]
cmp eax, 0xffffffff
je 0x46a858
push eax
push esi
call fcn.0045d466
pop ecx
pop ecx
mov eax, dword [ebp - 0x60]
push 0x1c
mov dword [esi + 0x158], eax
mov dword [esi + 0x1f4], 1
pop eax
mov ecx, esi
call fcn.0046a2c2
mov eax, ebx
mov ecx, dword [ebp + 0x92c]
pop edi
xor ecx, ebp
pop ebx
call fcn.0040c660
add ebp, 0x930
leave
ret
push edi
lea eax, [ebp + 0x82c]
push eax
xor eax, eax
cmp word [ebp - 0x58], 2
lea edi, [esi + 0x400]
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.0047719e
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x46a83b
push ebx
call fcn.0045f280
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0x64]
call fcn.0045b1fe
push dword [ebp - 0x60]
push esi
call fcn.0045d466
mov dword [edi + 0x68], 1
add esp, 0x18
xor eax, eax
jmp 0x46a86e
lea ecx, [ebp + 0x28]
lea edx, [ebp + 0x82c]
mov al, byte [edx]
test al, al
je 0x46a911
cmp al, 0x2e
jne 0x46a90b
mov byte [ecx], 0x2c
jmp 0x46a90d
mov byte [ecx], al
inc ecx
inc edx
jne 0x46a8fc
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.0045e1af
lea eax, [ebp + 0x28]
push eax
push str.PORT
lea eax, [esi + 0x400]
push 0x4bcbd4
push eax
call fcn.0047719e
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x46a83b
push ebx
call fcn.0045f280
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0x64]
call fcn.0045b1fe
push dword [ebp - 0x60]
push esi
call fcn.0045d466
jmp 0x46a8e9