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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x2f
push 0
mov dword [ebp - 0xc], 0xffffffff
mov ebx, dword [edi + 0xc]
mov dword [ebp - 8], ebx
lea eax, [ebx + 0x310]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0xd8]
push eax
call fcn.10054670
mov esi, dword [edi + 0x548]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov byte [ebp - 1], 1
test esi, esi
je 0x1001fc5f
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001fa50
sub ecx, edx
cmp ecx, 1
jbe 0x1001fc5f
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001fa67
sub ecx, edx
cmp ecx, 0x41
jae 0x1001fa7c
mov ecx, 0x41
jmp 0x1001fa8a
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001fa81
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x100c2018]
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x1001faac
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [esi]
cmp al, 0x5b
jne 0x1001fae4
push 0x5d
push esi
call fcn.100547d0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1001fad6
lea ecx, [esi + 1]
sub eax, ecx
push eax
mov eax, dword [ebp - 0x10]
push ecx
push eax
call fcn.1005eb70
add esp, 0xc
xor esi, esi
xor edx, edx
test ebx, ebx
je 0x1001fbb1
jmp 0x1001fb41
cmp al, 0x3a
jne 0x1001faec
mov ebx, esi
jmp 0x1001fb41
push 0x3a
push esi
call fcn.100547d0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1001fb97
lea eax, [ebp - 0xa8]
push eax
push esi
push 0x17
call fcn.1002e590
add esp, 0xc
cmp eax, 1
jne 0x1001fb2f
mov ecx, dword [ebp - 0x10]
sub ecx, esi
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x1001fb20
jmp 0x1001fbad
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp - 0x10]
push esi
push eax
call fcn.1005eb70
add esp, 0xc
push 0x3a
push ebx
call fcn.100547d0
mov ebx, eax
add esp, 8
xor esi, esi
xor edx, edx
test ebx, ebx
je 0x1001fbb1
push 0xa
push edx
lea ecx, [ebx + 1]
push ecx
call fcn.1005c2f5
push eax
call fcn.10050e80
push 0x2d
push ebx
movzx esi, ax
call fcn.100547d0
add esp, 0x18
test eax, eax
je 0x1001fb93
push 0xa
inc eax
push 0
push eax
call fcn.1005c2f5
push eax
call fcn.10050e80
add esp, 0x10
movzx edx, ax
jmp 0x1001fbb1
mov edx, esi
jmp 0x1001fbb1
mov ecx, dword [ebp - 0x10]
sub ecx, esi
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x1001fba0
xor esi, esi
xor edx, edx
xor ecx, ecx
movzx eax, dx
cmp si, dx
cmovbe ecx, eax
movzx eax, si
movzx ebx, cx
xor ecx, ecx
cmp si, dx
mov dword [ebp - 0x28], ebx
mov esi, dword [ebp - 0x10]
cmovbe ecx, eax
movzx eax, cx
mov dword [ebp - 0x14], eax
cmp byte [esi], 0
je 0x1001fc4e
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x620]
push 0x401
push eax
push esi
mov eax, dword [ebx + 0x48]
push dword [ebx + 0x54]
push dword [eax + 0x18]
call fcn.1002c1b0
add esp, 4
push eax
mov eax, dword [ebx + 0x48]
push dword [eax + 4]
call sym.libcurl.dll_curl_pushheader_byname
add esp, 0x18
sub eax, 0
je 0x1001fc29
sub eax, 1
je 0x100201c3
sub eax, 1
jne 0x1001fc30
lea ecx, [ebp - 0x620]
mov dword [ebp - 0x18], ecx
jmp 0x1001fc32
mov ecx, esi
mov dword [ebp - 0x18], ecx
jmp 0x1001fc32
xor ecx, ecx
mov eax, dword [ebp - 0x14]
movzx edx, ax
mov eax, dword [ebp - 0x28]
movzx eax, ax
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
test ecx, ecx
jne 0x1001fd06
jmp 0x1001fc61
movzx eax, ax
mov dword [ebp - 0x14], eax
movzx eax, bx
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x10], eax
jmp 0x1001fc61
xor esi, esi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x80
push eax
lea eax, [ebp - 0xa8]
push eax
push dword [ebx + 0x150]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1001fcbd
push 0x100
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10043f90
push eax
push str.getsockname___failed:__s
push edi
call fcn.1003bde0
push esi
call dword [0x100c200c]
add esp, 0x1c
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp word [ebp - 0xa8], 0x17
lea edx, [ebp - 0xa0]
movzx eax, word [ebp - 0xa8]
lea ecx, [ebp - 0xa4]
cmove ecx, edx
lea edx, [ebp - 0x620]
push 0x401
push edx
push ecx
push eax
call fcn.1002e260
add esp, 0x10
test eax, eax
je 0x100201c3
lea ecx, [ebp - 0x620]
mov byte [ebp - 1], 0
mov dword [ebp - 0x18], ecx
lea eax, [ebp - 0x24]
push eax
push 0
push 0
push ecx
push edi
call fcn.10024410
add esp, 0x14
cmp eax, 1
jne 0x1001fd2a
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.10001f40
add esp, 8
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x100201aa
mov ebx, dword [eax]
push eax
push edi
call fcn.10024700
add esp, 8
test ebx, ebx
je 0x100201aa
push esi
call dword [0x100c200c]
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
add esp, 4
nop dword [eax]
lea eax, [ebp - 0xc]
push eax
push 0
push ebx
push edi
call fcn.10003d30
add esp, 0x10
mov dword [ebp - 0x18], eax
test eax, eax
je 0x1001fdab
call esi
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x1001fd60
push 0x100
lea ecx, [ebp - 0x21c]
push ecx
push eax
call fcn.10043f90
push eax
push str.socket_failure:__s
push edi
call fcn.1003bde0
add esp, 0x18
lea eax, [ebx + 0x1e]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebx + 0x10]
lea eax, [ebp - 0xa8]
push dword [ebx + 0x18]
push eax
call fcn.100540f0
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
cmp ax, word [ebp - 0x10]
movzx esi, ax
ja 0x10020184
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [ebp - 0x1c]
movzx eax, ax
mov word [ebp - 0xa6], ax
lea eax, [ebp - 0xa8]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1001ff07
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 1], 0
je 0x1001fe77
cmp eax, 0x2741
jne 0x1001fe77
push 0x100
lea eax, [ebp - 0x21c]
push eax
push 0x2741
call fcn.10043f90
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.1003be80
mov esi, dword [ebp - 8]
lea eax, [ebp - 0x1c]
add esp, 0x1c
mov dword [ebp - 0x1c], 0x80
push eax
lea eax, [ebp - 0xa8]
push eax
push dword [esi + 0x150]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1001fe8d
mov eax, dword [ebp - 0x14]
movzx esi, ax
cmp si, word [ebp - 0x10]
mov byte [ebp - 1], 0
jmp 0x1001fdd0
cmp eax, 0x2740
je 0x1001fe83
cmp eax, 0xd
jne 0x1001feca
inc esi
cmp si, word [ebp - 0x10]
jmp 0x1001fdd0
push 0x100
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10043f90
push eax
push str.getsockname___failed:__s
push edi
call fcn.1003bde0
push dword [ebp - 0xc]
push esi
push edi
call fcn.100031e0
add esp, 0x24
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x100
lea ecx, [ebp - 0x21c]
push ecx
push eax
call fcn.10043f90
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.1003bde0
push dword [ebp - 0xc]
push dword [ebp - 8]
push edi
call fcn.100031e0
add esp, 0x28
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp si, word [ebp - 0x10]
ja 0x10020184
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x80
push eax
lea eax, [ebp - 0xa8]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1001ff6f
push 0x100
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10043f90
push eax
push str.getsockname___failed:__s
push edi
call fcn.1003bde0
push dword [ebp - 0xc]
push dword [ebp - 8]
push edi
call fcn.100031e0
add esp, 0x24
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1001ff9e
push 0x100
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10043f90
push eax
push str.socket_failure:__s
jmp 0x1001ff4e
push 0x2f
lea eax, [ebp - 0xd8]
push eax
push ebx
call fcn.100243c0
mov eax, dword [ebp - 8]
add esp, 0xc
cmp byte [eax + 0x25f], 0
jne 0x1001ffcc
cmp byte [eax + 0x258], 0
je 0x1001ffcc
mov byte [eax + 0x25f], 1
mov esi, dword [ebp + 0xc]
cmp esi, 2
je 0x10020031
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0xa8]
cmp byte [eax + 0x25f], 0
jne 0x1001ffee
test esi, esi
je 0x1002002b
cmp esi, 1
jne 0x1001fff9
cmp cx, 2
jne 0x1002002b
movzx eax, cx
sub eax, 2
je 0x10020006
sub eax, 0x15
jne 0x10020028
push dword [ebp - 0xa6]
call ebx
movzx eax, ax
mov dword [ebp - 0x14], eax
test esi, esi
je 0x1002010b
cmp esi, 1
je 0x10020066
mov cx, word [ebp - 0xa8]
mov eax, dword [ebp - 8]
inc esi
cmp esi, 2
jne 0x1001ffe1
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 8]
push ebx
push edi
mov dword [eax + 0x78], esi
call fcn.1001d740
mov eax, dword [ebp - 0xc]
push 0x1c
push edi
mov dword [ebx + 0x154], eax
mov byte [ebx + 0x249], 1
call fcn.1001d720
mov eax, dword [ebp - 0x18]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x11c]
mov edi, 0x2c
lea ebx, [ebp - 0xd8]
mov cl, byte [ebx]
test cl, cl
je 0x1002008e
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
add ebx, 1
jne 0x10020077
mov eax, dword [ebp - 0x14]
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 sym.libcurl.dll_curl_msnprintf
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x11c]
push eax
push str.PORT
push 0x100b0b60
push dword [ebp - 0x20]
push edi
call fcn.100381c0
mov ebx, eax
add esp, 0x28
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x10020031
push ebx
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.1003bde0
push dword [ebp - 0xc]
push dword [ebp - 8]
push edi
call fcn.100031e0
push 0
push edi
call fcn.1001d720
add esp, 0x24
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, ax
push eax
lea eax, [ebp - 0xd8]
push eax
xor eax, eax
cmp word [ebp - 0xa8], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push dword [ebp - 0x20]
push edi
call fcn.100381c0
mov ebx, eax
add esp, 0x1c
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x10020031
push ebx
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.1003bde0
push dword [ebp - 0xc]
push dword [ebp - 8]
push edi
call fcn.100031e0
mov eax, dword [ebp - 0x20]
push 0
push edi
mov dword [eax + 0x78], 1
call fcn.1001d720
add esp, 0x24
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.bind___failed__we_ran_out_of_ports
push edi
call fcn.1003bde0
push dword [ebp - 0xc]
push dword [ebp - 8]
push edi
call fcn.100031e0
add esp, 0x14
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.1003bde0
push esi
call dword [0x100c200c]
add esp, 0x10
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov esp, ebp
pop ebp
ret