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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x970]
sub rsp, 0xa70
mov rax, qword [0x1401980c8]
xor rax, rsp
mov qword [rbp + 0x960], rax
mov r13, qword [rcx]
mov r12d, edx
mov rbx, rcx
xor edx, edx
lea rcx, [rbp + 0x50]
mov r8d, 0x100
call fcn.1400921f0
mov rdi, qword [r13 + 0xc28]
xor esi, esi
or r8, 0xffffffffffffffff
mov qword [rsp + 0x40], rsi
mov word [rsp + 0x34], si
mov r15d, esi
mov word [rsp + 0x32], si
mov r14d, esi
lea edx, [rsi + 1]
mov byte [rsp + 0x30], dl
test rdi, rdi
je 0x1400371a1
mov rax, r8
inc rax
cmp byte [rdi + rax], sil
jne 0x14003705b
cmp rax, rdx
jbe 0x1400371a1
mov rax, r8
inc rax
cmp byte [rdi + rax], sil
jne 0x140037070
mov ecx, reloc.WLDAP32.dll_Ordinal_22
cmp rax, rcx
jb 0x14003708f
mov rcx, r8
inc rcx
cmp byte [rdi + rcx], sil
jne 0x140037086
inc rcx
call qword [case.0x1400493c8.1]
mov r14, rax
test rax, rax
jne 0x1400370a9
lea eax, [r14 + 0x1b]
jmp 0x14003763e
cmp byte [rdi], 0x3a
jne 0x1400370b3
mov rsi, rdi
jmp 0x1400370ea
mov edx, reloc.OLEAUT32.dll_VarI4FromI2
mov rcx, rdi
call fcn.140091f40
mov rsi, rax
mov rcx, r14
test rax, rax
je 0x1400370db
mov r8, rax
mov rdx, rdi
sub r8, rdi
call fcn.1400d5570
jmp 0x1400370ea
sub rcx, rdi
mov al, byte [rdi]
mov byte [rcx + rdi], al
inc rdi
test al, al
jne 0x1400370de
test rsi, rsi
je 0x14003714f
mov edx, reloc.OLEAUT32.dll_VarI4FromI2
mov rcx, rsi
call fcn.140091f40
mov rdi, rax
test rax, rax
je 0x14003714f
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call fcn.1400c326c
mov ecx, eax
call fcn.140011580
mov edx, reloc.WLDAP32.dll_Ordinal_45
mov rcx, rdi
movzx esi, ax
call fcn.140091f40
test rax, rax
je 0x14003714a
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call fcn.1400c326c
mov ecx, eax
call fcn.140011580
movzx ecx, ax
jmp 0x140037156
movzx ecx, si
jmp 0x140037156
movzx ecx, r15w
movzx esi, cx
xor edx, edx
cmp si, cx
cmovbe dx, cx
xor eax, eax
cmp si, cx
cmovbe ax, si
xor esi, esi
mov word [rsp + 0x34], ax
cmp byte [r14], sil
je 0x140037197
call fcn.14002a3f4
test eax, eax
je 0x140037194
sub eax, 1
je 0x140037639
cmp eax, 1
jne 0x140037197
lea r15, [rbp + 0x150]
jmp 0x140037197
mov r15, r14
mov word [rsp + 0x32], dx
test r15, r15
jne 0x14003721d
mov rcx, qword [rbx + 0x240]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x38], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1400371f5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
lea rdx, [rbp - 0x30]
call fcn.140029a88
mov r8, rax
lea rdx, str.getsockname___failed:__s
mov rcx, r13
call fcn.140010ce0
mov rcx, r14
call qword [fcn.1400b8804]
jmp 0x140037639
movzx ecx, word [rsp + 0x50]
lea r8, [rbp + 0x150]
mov r9d, 0x401
lea rdx, [rsp + 0x54]
call fcn.14002a4b8
lea r15, [rbp + 0x150]
mov byte [rsp + 0x30], sil
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, r15
mov rcx, rbx
call fcn.140013d08
cmp eax, 1
jne 0x140037242
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.14001d344
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x140037257
mov rsi, qword [rdx]
mov rcx, r13
call fcn.140013ecc
test rsi, rsi
jne 0x14003726b
mov r8, r15
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
jmp 0x1400371df
mov rcx, r14
call qword [fcn.1400b8804]
or qword [rsp + 0x40], 0xffffffffffffffff
xor edi, edi
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rsi
mov rcx, rbx
call fcn.140012c90
mov r14d, eax
test eax, eax
je 0x1400372a7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rsi, qword [rsi + 0x28]
mov edi, eax
test rsi, rsi
jne 0x14003727c
test rsi, rsi
jne 0x1400372ce
lea rdx, [rbp - 0x30]
mov ecx, edi
call fcn.140029a88
mov r8, rax
lea rdx, str.socket_failure:__s
mov rcx, r13
call fcn.140010ce0
jmp 0x140037639
movsxd r8, dword [rsi + 0x10]
lea rcx, [rsp + 0x50]
mov rdx, qword [rsi + 0x20]
call fcn.1400919b0
movzx ecx, word [rsp + 0x34]
mov eax, dword [rsi + 0x10]
movzx r15d, cx
cmp cx, word [rsp + 0x32]
mov rdi, qword [rsp + 0x40]
mov dword [rsp + 0x38], eax
ja 0x14003761f
mov eax, 2
cmp word [rsp + 0x50], ax
jne 0x14003731b
movzx ecx, r15w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
mov r8d, dword [rsp + 0x38]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140037406
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x30], 0
je 0x14003739a
mov ecx, 0x2741
cmp eax, ecx
jne 0x14003739a
lea rdx, [rbp - 0x30]
call fcn.140029a88
mov r9, rax
movzx r8d, r15w
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
mov rcx, r13
call fcn.140010bf0
mov rcx, qword [rbx + 0x240]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x38], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1400373b8
movzx r15d, word [rsp + 0x34]
mov byte [rsp + 0x30], al
jmp 0x1400373aa
cmp eax, 0x2740
je 0x1400373a6
cmp eax, 0xd
jne 0x1400373e0
inc r15w
movzx eax, word [rsp + 0x32]
cmp r15w, ax
jmp 0x1400372fa
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
lea rdx, [rbp - 0x30]
call fcn.140029a88
lea rdx, str.getsockname___failed:__s
mov r8, rax
mov rcx, r13
call fcn.140010ce0
jmp 0x14003762e
lea rdx, [rbp - 0x30]
mov ecx, eax
call fcn.140029a88
mov r9, rax
movzx r8d, r15w
lea rdx, str.bind_port_hu__failed:__s
mov rcx, r13
call fcn.140010ce0
jmp 0x14003762e
movzx eax, word [rsp + 0x32]
cmp r15w, ax
ja 0x14003761f
lea r8, [rsp + 0x38]
mov dword [rsp + 0x38], 0x80
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1400373b8
lea r15d, [rax + 1]
mov rcx, rdi
mov edx, r15d
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140037465
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
lea rdx, [rbp - 0x30]
call fcn.140029a88
lea rdx, str.socket_failure:__s
jmp 0x1400373d0
mov r8d, 0x100
lea rdx, [rbp + 0x50]
mov rcx, rsi
call fcn.140013778
mov esi, 2
cmp r12d, esi
je 0x1400374d0
movzx eax, word [rsp + 0x50]
test dword [rbx + 0x3c4], 0x40000
jne 0x140037497
test r12d, r12d
je 0x1400374c8
cmp r12d, r15d
jne 0x1400374a1
cmp ax, si
jne 0x1400374c8
cmp ax, si
jne 0x1400374c8
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r8d, ax
test r12d, r12d
je 0x1400375a0
cmp r12d, r15d
je 0x1400374fe
movzx eax, word [rsp + 0x50]
add r12d, r15d
cmp r12d, esi
jne 0x140037486
lea rsi, [rbx + 0x798]
mov rcx, rbx
mov dword [rsi + 0xb0], r12d
call fcn.14003664c
mov edx, Ordinal_32
mov qword [rbx + 0x248], rdi
mov byte [rbx + 0x3c3], r15b
jmp 0x140037612
lea rcx, [rbp + 0x560]
lea rdx, [rbp + 0x50]
cmp byte [rdx], 0
je 0x140037528
cmp byte [rdx], 0x2e
mov r9d, Ordinal_45
movzx eax, byte [rdx]
cmove eax, r9d
mov byte [rcx], al
add rcx, r15
add rdx, r15
jne 0x140037509
mov r9d, r8d
movzx eax, r8b
shr r9d, 8
lea r8, str.__d__d
mov edx, reloc.WS2_32.dll_sendto
mov byte [rcx], 0
mov dword [rsp + 0x20], eax
call fcn.14001f320
lea rsi, [rbx + 0x798]
mov rcx, rsi
lea r9, [rbp + 0x560]
lea r8, str.PORT
lea rdx, [0x140173408]
call fcn.140046bd4
mov r14d, eax
test eax, eax
je 0x1400374d7
mov ecx, eax
call fcn.1400290b0
mov r8, rax
lea rdx, str.Failure_sending_PORT_command:__s
mov rcx, r13
call fcn.140010ce0
mov rdx, rdi
mov rcx, rbx
call fcn.140012c10
jmp 0x140037610
xor r9d, r9d
mov dword [rsp + 0x28], r8d
cmp word [rsp + 0x50], si
lea rax, [rbp + 0x50]
lea rsi, [rbx + 0x798]
mov qword [rsp + 0x20], rax
setne r9b
lea r8, str.EPRT
add r9d, r15d
lea rdx, str._s__d_s_hu
mov rcx, rsi
call fcn.140046bd4
mov r14d, eax
test eax, eax
je 0x1400374d7
mov ecx, eax
call fcn.1400290b0
mov r8, rax
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, r13
call fcn.140010ce0
mov rdx, rdi
mov rcx, rbx
call fcn.140012c10
mov dword [rsi + 0xb0], r15d
xor edx, edx
mov rcx, rbx
call fcn.140036df8
mov eax, r14d
jmp 0x14003763e
lea rdx, str.bind___failed__we_ran_out_of_ports_
mov rcx, r13
call fcn.140010ce0
mov rdx, rdi
mov rcx, rbx
call fcn.140012c10
mov eax, reloc.WLDAP32.dll_Ordinal_30
mov rcx, qword [rbp + 0x960]
xor rcx, rsp
call fcn.14008f320
mov rbx, qword [rsp + 0xac0]
add rsp, 0xa70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret