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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9bc
mov eax, dword [0x10115770]
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 - 0x9bc], edi
push 0
mov esi, dword [edi]
mov ebx, edx
push eax
mov dword [ebp - 0x9a4], esi
call fcn.10068f30
mov esi, dword [esi + 0x324]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x9ac], 0
mov dword [ebp - 0x9b4], 0
mov dword [ebp - 0x9b0], 0
mov byte [ebp - 0x99d], 1
mov dword [ebp - 0x99c], eax
test esi, esi
je 0x1004f0a3
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004ef15
sub ecx, edx
cmp ecx, 1
jbe 0x1004f0a3
mov ecx, esi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004ef30
sub ecx, edx
cmp ecx, 0x16
jae 0x1004ef45
mov ecx, 0x16
jmp 0x1004ef59
mov ecx, esi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004ef50
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x1011754c]
add esp, 8
mov dword [ebp - 0x99c], eax
test eax, eax
jne 0x1004ef88
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100626a1
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
je 0x1004efc1
push 0x3a
push esi
call fcn.100669e0
add esp, 8
mov dword [ebp - 0x9b8], eax
test eax, eax
je 0x1004f05d
mov ecx, eax
mov eax, dword [ebp - 0x99c]
sub ecx, esi
push ecx
push esi
push eax
call fcn.10067270
mov esi, dword [ebp - 0x9b8]
add esp, 0xc
test esi, esi
je 0x1004f072
push 0x3a
push esi
call fcn.100669e0
mov esi, eax
add esp, 8
test esi, esi
je 0x1004f072
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.100670d3
add esp, 0xc
mov ecx, eax
call fcn.10043ab0
movzx eax, ax
push 0x2d
push esi
mov dword [ebp - 0x9b4], eax
call fcn.100669e0
add esp, 8
test eax, eax
je 0x1004f04c
push 0xa
inc eax
push 0
push eax
call fcn.100670d3
add esp, 0xc
mov ecx, eax
call fcn.10043ab0
mov ecx, dword [ebp - 0x9b4]
movzx eax, ax
mov dword [ebp - 0x9b0], eax
cmp cx, ax
jbe 0x1004f072
mov dword [ebp - 0x9b0], 0
mov dword [ebp - 0x9b4], 0
jmp 0x1004f072
mov ecx, dword [ebp - 0x9b4]
movzx eax, cx
mov dword [ebp - 0x9b0], eax
jmp 0x1004f072
mov ecx, dword [ebp - 0x99c]
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x1004f065
mov esi, dword [ebp - 0x99c]
cmp byte [esi], 0
je 0x1004f0a5
sub esp, 0x10
call fcn.100272a0
add esp, 0x10
sub eax, 0
je 0x1004f09c
dec eax
je 0x1004f671
dec eax
jne 0x1004f0a5
jmp 0x1004f11e
mov eax, esi
jmp 0x1004f124
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 0x1004f0f6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.100588e0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
add esp, 0xc
push esi
jmp 0x1004f668
movzx ecx, word [ebp - 0x998]
lea eax, [ebp - 0x510]
push 0x401
push eax
lea edx, [ebp - 0x994]
call fcn.100581f0
add esp, 8
mov byte [ebp - 0x99d], 0
lea eax, [ebp - 0x510]
lea ecx, [ebp - 0x9ac]
mov dword [ebp - 0x9a8], eax
push ecx
push 0
mov edx, eax
mov ecx, edi
call fcn.10039810
add esp, 8
cmp eax, 1
jne 0x1004f151
lea edx, [ebp - 0x9ac]
mov ecx, edi
call fcn.1003a080
mov edx, dword [ebp - 0x9ac]
test edx, edx
je 0x1004f648
mov esi, dword [edx]
mov ecx, dword [ebp - 0x9a4]
mov dword [ebp - 0x9ac], esi
call fcn.100399a0
test esi, esi
je 0x1004f648
mov eax, dword [ebp - 0x99c]
push eax
call dword [0x10117554]
add esp, 4
mov dword [ebp - 0x99c], 0xffffffff
mov dword [ebp - 0x9a8], 0
mov edi, edi
lea eax, [ebp - 0x99c]
mov edx, esi
push eax
push 0
mov ecx, edi
call fcn.10039380
add esp, 8
mov dword [ebp - 0x9b8], eax
test eax, eax
je 0x1004f1da
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x9a8], eax
mov dword [ebp - 0x9ac], esi
test esi, esi
jne 0x1004f1a0
jmp 0x1004f1e4
test esi, esi
jne 0x1004f206
mov eax, dword [ebp - 0x9a8]
mov edx, eax
mov ecx, edi
call fcn.100588e0
push eax
push str.socket_failure:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
add esp, 0xc
jmp 0x1004f671
push dword [esi + 0x10]
lea eax, [ebp - 0x998]
push dword [esi + 0x18]
push eax
call fcn.10068fc0
mov eax, dword [esi + 0x10]
add esp, 0xc
mov dword [ebp - 0x914], eax
mov eax, dword [ebp - 0x9b4]
movzx esi, ax
cmp ax, word [ebp - 0x9b0]
ja 0x1004f305
lea ebx, [ebx]
cmp word [ebp - 0x998], 2
jne 0x1004f258
push esi
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 - 0x99c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1004f38d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x99d], 0
je 0x1004f2eb
cmp eax, 0x2741
jne 0x1004f2eb
mov edx, eax
mov ecx, edi
call fcn.100588e0
push eax
movzx eax, si
mov esi, dword [ebp - 0x9a4]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.1003aa60
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 0x1004f32a
mov eax, dword [ebp - 0x9b4]
movzx esi, ax
mov byte [ebp - 0x99d], 0
jmp 0x1004f2f8
cmp eax, 0x2740
je 0x1004f2f7
cmp eax, 0xd
jne 0x1004f35a
inc esi
cmp si, word [ebp - 0x9b0]
jbe 0x1004f240
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0x9a4]
call fcn.1003aae0
mov edx, dword [ebp - 0x99c]
add esp, 8
mov ecx, edi
call fcn.10039330
jmp 0x1004f671
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.100588e0
push eax
push str.getsockname___failed:__s
push esi
call fcn.1003aae0
mov edx, dword [ebp - 0x99c]
add esp, 0xc
mov ecx, edi
call fcn.10039330
jmp 0x1004f671
mov edx, eax
mov ecx, edi
call fcn.100588e0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
mov edx, dword [ebp - 0x99c]
add esp, 0x10
mov ecx, edi
call fcn.10039330
jmp 0x1004f671
cmp si, word [ebp - 0x9b0]
ja 0x1004f305
mov esi, dword [ebp - 0x99c]
lea eax, [ebp - 0x914]
push eax
lea eax, [ebp - 0x998]
mov dword [ebp - 0x914], 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1004f3f4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.100588e0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
add esp, 0xc
mov edx, esi
mov ecx, edi
call fcn.10039330
jmp 0x1004f671
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1004f432
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.100588e0
push eax
push str.socket_failure:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
add esp, 0xc
mov edx, esi
mov ecx, edi
call fcn.10039330
jmp 0x1004f671
mov ecx, dword [ebp - 0x9ac]
lea edx, [ebp - 0x108]
push 0x100
call fcn.100394a0
add esp, 4
cmp ebx, 2
je 0x1004f4ab
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x998]
lea ecx, [ecx]
cmp byte [edi + 0x1d1], 0
jne 0x1004f46d
test ebx, ebx
je 0x1004f4a5
cmp ebx, 1
jne 0x1004f478
cmp cx, 2
jne 0x1004f4a5
movzx eax, cx
sub eax, 2
jne 0x1004f4a5
push dword [ebp - 0x996]
call esi
movzx eax, ax
mov dword [ebp - 0x9a8], eax
test ebx, ebx
je 0x1004f5bd
cmp ebx, 1
je 0x1004f4fb
mov cx, word [ebp - 0x998]
inc ebx
cmp ebx, 2
jne 0x1004f460
mov esi, dword [ebp - 0x9b8]
mov dword [edi + 0x3fc], ebx
mov edx, dword [edi + 0x158]
cmp edx, 0xffffffff
je 0x1004f4c9
mov ecx, edi
call fcn.10039330
mov eax, dword [ebp - 0x99c]
mov edx, 0x1c
mov ecx, edi
mov dword [edi + 0x158], eax
mov byte [edi + 0x1ca], 1
call fcn.1004ecd0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100626a1
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x910]
mov edi, 0x2c
lea esi, [ebp - 0x108]
lea esp, [esp]
mov cl, byte [esi]
test cl, cl
je 0x1004f525
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
inc esi
jne 0x1004f510
mov eax, dword [ebp - 0x9a8]
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.10046890
mov edi, dword [ebp - 0x9bc]
lea eax, [ebp - 0x910]
add esp, 0x14
push eax
push str.PORT
lea eax, [edi + 0x3a0]
push 0x1010c5cc
push eax
call fcn.1005cb90
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1004f4b1
mov ecx, esi
call fcn.10058220
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
mov edx, dword [ebp - 0x99c]
add esp, 0xc
mov ecx, edi
call fcn.10039330
xor edx, edx
mov ecx, edi
call fcn.1004ecd0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100626a1
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.1005cb90
mov esi, eax
add esp, 0x18
test esi, esi
je 0x1004f4b1
mov ecx, esi
call fcn.10058220
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
mov edx, dword [ebp - 0x99c]
add esp, 0xc
mov ecx, edi
call fcn.10039330
xor edx, edx
mov dword [edi + 0x3fc], 1
mov ecx, edi
call fcn.1004ecd0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100626a1
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x9a8]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0x9a4]
call fcn.1003aae0
mov eax, dword [ebp - 0x99c]
add esp, 0xc
push eax
call dword [0x10117554]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, 0x1e
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100626a1
mov esp, ebp
pop ebp
ret