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

Disassembly:
sub esp, 0x9a8
mov eax, dword [0x1315d264]
xor eax, esp
mov dword [esp + 0x9a4], eax
push ebx
push ebp
mov ebp, dword [edi]
push esi
xor ebx, ebx
push 0xff
lea eax, [esp + 0xb1]
push ebx
push eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], 0xffffffff
mov byte [esp + 0xb8], bl
call fcn.130309b0
mov esi, dword [ebp + 0x364]
mov dword [esp + 0x30], ebx
mov eax, dword [ebp + 0x364]
add esp, 0xc
cmp eax, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x28], 1
je 0x1306d080
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1306cf20
sub eax, edx
cmp eax, 1
jbe 0x1306d080
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1306cf40
sub eax, edx
cmp eax, 0x41
jae 0x1306cf57
mov eax, 0x41
jmp 0x1306cf6b
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1306cf60
sub eax, edx
add eax, 1
push 1
push eax
call dword [0x1315e488]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1306cf9d
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x9a4]
xor ecx, esp
call fcn.1303468b
add esp, 0x9a8
ret
mov al, byte [esi]
cmp al, 0x5b
jne 0x1306d0f2
lea ecx, [esi + 1]
push 0x5d
push esi
mov dword [esp + 0x28], ecx
call fcn.1304a550
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x1306d043
mov eax, dword [esp + 0x20]
mov edx, ebp
sub edx, eax
push edx
push eax
push ebx
call fcn.130802b0
add esp, 0xc
test ebp, ebp
je 0x1306d043
push 0x3a
push ebp
call fcn.1304a550
mov esi, eax
add esp, 8
test esi, esi
je 0x1306d043
push 0xa
lea edx, [esi + 1]
push 0
push edx
call fcn.130497a9
push eax
call fcn.13075be0
movzx ebp, ax
push 0x2d
push esi
mov dword [esp + 0x34], ebp
call fcn.1304a550
xor esi, esi
add esp, 0x18
cmp eax, esi
je 0x1306d166
push 0xa
add eax, 1
push esi
push eax
call fcn.130497a9
push eax
call fcn.13075be0
movzx eax, ax
add esp, 0x10
cmp bp, ax
mov dword [esp + 0x14], eax
jbe 0x1306d043
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
cmp byte [ebx], 0
je 0x1306d080
mov edx, dword [edi + 0x70]
mov eax, dword [edi + 0x3c]
push 0x401
lea ecx, [esp + 0x1b0]
push ecx
mov ecx, dword [eax + 4]
push ebx
push edx
push ecx
call fcn.1307c580
add esp, 0x14
sub eax, 0
je 0x1306d172
sub eax, 1
je 0x1306d0d5
sub eax, 1
je 0x1306d1b4
mov ecx, dword [edi + 0x130]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x30]
push eax
push ecx
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1306d176
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.1304c980
mov edx, dword [esp + 0x18]
push eax
push str.getsockname___failed:__s
push edx
call fcn.130570a0
add esp, 0x14
test ebx, ebx
je 0x1306d0d5
push ebx
call dword [0x1315e47c]
add esp, 4
pop esi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a4]
xor ecx, esp
call fcn.1303468b
add esp, 0x9a8
ret
cmp al, 0x3a
jne 0x1306d0fd
mov ebp, esi
jmp 0x1306cfd6
push 0x3a
push esi
call fcn.1304a550
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x1306d14f
lea eax, [esp + 0x2c]
push eax
push esi
push 0x17
call fcn.1305ca70
add esp, 0xc
cmp eax, 1
jne 0x1306d144
xor eax, eax
mov edx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x1306d133
jmp 0x1306d043
mov ecx, ebp
sub ecx, esi
push ecx
push esi
jmp 0x1306cfcd
mov edx, ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x1306d155
jmp 0x1306d043
movzx eax, bp
mov dword [esp + 0x14], eax
jmp 0x1306d043
mov esi, ebx
jmp 0x1306d1bb
movzx eax, word [esp + 0x2c]
cmp eax, 0x17
push 0x401
je 0x1306d195
lea ecx, [esp + 0x1b0]
push ecx
lea edx, [esp + 0x38]
push edx
push eax
jmp 0x1306d1a4
lea eax, [esp + 0x1b0]
push eax
lea ecx, [esp + 0x3c]
push ecx
push 0x17
call fcn.13061690
add esp, 0x10
mov dword [esp + 0x28], 0
lea esi, [esp + 0x1ac]
lea edx, [esp + 0x24]
push edx
push 0
push esi
push edi
call fcn.1304e340
add esp, 0x10
cmp eax, 1
jne 0x1306d1df
lea eax, [esp + 0x24]
push eax
push edi
call fcn.1304d4c0
add esp, 8
mov eax, dword [esp + 0x24]
test eax, eax
je 0x1306d1fb
mov ecx, dword [esp + 0x10]
mov ebp, dword [eax]
push eax
push ecx
call fcn.1304e530
add esp, 8
test ebp, ebp
jne 0x1306d213
mov edx, dword [esp + 0x10]
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edx
call fcn.130570a0
add esp, 0xc
jmp 0x1306d0c7
test ebx, ebx
je 0x1306d221
push ebx
call dword [0x1315e47c]
add esp, 4
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0xc], 0xffffffff
xor esi, esi
lea eax, [esp + 0xc]
push eax
push 0
push ebp
push edi
call fcn.130598b0
add esp, 0x10
test eax, eax
mov dword [esp + 0x20], eax
je 0x1306d257
call ebx
mov ebp, dword [ebp + 0x1c]
test ebp, ebp
mov esi, eax
jne 0x1306d231
jmp 0x1306d25b
test ebp, ebp
jne 0x1306d27a
push esi
push edi
call fcn.1304c980
mov ecx, dword [esp + 0x18]
push eax
push str.socket_failure:__s
push ecx
call fcn.130570a0
add esp, 0x14
jmp 0x1306d0d5
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push edx
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.13030640
mov eax, dword [esp + 0x28]
mov edx, dword [ebp + 0x10]
add esp, 0xc
cmp ax, word [esp + 0x14]
mov dword [esp + 0x18], edx
movzx esi, ax
ja 0x1306d3b1
mov ebx, dword [esp + 0x28]
lea esp, [esp]
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0xc]
mov word [esp + 0x2e], ax
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1306d3aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
je 0x1306d334
cmp eax, 0x2741
jne 0x1306d334
push eax
push edi
call fcn.1304c980
push eax
movzx eax, si
mov esi, dword [esp + 0x1c]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.13057010
mov eax, dword [edi + 0x130]
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1306d350
movzx esi, word [esp + 0x1c]
xor ebx, ebx
jmp 0x1306d343
cmp eax, 0x2740
je 0x1306d340
cmp eax, 0xd
jne 0x1306d37c
add esi, 1
cmp si, word [esp + 0x14]
jbe 0x1306d2b0
jmp 0x1306d3b1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.1304c980
push eax
push str.getsockname___failed:__s
push esi
call fcn.130570a0
mov ecx, dword [esp + 0x20]
push ecx
push edi
call fcn.13059860
add esp, 0x1c
jmp 0x1306d0d5
push eax
push edi
call fcn.1304c980
push eax
mov eax, dword [esp + 0x1c]
movzx edx, si
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.130570a0
mov ecx, dword [esp + 0x24]
push ecx
push edi
call fcn.13059860
add esp, 0x20
jmp 0x1306d0d5
cmp si, word [esp + 0x14]
jbe 0x1306d3d3
mov edx, dword [esp + 0x10]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.130570a0
mov eax, dword [esp + 0x14]
push eax
push edi
call fcn.13059860
add esp, 0x10
jmp 0x1306d0d5
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1306d424
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.1304c980
push eax
push str.getsockname___failed:__s
mov ecx, dword [esp + 0x20]
push ecx
call fcn.130570a0
mov edx, dword [esp + 0x20]
push edx
push edi
call fcn.13059860
add esp, 0x1c
jmp 0x1306d0d5
mov eax, dword [esp + 0xc]
push 1
push eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1306d44a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.1304c980
push eax
push str.socket_failure:__s
jmp 0x1306d407
push pe_nt_image_headers32
lea eax, [esp + 0xb0]
push eax
push ebp
call fcn.1304e0a0
add esp, 0xc
cmp dword [edi + 0x204], 0
jne 0x1306d47c
cmp dword [edi + 0x1dc], 0
je 0x1306d47c
mov dword [edi + 0x204], 1
mov ebp, dword [esp + 0x9b8]
cmp ebp, 2
je 0x1306d4e3
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x2c]
cmp dword [edi + 0x204], 0
jne 0x1306d4a0
test ebp, ebp
je 0x1306d4db
cmp ebp, 1
jne 0x1306d4ab
cmp cx, 2
jne 0x1306d4db
movzx eax, cx
sub eax, 2
je 0x1306d4bf
sub eax, 0x15
jne 0x1306d4db
mov ecx, dword [esp + 0x2e]
push ecx
jmp 0x1306d4c4
mov edx, dword [esp + 0x2e]
push edx
call ebx
test ebp, ebp
movzx esi, ax
je 0x1306d53c
cmp ebp, 1
je 0x1306d5ac
mov cx, word [esp + 0x2c]
add ebp, 1
cmp ebp, 2
jne 0x1306d493
mov ebx, dword [esp + 0x20]
mov dword [edi + 0x450], ebp
mov eax, dword [edi + 0x134]
cmp eax, 0xffffffff
je 0x1306d502
push eax
push edi
call fcn.13059860
add esp, 8
mov eax, dword [esp + 0xc]
mov dword [edi + 0x134], eax
mov dword [edi + 0x1e8], 1
mov eax, 0x1c
mov ecx, edi
call fcn.1306cda0
mov ecx, dword [esp + 0x9b0]
pop esi
pop ebp
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.1303468b
add esp, 0x9a8
ret
xor edx, edx
cmp word [esp + 0x2c], 2
movzx eax, si
setne dl
push eax
lea ecx, [esp + 0xb0]
push ecx
lea esi, [edi + 0x3e8]
add edx, 1
push edx
push str.EPRT
push str._s__d_s_hu
push esi
call fcn.1307b0b0
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x1306d4e7
push ebx
call sym.CliExt.dll_curl_easy_strerror
push eax
mov eax, dword [esp + 0x18]
push str.Failure_sending_EPRT_command:__s
push eax
call fcn.130570a0
mov ecx, dword [esp + 0x1c]
push ecx
push edi
call fcn.13059860
add esp, 0x18
mov dword [esi + 0x68], 1
xor eax, eax
jmp 0x1306d51b
lea ecx, [esp + 0x5b0]
lea edx, [esp + 0xac]
lea ebx, [ebx]
mov al, byte [edx]
test al, al
je 0x1306d5d9
cmp al, 0x2e
jne 0x1306d5cf
mov byte [ecx], 0x2c
jmp 0x1306d5d1
mov byte [ecx], al
add ecx, 1
add edx, 1
jne 0x1306d5c0
movzx eax, si
mov edx, eax
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call sym.CliExt.dll_curl_msnprintf
lea eax, [esp + 0x5c4]
push eax
push str.PORT
lea eax, [edi + 0x3e8]
push 0x13118660
push eax
call fcn.1307b0b0
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x1306d4e7
push ebx
call sym.CliExt.dll_curl_easy_strerror
mov ecx, dword [esp + 0x14]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.130570a0
mov edx, dword [esp + 0x1c]
push edx
push edi
call fcn.13059860
add esp, 0x18
xor eax, eax
jmp 0x1306d51b