Function at 0x140051760
Capabilities:
Query environment variable
Terminate process

Disassembly:
cmp ecx, 2
je 0x140051efe
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov rax, qword [0x14057b2a8]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov byte [rsp + 0x20], dl
mov dword [rsp + 0x28], ecx
xor ebx, ebx
mov dword [rsp + 0x24], ebx
lea rcx, str.APPDATA
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xorps xmm0, xmm0
movups xmmword [rbp + 0x1e0], xmm0
mov qword [rbp + 0x1f0], rbx
mov qword [rbp + 0x1f8], rbx
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], bl
jne 0x1400517e0
mov rdx, rax
lea rcx, [rbp + 0x1e0]
call fcn.140048220
nop
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
mov r14, qword [rbp + 0x1f0]
sub rax, r14
cmp rax, 0x27
jb 0x140051eff
lea r13, [rbp + 0x1e0]
mov rsi, qword [rbp + 0x1e0]
mov r15, qword [rbp + 0x1f8]
cmp r15, 0x10
cmovae r13, rsi
xorps xmm0, xmm0
movups xmmword [rbp + 0x1c0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x1d0], xmm1
lea r12, [r14 + 0x27]
mov ebx, reloc.WS2_32.dll_ntohs
lea rdi, [rbp + 0x1c0]
cmp r12, rbx
jbe 0x1400518dd
mov rbx, r12
or rbx, 0xf
cmp rbx, rcx
jbe 0x14005189d
mov rbx, rcx
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.1400b721c
test rax, rax
je 0x140051e72
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x1400518d6
mov eax, reloc.WLDAP32.dll_Ordinal_22
cmp rbx, rax
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x1400518c5
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140051f05
jmp 0x14005187e
test rcx, rcx
je 0x1400518d4
call fcn.1400b721c
mov rdi, rax
jmp 0x1400518d6
xor edi, edi
mov qword [rbp + 0x1c0], rdi
mov qword [rbp + 0x1d0], r12
mov qword [rbp + 0x1d8], rbx
mov r8, r14
mov rdx, r13
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
movups xmm0, xmmword [str.PrivateTarkovConsoleOutputoutput.txt]
movups xmmword [r14 + rdi], xmm0
movups xmm1, xmmword [0x140131e10]
movups xmmword [r14 + rdi + 0x10], xmm1
mov eax, dword [0x140131e20]
mov dword [r14 + rdi + 0x20], eax
movzx eax, word [0x140131e24]
mov word [r14 + rdi + 0x24], ax
movzx eax, byte [reloc.WS2_32.dll_WSACleanup]
mov byte [r14 + rdi + 0x26], al
mov byte [rdi + r12], 0
lea rbx, [rbp + 0x1c0]
cmp qword [rbp + 0x1d8], 0x10
cmovae rbx, qword [rbp + 0x1c0]
lea r13, [0x140000000]
lea rax, [r13 + 0xcaa80]
mov qword [rbp + 0x90], rax
lea rcx, [rbp + 0x140]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x24], 3
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0xa0]
lea rcx, [rbp + 0x90]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x90], r14
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx + 0x8c], edx
lea rax, [rbp + 0xa0]
mov qword [rsp + 0x30], rax
lea rcx, [rbp + 0xa0]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
lea r12, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0xa0], r12
mov byte [rbp + 0x11c], 0
mov byte [rbp + 0x111], 0
lea rcx, [rbp + 0xa0]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
xor edi, edi
mov qword [rbp + 0x120], rdi
mov rax, qword [0x14057bb80]
mov qword [rbp + 0x114], rax
mov qword [rbp + 0x108], rdi
lea r9d, [rdi + 0x40]
lea r8d, [rdi + 1]
mov rdx, rbx
lea rcx, [rbp + 0xa0]
call fcn.140054e30
test rax, rax
jne 0x140051a69
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x90]
add rcx, rax
xor r8d, r8d
lea edx, [rdi + 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 [rbp + 0x90]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x90], r14
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx + 0x8c], edx
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
mov ebx, dword [rbp + rcx + 0xa0]
mov qword [rbp + rcx + 0x90], r14
mov rax, qword [rbp + 0x90]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx + 0x8c], edx
lea rcx, [rbp + 0xa0]
call fcn.1400485b0
lea rcx, [rbp + 0xa8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x140]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
test ebx, ebx
jne 0x140051d1c
lea rbx, [rbp + 0x1c0]
cmp qword [rbp + 0x1d8], 0x10
cmovae rbx, qword [rbp + 0x1c0]
lea rax, [r13 + 0xcaa30]
mov qword [rsp + 0x60], rax
lea rcx, [rbp + 8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x24], 7
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], r14
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov qword [rsp + 0x68], r12
mov byte [rbp - 0x1c], 0
mov byte [rbp - 0x27], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x18], rdi
mov rax, qword [0x14057bb80]
mov qword [rbp - 0x24], rax
mov qword [rbp - 0x30], rdi
mov r9d, 0x40
lea r8d, [r9 - 0x3e]
mov rdx, rbx
lea rcx, [rsp + 0x68]
call fcn.140054e30
test rax, rax
jne 0x140051be5
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
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 + 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x60], r14
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
lea rdx, [0x1400bcacc]
lea rcx, [rsp + 0x60]
call fcn.140049890
cmp qword [rbp - 0x18], 0
je 0x140051c97
mov rax, qword [rbp - 0x80]
lea rcx, [rbp - 0x28]
cmp qword [rax], rcx
jne 0x140051c45
mov rdx, qword [rbp - 8]
mov rcx, qword [rbp - 0x10]
mov qword [rax], rcx
mov rax, qword [rbp - 0x60]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x48]
mov dword [rax], edx
lea rbx, [rsp + 0x68]
lea rcx, [rsp + 0x68]
call fcn.1400487b0
test al, al
cmove rbx, rdi
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
cmovne rbx, rdi
mov byte [rbp - 0x1c], 0
mov byte [rbp - 0x27], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x18], rdi
mov rax, qword [0x14057bb80]
mov qword [rbp - 0x24], rax
mov qword [rbp - 0x30], rdi
test rbx, rbx
jne 0x140051cdc
jmp 0x140051cbd
mov byte [rbp - 0x1c], 0
mov byte [rbp - 0x27], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x18], rdi
mov rax, qword [0x14057bb80]
mov qword [rbp - 0x24], rax
mov qword [rbp - 0x30], rdi
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
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 + 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x60], r14
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x68]
call fcn.1400485b0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
cmp dword [rsp + 0x28], 0
je 0x140051d36
cmp byte [rsp + 0x20], 0
jne 0x140051d36
mov byte [0x14057bd94], 1
jmp 0x140051e3a
mov byte [0x14057bd4a], 1
mov r8d, 7
lea rdx, str.RUNNING
lea rcx, str.LAUNCH
call fcn.1400149a0
mov dword [0x140152528], 0x64
movaps xmm0, xmmword [0x140132190]
movups xmmword [0x140154ec8], xmm0
movaps xmm1, xmmword [0x1401321a0]
movups xmmword [0x14025f2f8], xmm1
movaps xmm0, xmmword [0x1401321b0]
movups xmmword [0x1402649b8], xmm0
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], 8
mov qword [rsp + 0x50], reloc.WS2_32.dll_ntohs
movabs rax, 0x64616f6c6e776f44
mov qword [rsp + 0x38], rax
mov byte [rsp + 0x40], 0
lea r8, [rsp + 0x38]
lea rdx, [rbp + 0x1a0]
lea rcx, [0x14057be00]
call fcn.140066d00
mov rdx, rax
lea rcx, [rbp + 0x70]
call fcn.140054580
mov rbx, qword [rbp + 0x70]
mov rcx, rbx
call fcn.140052840
cmp byte [0x14057bd4b], 0
je 0x140051dfa
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
test rbx, rbx
je 0x140051e3a
mov rdx, qword [rbp + 0x80]
sub rdx, rbx
mov rax, rbx
cmp rdx, 0x1000
jb 0x140051e31
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140051e31
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.1400b7258
nop
mov rdx, qword [rbp + 0x1d8]
cmp rdx, 0x10
jb 0x140051e7e
inc rdx
mov rcx, qword [rbp + 0x1c0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140051e79
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140051e79
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400b7258
movdqa xmm0, xmmword [0x140132010]
movdqu xmmword [rbp + 0x1d0], xmm0
mov byte [rbp + 0x1c0], 0
cmp r15, 0x10
jb 0x140051ecf
lea rdx, [r15 + 1]
mov rax, rsi
cmp rdx, 0x1000
jb 0x140051ec7
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140051ec7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rsi
call fcn.1400b7258
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.1400b72f0
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140014920
nop
call fcn.140014900
int3