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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 0x108], 0
push 0xff
lea eax, [ebp - 0x107]
mov dword [ebp - 0xa48], edi
push 0
mov esi, dword [edi]
mov ebx, edx
push eax
mov dword [ebp - 0xa38], esi
call sub.MSVCR120.dll_memset
mov esi, dword [esi + 0x324]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0xa2c], 0
mov dword [ebp - 0xa40], 0
mov cl, 1
mov dword [ebp - 0xa3c], 0
mov byte [ebp - 0xa2d], cl
mov dword [ebp - 0xa34], eax
test esi, esi
je 0x459eef
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x459d86
sub ecx, edx
cmp ecx, 1
jbe 0x459eef
mov ecx, esi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x459da0
sub ecx, edx
cmp ecx, 0x16
jae 0x459db5
mov ecx, 0x16
jmp 0x459dc9
mov ecx, esi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x459dc0
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x5007a8]
add esp, 8
mov dword [ebp - 0xa34], eax
test eax, eax
jne 0x459df8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
mov eax, dword [sym.imp.MSVCR120.dll_strchr]
je 0x459e39
push 0x3a
push esi
call eax
add esp, 8
mov dword [ebp - 0xa44], eax
test eax, eax
je 0x459ec7
mov ecx, eax
mov eax, dword [ebp - 0xa34]
sub ecx, esi
push ecx
push esi
push eax
call dword [sym.imp.MSVCR120.dll_strncpy]
mov esi, dword [ebp - 0xa44]
add esp, 0xc
mov eax, dword [sym.imp.MSVCR120.dll_strchr]
test esi, esi
je 0x459edd
push 0x3a
push esi
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x459edd
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call dword [sym.imp.MSVCR120.dll_strtoul]
add esp, 0xc
movzx eax, ax
mov dword [ebp - 0xa40], eax
push 0x2d
push esi
call dword [sym.imp.MSVCR120.dll_strchr]
add esp, 8
test eax, eax
je 0x459eb6
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.MSVCR120.dll_strtoul]
mov ecx, dword [ebp - 0xa40]
add esp, 0xc
movzx eax, ax
mov dword [ebp - 0xa3c], eax
cmp cx, ax
jbe 0x459edd
mov dword [ebp - 0xa3c], 0
mov dword [ebp - 0xa40], 0
jmp 0x459edd
mov ecx, dword [ebp - 0xa40]
movzx eax, cx
mov dword [ebp - 0xa3c], eax
jmp 0x459edd
mov ecx, dword [ebp - 0xa34]
sub ecx, esi
nop
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x459ed0
mov esi, dword [ebp - 0xa34]
cmp byte [esi], 0
je 0x459ef1
mov eax, esi
jmp 0x459f82
xor esi, esi
lea eax, [ebp - 0x914]
mov dword [ebp - 0x914], 0x80
push eax
lea eax, [ebp - 0x998]
push eax
push dword [edi + 0x154]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x459f42
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004647f0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa38]
call fcn.004437f0
add esp, 0xc
push esi
jmp 0x45a500
movzx eax, word [ebp - 0x998]
sub eax, 2
je 0x459f5b
push 0x273f
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x459f74
push 0x401
lea edx, [ebp - 0x510]
lea ecx, [ebp - 0x994]
call fcn.00464080
add esp, 4
xor cl, cl
lea eax, [ebp - 0x510]
mov byte [ebp - 0xa2d], cl
lea ecx, [ebp - 0xa2c]
mov dword [ebp - 0xa44], eax
push ecx
push 0
mov edx, eax
mov ecx, edi
call fcn.00442280
add esp, 8
cmp eax, 1
jne 0x459faf
lea edx, [ebp - 0xa2c]
mov ecx, edi
call fcn.00442bd0
mov edx, dword [ebp - 0xa2c]
test edx, edx
je 0x45a4e0
mov ecx, dword [ebp - 0xa38]
mov esi, dword [edx]
call fcn.00442400
test esi, esi
je 0x45a4e0
mov eax, dword [ebp - 0xa34]
push eax
call dword [0x5007b0]
add esp, 4
mov ecx, 0x80
jmp 0x459ff0
mov eax, dword [esi + 4]
mov dword [ebp - 0xa28], eax
mov eax, dword [edi + 0x8c]
cmp eax, 2
mov dword [ebp - 0xa24], eax
mov eax, 0x11
je 0x45a012
mov eax, dword [esi + 0xc]
mov dword [ebp - 0xa20], eax
mov eax, dword [esi + 0x10]
cmp eax, 0x80
cmova eax, ecx
push eax
push dword [esi + 0x18]
mov dword [ebp - 0xa1c], eax
lea eax, [ebp - 0xa18]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [edi]
add esp, 0xc
mov ecx, dword [eax + 0x1a0]
test ecx, ecx
je 0x45a05e
lea edx, [ebp - 0xa28]
push edx
push 0
push dword [eax + 0x1a4]
call ecx
add esp, 0xc
jmp 0x45a076
push dword [ebp - 0xa20]
push dword [ebp - 0xa24]
push dword [ebp - 0xa28]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0xa2c], eax
cmp eax, 0xffffffff
jne 0x45a0b9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
mov ecx, 0x80
test esi, esi
jne 0x459ff0
mov edx, eax
mov ecx, edi
call fcn.004647f0
push eax
push str.socket_failure:__s
push dword [ebp - 0xa38]
call fcn.004437f0
add esp, 0xc
jmp 0x45a509
push dword [esi + 0x10]
lea eax, [ebp - 0x998]
push dword [esi + 0x18]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [esi + 0x10]
add esp, 0xc
mov ecx, dword [ebp - 0xa40]
mov dword [ebp - 0x914], eax
movzx eax, cx
mov dword [ebp - 0xa34], eax
cmp cx, word [ebp - 0xa3c]
ja 0x45a1ca
cmp word [ebp - 0x998], 2
jne 0x45a10b
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x996], ax
push dword [ebp - 0x914]
lea eax, [ebp - 0x998]
push eax
push dword [ebp - 0xa2c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x45a25d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0xa2d], 0
je 0x45a1a4
cmp eax, 0x2741
jne 0x45a1a4
mov edx, eax
mov ecx, edi
call fcn.004647f0
push eax
mov eax, dword [ebp - 0xa34]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0xa38]
call fcn.00443730
add esp, 0x10
mov dword [ebp - 0x914], 0x80
lea eax, [ebp - 0x914]
push eax
lea eax, [ebp - 0x998]
push eax
push dword [edi + 0x154]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x45a1ef
mov eax, dword [ebp - 0xa40]
xor cl, cl
movzx eax, ax
mov byte [ebp - 0xa2d], cl
jmp 0x45a1b7
cmp eax, 0x2740
je 0x45a1b0
cmp eax, 0xd
jne 0x45a224
mov eax, dword [ebp - 0xa34]
inc eax
mov dword [ebp - 0xa34], eax
cmp ax, word [ebp - 0xa3c]
jbe 0x45a0f3
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0xa38]
call fcn.004437f0
mov edx, dword [ebp - 0xa2c]
add esp, 8
mov ecx, edi
call fcn.00441d90
jmp 0x45a509
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004647f0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa38]
call fcn.004437f0
mov edx, dword [ebp - 0xa2c]
add esp, 0xc
mov ecx, edi
call fcn.00441d90
jmp 0x45a509
mov edx, eax
mov ecx, edi
call fcn.004647f0
push eax
mov eax, dword [ebp - 0xa34]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0xa38]
call fcn.004437f0
mov edx, dword [ebp - 0xa2c]
add esp, 0x10
mov ecx, edi
call fcn.00441d90
jmp 0x45a509
mov eax, dword [ebp - 0xa34]
cmp ax, word [ebp - 0xa3c]
ja 0x45a1ca
lea eax, [ebp - 0x914]
mov dword [ebp - 0x914], 0x80
push eax
lea eax, [ebp - 0x998]
push eax
push dword [ebp - 0xa2c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x45a1ef
push 1
push dword [ebp - 0xa2c]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x45a2c8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004647f0
push eax
push str.socket_failure:__s
jmp 0x45a204
mov eax, dword [esi + 4]
sub eax, 2
jne 0x45a2e9
mov ecx, dword [esi + 0x18]
lea edx, [ebp - 0x108]
add ecx, 4
push 0x100
call fcn.00464080
add esp, 4
cmp ebx, 2
je 0x45a34b
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x998]
jmp 0x45a300
cmp byte [edi + 0x1d1], 0
jne 0x45a30d
test ebx, ebx
je 0x45a345
cmp ebx, 1
jne 0x45a318
cmp cx, 2
jne 0x45a345
movzx eax, cx
sub eax, 2
jne 0x45a345
push dword [ebp - 0x996]
call esi
movzx eax, ax
mov dword [ebp - 0xa44], eax
test ebx, ebx
je 0x45a454
cmp ebx, 1
je 0x45a395
mov cx, word [ebp - 0x998]
inc ebx
cmp ebx, 2
jne 0x45a300
xor esi, esi
mov dword [edi + 0x3fc], ebx
mov edx, dword [edi + 0x158]
cmp edx, 0xffffffff
je 0x45a365
mov ecx, edi
call fcn.00441d90
mov eax, dword [ebp - 0xa2c]
mov dword [edi + 0x158], eax
mov eax, esi
mov byte [edi + 0x1ca], 1
mov dword [edi + 0x408], 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x910]
mov edi, 0x2c
lea esi, [ebp - 0x108]
mov cl, byte [esi]
test cl, cl
je 0x45a3bb
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
inc esi
jne 0x45a3a6
mov eax, dword [ebp - 0xa44]
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.004506b0
mov edi, dword [ebp - 0xa48]
lea eax, [ebp - 0x910]
add esp, 0x14
push eax
push str.PORT
lea eax, [edi + 0x3a0]
push 0x4f36a8
push eax
call fcn.00468bd0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x45a34d
mov ecx, esi
call fcn.00464120
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0xa38]
call fcn.004437f0
mov edx, dword [ebp - 0xa2c]
add esp, 0xc
mov ecx, edi
call fcn.00441d90
mov dword [edi + 0x408], 0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
movzx eax, ax
push eax
lea eax, [ebp - 0x108]
push eax
xor eax, eax
cmp word [ebp - 0x998], 2
setne al
inc eax
push eax
push str.EPRT
lea eax, [edi + 0x3a0]
push str._s__d_s_hu
push eax
call fcn.00468bd0
mov esi, eax
add esp, 0x18
test esi, esi
je 0x45a34d
mov ecx, esi
call fcn.00464120
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0xa38]
call fcn.004437f0
mov edx, dword [ebp - 0xa2c]
add esp, 0xc
mov ecx, edi
call fcn.00441d90
mov dword [edi + 0x3fc], 1
mov eax, esi
mov dword [edi + 0x408], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046bea8
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xa44]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0xa38]
call fcn.004437f0
mov eax, dword [ebp - 0xa34]
add esp, 0xc
push eax
call dword [0x5007b0]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, 0x1e
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046bea8
mov esp, ebp
pop ebp
ret