Function at 0x140059dd0
Capabilities:
Connect socket
Initialize winsock library

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r15
sub rsp, 0x210
mov rax, qword [0x1408f0280]
xor rax, rsp
mov qword [rsp + 0x200], rax
movzx esi, r8w
mov rbx, rdx
mov rdi, rcx
call fcn.14006d7c0
mov rax, qword [0x140917d28]
mov ecx, 4
test rax, rax
je 0x140059e14
call rax
jmp 0x140059e19
call fcn.140132e00
mov rcx, rax
test rax, rax
je 0x140059e36
mov word [rsp + 0x40], 0x403
movzx eax, word [rsp + 0x40]
mov word [rcx], ax
mov word [rcx + 2], 0x101
call fcn.14006cb20
mov qword [rdi + 0x10], rax
lea rdx, [0x140917d58]
cmp qword [0x140917d70], 0xf
cmova rdx, qword [0x140917d58]
mov ebp, 1
test rax, rax
je 0x140059e6d
test byte [rax + 0xa1], 2
je 0x140059e6d
xor ecx, ecx
jmp 0x140059e6f
mov ecx, ebp
mov dword [rsp + 0x30], ecx
mov r8d, dword [0x140917d68]
mov rcx, rax
call fcn.14006d9e0
cmp eax, ebp
jne 0x14005a020
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x140059eb0
movzx eax, byte [rcx + 0xa1]
and al, 0xfd
or al, bpl
mov byte [rcx + 0xa1], al
mov qword [rcx + 0xc0], 0
mov ecx, 0x202
lea rdx, [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x14005a020
lea r8d, [rax + 6]
mov edx, ebp
mov r15d, 2
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov dword [rdi], eax
cmp eax, 0xffffffff
je 0x14005a020
mov word [rsp + 0x50], r15w
mov rcx, qword [rbx]
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x54], eax
movzx ecx, si
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
movsxd rcx, dword [rdi]
lea r8d, [r15 + 0xe]
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x14005a020
mov rsi, qword [rdi + 0x10]
test rsi, rsi
jne 0x140059f35
mov qword [rdi + 8], rsi
jmp 0x140059fc0
mov rax, qword [0x140917d28]
mov ecx, 0x4f0
test rax, rax
je 0x140059f4a
call rax
jmp 0x140059f4f
call fcn.140132e00
mov rbx, rax
test rax, rax
je 0x140059f95
mov rdx, rsi
mov rcx, rax
call fcn.140073dd0
test eax, eax
jns 0x140059f95
mov rcx, qword [rbx]
test rcx, rcx
je 0x140059f73
call fcn.140072b40
mov rcx, rbx
call fcn.1400743a0
mov rax, qword [0x140917d20]
mov rcx, rbx
test rax, rax
je 0x140059f8e
call rax
jmp 0x140059f93
call fcn.14012d8fc
xor ebx, ebx
mov qword [rdi + 8], rbx
mov ecx, dword [rdi]
test rbx, rbx
je 0x140059fc0
lea rax, [rbx + 0x2f4]
mov dword [rax], ecx
mov qword [rbx + 0x80], rax
lea rax, [rbx + 0x2f8]
mov dword [rax], ecx
mov qword [rbx + 0x88], rax
mov rcx, qword [rdi + 8]
call fcn.14006dca0
cmp eax, ebp
jne 0x14005a020
xchg byte [rdi + 4], bpl
add rdi, 0x2e8
mov qword [rsp + 0x48], rdi
mov rcx, rdi
call fcn.14011741c
test eax, eax
jne 0x14005a04e
mov eax, dword [rdi + 0x4c]
cmp eax, 0x7fffffff
je 0x14005a03e
mov rbx, qword [rdi + 0x50]
mov rsi, qword [rdi + 0x58]
cmp rbx, rsi
je 0x14005a018
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x14005a00f
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
add rbx, 0x40
cmp rbx, rsi
jne 0x14005a000
mov rcx, rdi
call fcn.140117424
mov rcx, qword [rsp + 0x200]
xor rcx, rsp
call fcn.140117aa0
add rsp, 0x210
pop r15
pop rdi
pop rsi
pop rbp
pop rbx
ret
dec eax
mov dword [rdi + 0x4c], eax
mov ecx, 6
call fcn.1401173c0
int3
mov ecx, 5
call fcn.1401173c0
int3