Function at 0x140001870
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x140]
sub rsp, 0x240
mov rax, qword [0x14000c040]
xor rax, rsp
mov qword [rbp + 0x130], rax
mov r12, r8
mov edx, 0x65
xor ecx, ecx
lea r8d, [rdx - 0x63]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
jne 0x140001919
lea rdx, str.Failed_to_find_resource_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140004a70
mov rcx, rax
lea rdx, [0x140004c40]
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor al, al
mov rcx, qword [rbp + 0x130]
xor rcx, rsp
call fcn.1400062f0
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdi, rax
test rax, rax
jne 0x140001935
lea rdx, str.Failed_to_load_resource_
jmp 0x1400018cb
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [rsp + 0x30], eax
test eax, eax
jne 0x140001956
lea rdx, str.Resource_size_is_0_
jmp 0x1400018cb
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r13, rax
test rax, rax
jne 0x140001973
lea rdx, str.Failed_to_lock_resource_
jmp 0x1400018cb
xor edi, edi
mov qword [rbp - 0x48], rdi
lea r9, [rbp - 0x48]
xor r8d, r8d
xor edx, edx
lea rcx, [0x140008500]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
je 0x14000199f
lea rdx, str.Failed_to_get_Desktop_path_
jmp 0x1400018cb
mov eax, 0x4d42
mov word [rbp + 0xf0], ax
mov eax, dword [r13]
add eax, 0xe
mov dword [rbp + 0xfa], eax
lea eax, [rsi + 0xe]
mov dword [rbp + 0xf2], eax
mov dword [rbp + 0xf6], edi
mov r15d, 1
mov r10d, 0x2d
lea r9, [rbp + 0x12a]
test r15d, r15d
jns 0x140001a29
mov ecx, r15d
neg ecx
nop dword [rax]
nop dword [rax + rax]
sub r9, 2
mov eax, 0xcccccccd
mul ecx
shr edx, 3
movzx eax, dx
shl ax, 2
lea r8d, [rax + rdx]
add r8w, r8w
sub cx, r8w
add cx, 0x30
mov word [r9], cx
mov ecx, edx
test edx, edx
jne 0x1400019f0
add r9, 0xfffffffffffffffe
mov word [r9], r10w
jmp 0x140001a60
mov r8d, r15d
nop dword [rax]
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x140001a30
lea r8, [rbp + 0x12a]
mov rdx, r9
lea rcx, [rsp + 0x78]
call fcn.140005ac0
nop
mov r14, qword [rbp - 0x48]
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [r14 + rbx*2], 0
jne 0x140001a92
movabs rax, 0x7ffffffffffffffe
cmp rbx, rax
ja 0x1400022bc
cmp rbx, 7
ja 0x140001ae4
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], 7
add rbx, rbx
mov r8, rbx
mov rdx, r14
lea rcx, [rsp + 0x38]
call sub.VCRUNTIME140.dll_memcpy
mov word [rsp + rbx + 0x38], di
xor r14d, r14d
jmp 0x140001b98
mov rsi, rbx
or rsi, 7
cmp rsi, rax
jbe 0x140001b03
mov rsi, rax
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x140001b33
cmp rsi, 0xa
mov eax, 0xa
cmovb rsi, rax
lea rcx, [rsi + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x1400022b6
add rcx, rcx
cmp rcx, 0x1000
jb 0x140001b5f
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400022b6
mov rcx, rax
call fcn.140006430
test rax, rax
je 0x1400020f8
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140001b6c
test rcx, rcx
je 0x140001b6c
call fcn.140006430
mov rdi, rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rsi
add rbx, rbx
mov r8, rbx
mov rdx, r14
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
xor r14d, r14d
mov word [rdi + rbx], r14w
mov esi, dword [rsp + 0x30]
mov rdi, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
sub rax, rdi
cmp rax, 5
jb 0x140001be9
lea rax, [rdi + 5]
mov qword [rsp + 0x48], rax
lea rbx, [rsp + 0x38]
cmp rcx, 7
cmova rbx, qword [rsp + 0x38]
lea rcx, [rbx + rdi*2]
mov r8d, 0xa
lea rdx, str._bwaa
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + rdi*2 + 0xa], r14w
lea rax, [rsp + 0x38]
jmp 0x140001c08
mov qword [rsp + 0x20], 5
lea r9, str._bwaa
mov edx, 5
lea rcx, [rsp + 0x38]
call fcn.1400056b0
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x58], xmm1
xor edi, edi
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
lea r9, [rsp + 0x78]
lea r8, [rbp - 0x68]
lea rcx, [rsp + 0x58]
call fcn.1400058a0
nop
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov rax, rdx
sub rax, rcx
cmp rax, 4
jb 0x140001c84
lea rax, [rcx + 4]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x58]
cmp rdx, 7
cmova rax, qword [rsp + 0x58]
movabs rdx, 0x70006d0062002e
mov qword [rax + rcx*2], rdx
mov word [rax + rcx*2 + 8], di
lea rax, [rsp + 0x58]
jmp 0x140001ca3
mov qword [rsp + 0x20], 4
lea r9, [0x1400086c0]
mov edx, 4
lea rcx, [rsp + 0x58]
call fcn.1400056b0
xorps xmm0, xmm0
movups xmmword [rbp + 0xd0], xmm0
mov qword [rbp + 0xe0], rdi
mov qword [rbp + 0xe8], rdi
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xd0], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xe0], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
mov rdx, qword [rsp + 0x70]
cmp rdx, 7
jbe 0x140001d21
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001d1c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400020ff
call fcn.140006858
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], 7
mov word [rsp + 0x58], di
mov rdx, qword [rbp - 0x50]
cmp rdx, 7
jbe 0x140001d75
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001d6f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002106
call fcn.140006858
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 7
jbe 0x140001db7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001db2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000210d
call fcn.140006858
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], 7
mov word [rsp + 0x38], di
mov rdx, qword [rbp - 0x70]
cmp rdx, 7
jbe 0x140001e0b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001e06
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002114
call fcn.140006858
lea rax, [rbp + 0xd0]
cmp r12, rax
je 0x140001e77
lea r9, [rbp + 0xd0]
cmp qword [rbp + 0xe8], 7
cmova r9, qword [rbp + 0xd0]
mov rbx, qword [rbp + 0xe0]
mov rax, qword [r12 + 0x18]
cmp rbx, rax
ja 0x140001e6c
mov rdi, r12
cmp rax, 7
jbe 0x140001e4c
mov rdi, qword [r12]
mov qword [r12 + 0x10], rbx
lea r8, [rbx + rbx]
mov rdx, r9
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
xor r14d, r14d
mov word [rdi + rbx*2], r14w
xor edi, edi
jmp 0x140001e77
mov rdx, rbx
mov rcx, r12
call fcn.140005250
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x40]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp + 0xd0]
cmp qword [rbp + 0xe8], 7
cmova rdx, qword [rbp + 0xd0]
lea rcx, [rbp - 0x40]
call fcn.140004530
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x40], r14
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x44], edx
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x40]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
jne 0x140002122
mov r8d, 0xe
lea rdx, [rbp + 0xf0]
lea rcx, [rbp - 0x40]
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]
mov r8d, esi
mov rdx, r13
lea rcx, [rbp - 0x40]
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]
lea rcx, [rbp - 0x38]
call fcn.140004470
test rax, rax
jne 0x140001f3c
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x40]
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]
lea rdx, [rbp + 0xd0]
cmp qword [rbp + 0xe8], 7
seta r9b
cmova rdx, qword [rbp + 0xd0]
mov rax, qword [rbp + 0xe0]
lea r8, [rdx + rax*2]
lea rdx, [rbp + 0xd0]
test r9b, r9b
cmovne rdx, qword [rbp + 0xd0]
lea rcx, [rsp + 0x78]
call fcn.140004c80
mov rbx, rax
lea rdx, str.File
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140004a70
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140001fa1
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140005c10
lea rdx, str._saved_
mov rcx, rax
call fcn.140004a70
mov rcx, rax
lea rdx, [0x140004c40]
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x14000200a
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002004
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000211b
call fcn.140006858
nop
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x40], r14
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x44], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp - 0x38], rax
cmp qword [rbp + 0x48], 0
je 0x140002062
mov rax, qword [rbp - 0x20]
lea rcx, [rbp + 0x38]
cmp qword [rax], rcx
jne 0x140002062
mov rdx, qword [rbp + 0x58]
mov rcx, qword [rbp + 0x50]
mov qword [rax], rcx
mov rax, qword [rbp]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 0x18]
mov dword [rax], edx
cmp byte [rbp + 0x44], 0
je 0x140002071
lea rcx, [rbp - 0x38]
call fcn.140004470
lea rcx, [rbp - 0x38]
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, [rbp - 0x30]
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 + 0x68]
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 [rbp + 0xe8]
cmp rdx, 7
jbe 0x1400020d7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xd0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400020d2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400022a5
call fcn.140006858
inc r15d
cmp r15d, 0x3e8
jle 0x1400019cd
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov al, 1
jmp 0x1400018e9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
lea rdx, [rbp + 0xd0]
cmp qword [rbp + 0xe8], 7
cmova rdx, qword [rbp + 0xd0]
mov rax, qword [rbp + 0xe0]
lea r8, [rdx + rax*2]
lea rdx, [rbp + 0xd0]
cmova rdx, qword [rbp + 0xd0]
lea rcx, [rsp + 0x78]
call fcn.140004c80
mov rbx, rax
lea rdx, str.Trolling
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140004a70
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140002180
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140005c10
mov rcx, rax
lea rdx, [0x140004c40]
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x1400021dd
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400021d7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400021d7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006858
nop
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x40], r14
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x44], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp - 0x38], rax
cmp qword [rbp + 0x48], 0
je 0x140002235
mov rax, qword [rbp - 0x20]
lea rcx, [rbp + 0x38]
cmp qword [rax], rcx
jne 0x140002235
mov rdx, qword [rbp + 0x58]
mov rcx, qword [rbp + 0x50]
mov qword [rax], rcx
mov rax, qword [rbp]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 0x18]
mov dword [rax], edx
cmp byte [rbp + 0x44], 0
je 0x140002244
lea rcx, [rbp - 0x38]
call fcn.140004470
lea rcx, [rbp - 0x38]
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, [rbp - 0x30]
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 + 0x68]
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 [rbp + 0xe8]
cmp rdx, 7
jbe 0x1400018e7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xd0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400022ac
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400022ac
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006858
jmp 0x1400018e7
call fcn.140001110
int3
call fcn.1400011b0
int3