Function at 0x1400794d0
Capabilities:
Send data
Send data on socket
Send http request
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xc8]
mov eax, 0x1c8
call fcn.1401ef830
sub rsp, rax
mov rax, qword [0x140310170]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r13, qword [rbp + 0x130]
xor r15d, r15d
mov rdi, rcx
mov esi, r8d
mov r12, rdx
mov ecx, r15d
mov ebx, 0x493e0
mov r14, qword [r13]
mov eax, dword [r13 + 0x134]
mov dword [rsp + 0x48], eax
movsxd rax, r9d
movsxd r8, dword [r14 + 0x328]
movsxd rdx, dword [r14 + 0x32c]
test r8d, r8d
mov rax, qword [r13 + rax*8 + 0x230]
setg cl
mov qword [rsp + 0x50], rax
test edx, edx
jle 0x140079558
or ecx, 2
sub ecx, 1
je 0x140079578
sub ecx, 1
je 0x140079573
cmp ecx, 1
jne 0x14007957b
cmp r8d, edx
cmovl edx, r8d
movsxd rbx, edx
jmp 0x14007957b
mov rbx, rdx
jmp 0x14007957b
mov rbx, r8
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
mov r9d, edx
shr r9d, 6
imul ecx, r9d, 0x3e8
mov dword [rsp + 0x40], r9d
sub r8d, ecx
mov rcx, qword [r14 + 0x8b8]
imul eax, r8d, 0x3e8
sub r9d, ecx
mov rdx, rcx
shr rdx, 0x20
mov dword [rsp + 0x44], eax
mov rax, qword [rsp + 0x40]
shr rax, 0x20
sub eax, edx
movsxd rdx, eax
movabs rax, 0x20c49ba5e353f7cf
imul rdx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul eax, r9d, 0x3e8
sub rbx, rdx
movsxd rcx, eax
sub rbx, rcx
je 0x140079af7
test rbx, rbx
js 0x140079af7
lea rax, [0x1402d3d44]
mov ebx, dword [rsp + 0x48]
cmp byte [r13 + 0x3ce], r15b
je 0x14007963f
mov rcx, qword [r13]
lea r8, [0x14027c115]
cmp ebx, 6
mov dword [rsp + 0x20], esi
mov r9, r12
lea rdx, str.SOCKS4_s:_connecting_to_HTTP_proxy__s_port__d_n
cmove r8, rax
call fcn.140059720
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x40]
mov edx, 0x8004667e
mov dword [rsp + 0x40], r15d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r9d, esi
lea rdx, str.SOCKS4_communication_to__s:_d_n
mov r8, r12
mov rcx, r14
call fcn.140059720
mov eax, esi
mov word [rsp + 0x60], 0x104
sar eax, 8
mov byte [rsp + 0x62], al
mov byte [rsp + 0x63], sil
cmp ebx, 6
je 0x14007977c
lea r9, [rsp + 0x40]
mov r8d, esi
mov rdx, r12
mov rcx, r13
call fcn.14005c820
cmp eax, 0xffffffff
jne 0x1400796ae
mov eax, 5
jmp 0x140079b0b
cmp eax, 1
jne 0x1400796c0
lea rdx, [rsp + 0x40]
mov rcx, r13
call fcn.140068050
mov rsi, qword [rsp + 0x40]
test rsi, rsi
je 0x14007975c
mov rbx, qword [rsi]
test rbx, rbx
je 0x14007975c
cmp dword [rbx + 4], 2
jne 0x140079736
mov rcx, qword [rbx + 0x20]
lea rdx, [rbp + 0x70]
add rcx, 4
mov r8d, 0x40
call fcn.1400757c0
cmp dword [rbx + 4], 2
jne 0x140079736
mov rcx, qword [rbx + 0x20]
lea r8, [rbp + 0x70]
lea rdx, str.SOCKS4_connect_to_IPv4__s__locally_resolved__n
movzx eax, byte [rcx + 4]
mov byte [rsp + 0x64], al
movzx eax, byte [rcx + 5]
mov byte [rsp + 0x65], al
movzx eax, byte [rcx + 6]
mov byte [rsp + 0x66], al
movzx eax, byte [rcx + 7]
mov rcx, r14
mov byte [rsp + 0x67], al
call fcn.140059720
jmp 0x14007974c
lea r8, [rbp + 0x70]
mov rcx, r14
lea rdx, str.SOCKS4_connection_to__s_not_supported_n
mov rbx, r15
call fcn.140059810
mov rdx, rsi
mov rcx, r14
call fcn.14005c9b0
test rbx, rbx
jne 0x140079778
mov r8, r12
lea rdx, str.Failed_to_resolve___s__for_SOCKS4_connect.
mov rcx, r14
call fcn.140059810
mov eax, 6
jmp 0x140079b0b
mov ebx, dword [rsp + 0x48]
or rsi, 0xffffffffffffffff
mov byte [rsp + 0x68], r15b
test rdi, rdi
je 0x1400797cb
mov r8, rsi
nop dword [rax]
inc r8
cmp byte [rdi + r8], r15b
jne 0x140079790
cmp r8, 0xfe
jb 0x1400797bb
lea rdx, str.Too_long_SOCKS_proxy_name__cant_use__n
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
inc r8
lea rcx, [rsp + 0x68]
mov rdx, rdi
call fcn.14020f990
mov rdi, r15
lea rax, [rsp + 0x68]
mov r15, rsi
inc r15
cmp byte [rax + r15], dil
jne 0x1400797d6
add r15d, 9
cmp ebx, 6
jne 0x14007982e
mov dword [rsp + 0x64], 0x1000000
mov rdi, rsi
inc rdi
cmp byte [r12 + rdi], 0
jne 0x1400797f3
inc rdi
movsxd rdx, r15d
lea rax, [rdx + rdi]
cmp rax, 0x106
jg 0x1400798ad
sub rdx, r12
mov rcx, r12
lea rdx, [rsp + rdx + 0x60]
nop
movzx eax, byte [rcx]
mov byte [rcx + rdx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140079820
xor eax, eax
mov rcx, qword [rsp + 0x50]
cmp rcx, qword [r13 + 0x238]
sete al
mov ecx, eax
mov edx, eax
mov rbx, qword [r13 + rcx*8 + 0x230]
mov rcx, r13
call fcn.140059570
lea r8d, [rdi + r15]
xor r9d, r9d
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x1400798b6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
je 0x140079917
mov edx, eax
mov rcx, r13
call fcn.1400755c0
mov rcx, qword [r13]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140059810
mov rcx, qword [r13]
mov dword [rcx + 0x89e4], ebx
jmp 0x140079917
xor eax, eax
mov edi, eax
jmp 0x140079830
movsxd rax, r15d
add rax, rdi
cmp rcx, rax
jne 0x140079917
mov ebx, dword [rsp + 0x48]
cmp ebx, 6
jne 0x140079930
test rdi, rdi
jne 0x140079930
nop
inc rsi
cmp byte [r12 + rsi], 0
jne 0x1400798d0
mov rax, qword [rsp + 0x50]
lea rcx, [rsp + 0x40]
inc rsi
mov qword [rsp + 0x20], rcx
cmp rax, qword [r13 + 0x238]
mov r9, rsi
mov eax, 0
mov r8, r12
sete al
mov rcx, r13
mov edx, eax
call fcn.140059a50
cmp dword [rsp + 0x40], 0
jne 0x140079917
cmp rax, rsi
je 0x140079930
lea rdx, str.Failed_to_send_SOCKS4_connect_request.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
mov rsi, qword [rsp + 0x50]
lea rax, [rsp + 0x40]
mov rdx, rsi
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0x60]
mov rcx, r13
call fcn.140079330
test eax, eax
jne 0x140079ae1
cmp qword [rsp + 0x40], 8
jne 0x140079ae1
cmp byte [rsp + 0x60], al
je 0x140079988
lea rdx, str.SOCKS4_reply_has_wrong_version__version_should_be_4.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
movzx r10d, byte [rsp + 0x61]
mov ecx, r10d
sub ecx, 0x5a
je 0x140079a9e
movzx edx, byte [rsp + 0x68]
movzx eax, byte [rsp + 0x69]
movzx r9d, byte [rsp + 0x65]
movzx r8d, byte [rsp + 0x64]
sub ecx, 1
je 0x140079a65
sub ecx, 1
je 0x140079a29
shl edx, 8
or edx, eax
movzx eax, byte [rsp + 0x67]
cmp ecx, 1
movzx ecx, byte [rsp + 0x66]
je 0x1400799fc
mov dword [rsp + 0x38], r10d
mov dword [rsp + 0x30], edx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___Unknown.
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
mov dword [rsp + 0x38], 0x5d
mov dword [rsp + 0x30], edx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_the_client_program_and_identd_report_different_user_ids.
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
movzx ecx, byte [rsp + 0x66]
shl edx, 8
or edx, eax
mov dword [rsp + 0x38], 0x5c
movzx eax, byte [rsp + 0x67]
mov dword [rsp + 0x30], edx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_SOCKS_server_cannot_connect_to_identd_on_the_client.
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
movzx ecx, byte [rsp + 0x66]
shl edx, 8
or edx, eax
mov dword [rsp + 0x38], 0x5b
movzx eax, byte [rsp + 0x67]
mov dword [rsp + 0x30], edx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_or_failed.
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
lea rcx, [0x1402d3d44]
cmp ebx, 6
lea r8, [0x14027c115]
cmove r8, rcx
lea rdx, str.SOCKS4_s_request_granted._n
mov rcx, r14
call fcn.140059720
lea r8, [rsp + 0x40]
mov dword [rsp + 0x40], 1
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x140079b0b
lea rdx, str.Failed_to_receive_SOCKS4_connect_request_ack.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x140079b0b
lea rdx, str.Connection_time_out
mov rcx, r14
call fcn.140059810
mov eax, Ordinal_30
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.1401ef4e0
add rsp, 0x1c8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret