Function at 0x140002e80
Capabilities:
Check mutex on windows
Create mailslot
Create thread
Initialize winsock library
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x47c0]
mov eax, 0x48c0
call fcn.140004660
sub rsp, rax
mov rax, qword [0x140008008]
xor rax, rsp
mov qword [rbp + 0x47b0], rax
lea rax, str.1080
movsxd r14, ecx
mov qword [0x140008678], rax
lea rcx, str.Socks_Over_RDP_by_Balazs_Bucsay____xoreipeip___n_n
lea rax, str.127.0.0.1
mov byte [0x140008680], 4
xor r15d, r15d
mov qword [0x140008670], rax
mov rdi, rdx
mov dword [rsp + 0x40], r15d
mov esi, r15d
call fcn.140002960
cmp r14d, 1
jle 0x140002f96
dec r14
mov ebx, r15d
test r14, r14
jle 0x140002f94
nop dword [rax + rax]
mov rcx, qword [rdi + rbx*8 + 8]
lea rdx, [0x1400061c0]
inc rbx
mov r8d, 1
inc esi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
jne 0x140002f6d
mov rdx, qword [rdi + rbx*8]
movzx eax, word [rdx + 2]
cmp eax, 0x3f
je 0x140002f80
cmp eax, 0x64
je 0x140002f59
cmp eax, 0x68
je 0x140002f80
cmp eax, 0x76
jne 0x140002f74
mov dword [0x140008648], 1
jmp 0x140002f63
mov dword [0x14000864c], 1
cmp rbx, r14
jl 0x140002f10
mov esi, r15d
jmp 0x140002f96
movsxd rdx, esi
mov rdx, qword [rdi + rdx*8]
lea rcx, str.____Invalid_argument:__s_n
call fcn.140002960
mov rdx, qword [rdi]
lea rcx, str.Usage:__s___v____t_timeout_val__n_h_t_tThis_help_n_v_t_tVerbose_Mode_n
call fcn.140002960
jmp 0x140003806
mov esi, ebx
movzx r8d, byte [0x140008680]
lea rdx, str.SocksChannel
or r8d, 1
mov qword [rsp + 0x48], r15
mov ecx, 0xffffffff
call qword [sym.imp.WTSAPI32.dll_WTSVirtualChannelOpenEx]
mov qword [0x140008688], rax
test rax, rax
jne 0x140002fd2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x140003054
lea r9, [rbp - 0x70]
mov edx, 1
lea r8, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.WTSAPI32.dll_WTSVirtualChannelQuery]
test eax, eax
jne 0x140002ff7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x140003054
cmp dword [rbp - 0x70], 8
je 0x140003004
mov ebx, 0x57
jmp 0x140003054
mov rax, qword [rsp + 0x48]
mov rdi, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
lea r9, [0x140008650]
mov rcx, rax
mov dword [rsp + 0x28], r15d
mov r8, rbx
mov dword [rsp + 0x20], r15d
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x140003051
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x140003054
mov ebx, r15d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140003064
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov rcx, qword [0x140008688]
test rcx, rcx
je 0x140003076
call qword [sym.imp.WTSAPI32.dll_WTSVirtualChannelClose]
test ebx, ebx
je 0x1400030a8
cmp ebx, 0x1f
jne 0x140003092
mov edx, ebx
lea rcx, str.____Could_not_open_Dynamic_Virtual_Channel__plugin_was_not_loaded_on_the_client_side:__ld_n
call fcn.140002960
jmp 0x140003806
mov r8d, ebx
lea rcx, str.____Could_not_open_Dynamic_Virtual_Channel:__ld___08X_n
mov edx, ebx
call fcn.140002960
jmp 0x140003806
lea rcx, str.___Channel_opened_over_RDP_n
call fcn.140002960
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [0x140008640], rax
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
xorps xmm0, xmm0
xor r9d, r9d
xor r8d, r8d
mov qword [0x140008668], rax
xor edx, edx
xor ecx, ecx
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xorps xmm0, xmm0
lea rdx, [rbp - 0x60]
movups xmmword [rsp + 0x60], xmm0
mov ecx, 0x202
mov qword [rsp + 0x68], rax
movups xmmword [rsp + 0x50], xmm0
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x140003130
mov edx, eax
lea rcx, str.____WSAStartup___failed_with_error:__ld_n
call fcn.140002960
jmp 0x140003806
mov qword [rsp + 0x48f0], r12
lea rcx, [0x140002db0]
mov edx, 1
mov qword [rsp + 0x4900], r13
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [0x140008650]
lea rax, [rsp + 0x50]
lea r9, [rbp - 0x6c]
mov qword [rsp + 0x20], rax
mov r8d, 0x648
lea rdx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400031ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400037e2
mov rcx, qword [rsp + 0x68]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x140008650]
lea r8, [rbp - 0x6c]
xor r9d, r9d
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1400037e2
mov r15d, dword [rbp - 0x6c]
lea r12, [rbp + 0x168]
add r15d, 0xfffffff8
mov dword [rbp - 0x70], 0
test esi, esi
je 0x140003281
cmp dword [0x14000864c], 0
lea ebx, [r15 + rsi]
je 0x14000320d
mov r9d, ebx
lea rcx, str.___Overflow_was_present_from_previous_call._Stored_bytes:__ld._Received_bytes:__ld___ld__n
mov r8d, r15d
mov edx, esi
call fcn.140001010
mov eax, esi
lea rcx, [rbp + 0x7b0]
add rcx, rax
mov r8d, r15d
test r15d, r15d
je 0x14000326a
test rcx, rcx
jne 0x140003234
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x140003264
cmp r8, 0x4000
ja 0x14000324b
lea rdx, [rbp + 0x168]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x14000326a
xor edx, edx
mov r8d, 0x4000
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
xor esi, esi
mov dword [rbp - 0x70], 1
mov dword [rsp + 0x40], esi
lea r12, [rbp + 0x7b0]
mov r15d, ebx
test r15d, r15d
je 0x140003160
nop word [rax + rax]
cmp r15d, 9
jb 0x140003702
mov rcx, qword [0x140008668]
mov edx, 0xffffffff
mov r14d, dword [r12]
mov r13d, dword [r12 + 4]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400032d6
cmp eax, 0x80
jne 0x14000333d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, eax
lea rcx, str._08X:_LookupThreadRemote_lock_abandoned_n
call fcn.140001010
jmp 0x14000333d
mov rbx, qword [0x140008660]
test rbx, rbx
jne 0x140003302
mov rcx, qword [0x140008668]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x14000333d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, str.____LookupThreadRemote_Release_Failed0:__08X
jmp 0x140003333
cmp dword [rbx + 4], r14d
je 0x1400034c7
mov rbx, qword [rbx + 0x30]
test rbx, rbx
jne 0x140003302
mov rcx, qword [0x140008668]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x14000333d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, str.____LookupThreadRemote_Release_Failed2:__08X
mov r8d, eax
xor ecx, ecx
call fcn.140002b70
xorps xmm0, xmm0
lea r8, str..mailslotRDPSocks__08X
mov r9d, r14d
lea rcx, [rbp + 0x140]
mov edx, 0x20
movups xmmword [rbp + 0x140], xmm0
movups xmmword [rbp + 0x150], xmm0
call fcn.1400029c0
xor r9d, r9d
lea rcx, [rbp + 0x140]
xor edx, edx
mov r8d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_CreateMailslotA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400035ee
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp + 0x140]
mov edx, 0x40000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400035d1
mov rcx, qword [0x140008668]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140003403
cmp eax, 0x80
je 0x1400033f1
xor ebx, ebx
jmp 0x14000347f
xor edx, edx
lea rcx, str._08X:_AddThread_lock_abandoned_n
call fcn.140001010
xor ebx, ebx
jmp 0x14000347f
mov ecx, 0x38
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, qword [0x140008660]
mov rbx, rax
xor eax, eax
mov dword [rbx], eax
mov dword [rbx + 4], r14d
mov qword [rbx + 8], rax
mov dword [rbx + 0x10], 1
mov qword [rbx + 0x18], rdi
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x30], rax
test rcx, rcx
jne 0x140003449
mov qword [0x140008660], rbx
jmp 0x140003462
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x14000345e
mov rcx, rax
mov rax, qword [rax + 0x30]
test rax, rax
jne 0x140003452
mov qword [rcx + 0x30], rbx
mov rcx, qword [0x140008668]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x14000347f
lea rcx, str.Release_failed_n
call fcn.140001010
lea rax, [rbp - 0x68]
mov r9, rbx
mov qword [rsp + 0x28], rax
lea r8, [0x140001f60]
xor edx, edx
mov dword [rsp + 0x20], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x14000864c], 0
mov ecx, dword [rbp - 0x68]
mov dword [rbx], ecx
mov qword [rbx + 8], rax
je 0x14000350b
mov edx, r14d
lea rcx, str.____08X:_Thread_not_found__Mailslot_created_n
call fcn.140001010
jmp 0x14000350b
mov rcx, qword [0x140008668]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x1400034ef
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, str.____LookupThreadRemote_Release_Failed1:__08X
xor ecx, ecx
mov r8d, eax
call fcn.140002b70
cmp dword [0x14000864c], 0
je 0x140003507
mov edx, r14d
lea rcx, str.____08X:_Thread_found__Mailslot_found_n
call fcn.140001010
mov rsi, qword [rbx + 0x20]
mov ebx, r15d
lea rcx, [rbx - 9]
cmp r13, rcx
ja 0x140003639
lea rax, [rsp + 0x70]
mov rcx, rsi
lea rdx, [r12 + 8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
lea r8d, [r13 + 1]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140003585
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14000360b
mov rcx, qword [rbp - 0x78]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x140008650]
lea r8, [rsp + 0x44]
mov r9d, 1
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x14000360b
cmp dword [0x14000864c], 0
je 0x1400035ab
mov r8d, dword [rsp + 0x44]
lea r9d, [r13 + 1]
mov edx, r14d
mov dword [rsp + 0x20], r15d
lea rcx, str.____08X:_no_error__written:__ld__should_have_written:__ld__cbFullSize:__ld_n
call fcn.140001010
mov ecx, dword [rsp + 0x44]
lea r12, [r12 + 8]
mov esi, dword [rsp + 0x40]
mov eax, 0xfffffff8
sub eax, ecx
lea r12, [r12 + rcx]
add r15d, eax
jne 0x140003290
jmp 0x140003160
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateMailslot_w_failed_with__d._n
call fcn.140001010
mov esi, dword [rsp + 0x40]
jmp 0x140003160
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateMailslot_r_failed_with__d_n
call fcn.140001010
mov esi, dword [rsp + 0x40]
jmp 0x140003160
cmp dword [0x14000864c], 0
mov esi, dword [rsp + 0x40]
je 0x140003160
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, r14d
lea rcx, str._____08X:_WriteChannel_error:__ld_n
mov r8d, eax
call fcn.140001010
jmp 0x140003160
cmp dword [0x14000864c], 0
je 0x140003654
mov r8d, r15d
lea rcx, str._______OVERFLOW_HAPPENED__ld____ld__9_n
mov edx, r13d
call fcn.140001010
cmp dword [rbp - 0x70], 0
je 0x1400036a7
cmp dword [0x14000864c], 0
je 0x140003672
mov edx, r15d
lea rcx, str.___Data_left_in_buffer__ofused:__ld_n
call fcn.140001010
test r15d, r15d
je 0x1400037d5
cmp rbx, 0x4000
ja 0x1400037c3
mov r8, rbx
lea rcx, [rbp + 0x7b0]
mov rdx, r12
call sub.VCRUNTIME140.dll_memmove
mov esi, r15d
mov dword [rsp + 0x40], r15d
jmp 0x140003160
cmp dword [0x14000864c], 0
je 0x1400036bf
mov edx, r15d
lea rcx, str.___Data_left_in_buffer__not_ofused:__ld_n
call fcn.140001010
test r15d, r15d
je 0x1400037d5
lea rcx, [rbp + 0x7b0]
cmp rbx, 0x4000
ja 0x1400036f0
mov r8, rbx
mov rdx, r12
call sub.VCRUNTIME140.dll_memcpy
mov esi, r15d
mov dword [rsp + 0x40], r15d
jmp 0x140003160
xor edx, edx
mov r8d, 0x4000
call sub.VCRUNTIME140.dll_memset
jmp 0x1400037c3
cmp dword [rbp - 0x70], 0
je 0x140003731
cmp dword [0x14000864c], 0
je 0x1400037d5
mov edx, r15d
lea rcx, str.___Not_enough_data__ofused:__ld_n
call fcn.140001010
mov esi, r15d
mov dword [rsp + 0x40], r15d
jmp 0x140003160
cmp dword [0x14000864c], 0
je 0x140003749
mov edx, r15d
lea rcx, str.___Not_enough_data__no_ofused:__ld_n
call fcn.140001010
mov ebx, r15d
test r15d, r15d
je 0x1400037d5
test r12, r12
je 0x140003782
cmp rbx, 0x4000
ja 0x140003782
mov r8d, ebx
lea rcx, [rbp + 0x7b0]
mov rdx, r12
call sub.VCRUNTIME140.dll_memcpy
mov esi, r15d
mov dword [rsp + 0x40], r15d
jmp 0x140003160
xor edx, edx
lea rcx, [rbp + 0x7b0]
mov r8d, 0x4000
call sub.VCRUNTIME140.dll_memset
test r12, r12
jne 0x1400037ba
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_shutdown
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov esi, r15d
mov dword [rsp + 0x40], r15d
jmp 0x140003160
cmp rbx, 0x4000
jbe 0x1400037d5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov esi, r15d
mov dword [rsp + 0x40], r15d
jmp 0x140003160
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____ReadFile___WaitForSingleObject___error:__ld_n
call fcn.140002960
mov r13, qword [rsp + 0x4900]
mov r12, qword [rsp + 0x48f0]
mov eax, 0xffffffff
mov rcx, qword [rbp + 0x47b0]
xor rcx, rsp
call fcn.140003850
mov rbx, qword [rsp + 0x4908]
add rsp, 0x48c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret