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

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x198]
cmp dword [rax + 0x18], 0
je 0x140050b25
mov edx, reloc.WS2_32.dll_listen
mov rcx, rbx
call fcn.14004f0d0
mov r8d, edx
mov dl, 1
add rsp, 0x20
pop rbx
jmp fcn.140050c40
cmp byte [rcx + 0x43e], 0
je 0x140050b3d
xor edx, edx
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp 0x1400516b0
cmp byte [rcx + 0x456], 0
je 0x140050be0
mov r8, qword [rbx + 0x5f0]
test r8, r8
jne 0x140050b98
mov r8, qword [rcx + 0x4a0]
test r8, r8
jne 0x140050b7b
cmp byte [rcx + 0x43d], 0
lea rax, str.NLST
lea r8, str.LIST
cmovne r8, rax
lea rcx, [rbx + 0x570]
lea rdx, str.PRET__s
call fcn.140059c00
test eax, eax
je 0x140050bce
add rsp, 0x20
pop rbx
ret
cmp byte [rcx + 0x448], 0
lea rcx, [rbx + 0x570]
je 0x140050bbe
lea rdx, str.PRET_STOR__s
call fcn.140059c00
test eax, eax
je 0x140050bce
add rsp, 0x20
pop rbx
ret
lea rdx, str.PRET_RETR__s
call fcn.140059c00
test eax, eax
jne 0x140050bed
mov edx, Ordinal_30
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.14004f0d0
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140051620
add rsp, 0x20
pop rbx
ret
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x8f0]
sub rsp, 0x9f0
mov rax, qword [0x1401bd830]
xor rax, rsp
mov qword [rbp + 0x8e0], rax
mov rbx, qword [rcx]
mov esi, edx
mov rdi, rcx
mov qword [rsp + 0x40], rbx
mov r14, 0xffffffffffffffff
lea rcx, [rbp - 0x30]
xor edx, edx
mov qword [rsp + 0x38], r14
mov r8d, 0x100
call fcn.140114350
mov rcx, qword [rsp + 0x40]
xor eax, eax
mov rbx, qword [rbx + 0x4d0]
mov r12d, eax
mov qword [rsp + 0x48], rax
movzx r13d, ax
mov word [rsp + 0x32], ax
mov r15d, eax
mov rcx, qword [rcx + 0x4d0]
mov byte [rsp + 0x30], 1
test rcx, rcx
je 0x1400518db
mov rax, r14
inc rax
cmp byte [rcx + rax], r12b
jne 0x140051744
cmp rax, 1
jbe 0x1400518db
mov rax, r14
nop word [rax + rax]
inc rax
cmp byte [rbx + rax], r12b
jne 0x140051760
cmp rax, 0x16
jae 0x140051777
mov r14d, reloc.WS2_32.dll_shutdown
jmp 0x140051780
inc r14
cmp byte [rbx + r14], r12b
jne 0x140051777
lea rcx, [r14 + 1]
mov edx, 1
call qword [case.0x14003ac79.1]
mov r15, rax
test rax, rax
jne 0x1400517a0
lea eax, [r15 + 0x1b]
jmp 0x140051de1
cmp byte [rbx], 0x3a
jne 0x1400517b3
mov r14, rbx
test rbx, rbx
je 0x14005184e
jmp 0x1400517d9
mov edx, Ordinal_60
mov rcx, rbx
call fcn.1401148dc
mov r14, rax
mov rcx, r15
test rax, rax
je 0x14005183c
mov r8, rax
mov rdx, rbx
sub r8, rbx
call fcn.140126610
mov edx, Ordinal_60
mov rcx, r14
call fcn.1401148dc
mov rbx, rax
test rax, rax
je 0x14005184e
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call fcn.140125db0
mov ecx, eax
call fcn.140038db0
mov edx, Ordinal_46
mov rcx, rbx
movzx r14d, ax
call fcn.1401148dc
test rax, rax
je 0x140051836
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call fcn.140125db0
mov ecx, eax
call fcn.140038db0
movzx r13d, ax
jmp 0x140051852
movzx r13d, r14w
jmp 0x140051852
sub rcx, rbx
nop
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140051840
movzx r14d, r12w
xor ecx, ecx
cmp r14w, r13w
mov ebx, ecx
mov eax, ecx
cmovbe ax, r14w
cmovbe bx, r13w
mov word [rsp + 0x32], ax
cmp byte [r15], cl
je 0x1400518d2
mov rcx, qword [rdi + 0x58]
mov rcx, qword [rcx + 0x20]
call fcn.1400277f0
mov r8d, dword [rdi + 0xa0]
lea rcx, [rbp + 0xd0]
mov edx, eax
mov dword [rsp + 0x28], 0x401
mov rax, qword [rdi + 0x58]
mov r9, r15
mov qword [rsp + 0x20], rcx
mov ecx, dword [rax + 4]
call fcn.1400277f0
test eax, eax
je 0x1400518c4
sub eax, 1
je 0x140051ddc
cmp eax, 1
jne 0x1400518c7
lea r12, [rbp + 0xd0]
jmp 0x1400518c7
mov r12, r15
movzx r13d, bx
test r12, r12
jne 0x14005194a
jmp 0x1400518db
mov word [rsp + 0x32], ax
movzx r13d, bx
mov rcx, qword [rdi + 0x1d0]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140051922
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14003cb80
mov rcx, qword [rsp + 0x40]
lea rdx, str.getsockname___failed:__s
mov r8, rax
jmp 0x140051dce
movzx ecx, word [rsp + 0x50]
lea r8, [rbp + 0xd0]
mov r9d, 0x401
lea rdx, [rsp + 0x54]
call fcn.14003eb20
lea r12, [rbp + 0xd0]
mov byte [rsp + 0x30], 0
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
call fcn.1400283d0
cmp eax, 1
jne 0x14005196f
lea rdx, [rsp + 0x48]
mov rcx, rdi
call fcn.140027910
mov rdx, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
test rdx, rdx
je 0x140051dc1
mov r14, qword [rdx]
mov rcx, rbx
call fcn.140028570
test r14, r14
je 0x140051dc1
mov rcx, r15
call qword [fcn.14011e248]
nop
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call fcn.140035f50
mov r15d, eax
test eax, eax
je 0x1400519ea
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [r14 + 0x28]
test r14, r14
jne 0x1400519a0
mov edx, eax
mov rcx, rdi
call fcn.14003cb80
mov r8, rax
lea rdx, str.socket_failure:__s
mov rcx, rbx
call fcn.140037c70
jmp 0x140051ddc
movsxd r8, dword [r14 + 0x10]
lea rcx, [rsp + 0x50]
mov rdx, qword [r14 + 0x20]
call fcn.140113bc0
movzx r12d, word [rsp + 0x32]
mov eax, dword [r14 + 0x10]
movzx ebx, r12w
mov dword [rsp + 0x34], eax
cmp r12w, r13w
ja 0x140051aca
cmp word [rsp + 0x50], 2
jne 0x140051a2e
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
mov r8d, dword [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140051b55
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x30], 0
je 0x140051ab1
cmp eax, 0x2741
jne 0x140051ab1
mov edx, eax
mov rcx, rdi
call fcn.14003cb80
movzx r8d, bx
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
mov rbx, qword [rsp + 0x40]
mov r9, rax
mov rcx, rbx
call fcn.140037d40
mov rcx, qword [rdi + 0x1d0]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140051aed
movzx ebx, r12w
mov byte [rsp + 0x30], al
jmp 0x140051ac0
cmp eax, 0x2740
je 0x140051abd
cmp eax, 0xd
jne 0x140051b21
inc bx
cmp bx, r13w
jbe 0x140051a18
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind___failed__we_ran_out_of_ports_
call fcn.140037c70
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.1400356d0
jmp 0x140051ddc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14003cb80
mov rcx, rbx
lea rdx, str.getsockname___failed:__s
mov r8, rax
call fcn.140037c70
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.1400356d0
jmp 0x140051ddc
mov edx, eax
mov rcx, rdi
call fcn.14003cb80
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind_port_hu__failed:__s
mov r9, rax
movzx r8d, bx
call fcn.140037c70
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.1400356d0
jmp 0x140051ddc
cmp bx, r13w
ja 0x140051aca
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140051b9a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14003cb80
mov rcx, qword [rsp + 0x40]
jmp 0x140051b00
mov rcx, qword [rsp + 0x38]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140051bcf
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14003cb80
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
jmp 0x140051b07
mov r8d, 0x100
lea rdx, [rbp - 0x30]
mov rcx, r14
call fcn.1400283a0
cmp esi, 2
je 0x140051cfd
movzx eax, word [rsp + 0x50]
nop
cmp byte [rdi + 0x324], 0
jne 0x140051c01
test esi, esi
je 0x140051cf2
cmp esi, 1
jne 0x140051cd8
cmp ax, 2
jne 0x140051cf2
movzx ecx, word [rsp + 0x52]
lea rbx, [rbp + 0x4e0]
lea r14, [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8d, [rsi + 0x2b]
nop
movzx edx, byte [r14]
test dl, dl
je 0x140051c4c
cmp dl, 0x2e
mov ecx, edx
cmove ecx, r8d
mov byte [rbx], cl
inc rbx
add r14, 1
jne 0x140051c30
movzx r9d, ax
lea r8, str.__d__d
movzx eax, r9b
mov edx, reloc.WS2_32.dll_sendto
shr r9d, 8
mov rcx, rbx
mov dword [rsp + 0x20], eax
mov byte [rbx], 0
call fcn.14003d810
lea rbx, [rdi + 0x570]
mov rcx, rbx
lea r9, [rbp + 0x4e0]
lea r8, str.PORT
lea rdx, [0x140144ad8]
call fcn.140059c00
mov r15d, eax
test eax, eax
je 0x140051d04
mov ecx, eax
call fcn.14003cca0
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_PORT_command:__s
mov r8, rax
call fcn.140037c70
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.1400356d0
xor edx, edx
mov rcx, rdi
call fcn.14004f0d0
mov eax, r15d
jmp 0x140051de1
cmp ax, 2
jne 0x140051cf2
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
test esi, esi
je 0x140051d3a
movzx eax, word [rsp + 0x50]
inc esi
cmp esi, 2
jne 0x140051bf0
lea rbx, [rdi + 0x570]
mov rcx, rdi
mov dword [rbx + 0x9c], esi
call fcn.14004f0e0
mov rax, qword [rsp + 0x38]
mov edx, Ordinal_30
mov rcx, rdi
mov qword [rdi + 0x1d8], rax
mov byte [rdi + 0x31d], 1
call fcn.14004f0d0
mov eax, r15d
jmp 0x140051de1
cmp word [rsp + 0x50], 2
lea rbx, [rdi + 0x570]
mov ecx, 0
movzx eax, ax
setne cl
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x30]
lea r8, str.EPRT
mov qword [rsp + 0x20], rax
lea rdx, str._s__d_s_hu
lea r9d, [rcx + 1]
mov rcx, rbx
call fcn.140059c00
mov r15d, eax
test eax, eax
je 0x140051d04
mov ecx, eax
call fcn.14003cca0
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_EPRT_command:__s
mov r8, rax
call fcn.140037c70
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.1400356d0
xor edx, edx
mov dword [rbx + 0x9c], 1
mov rcx, rdi
call fcn.14004f0d0
mov eax, r15d
jmp 0x140051de1
mov r8, r12
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, rbx
call fcn.140037c70
mov rcx, r15
call qword [fcn.14011e248]
mov eax, reloc.WLDAP32.dll_Ordinal_30
mov rcx, qword [rbp + 0x8e0]
xor rcx, rsp
call fcn.140111cf0
mov rbx, qword [rsp + 0xa40]
add rsp, 0x9f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret