Function at 0x140004040
Capabilities:
Extract resource via kernel32 functions

Disassembly:
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 - 0x280]
sub rsp, 0x380
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x270], rax
xor r12d, r12d
lea r13, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, rax
mov r14, r12
mov r15, r12
lea r8, str.TEXTFILE
mov edx, 0x66
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x1400040dc
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
je 0x1400040dc
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
lea r8, str.TEXTFILE
mov edx, 0x67
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x140004125
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
je 0x140004125
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r15, rax
mov qword [rbp - 0x10], r12
lea rcx, [rbp + 0x38]
call qword [sym.imp.RPCRT4.dll_UuidCreate]
lea rdx, [rbp - 0x10]
lea rcx, [rbp + 0x38]
call qword [sym.imp.RPCRT4.dll_UuidToStringW]
lea rcx, [rsp + 0x60]
call fcn.1400037d0
mov rbx, rax
mov rdx, qword [rbp - 0x10]
mov qword [rbp - 0x60], rdx
mov rcx, 0xffffffffffffffff
nop dword [rax]
inc rcx
cmp word [rdx + rcx*2], 0
jne 0x140004160
mov qword [rbp - 0x58], rcx
movaps xmm0, xmmword [rbp - 0x60]
movdqa xmmword [rsp + 0x30], xmm0
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
call fcn.140007550
nop
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.140001c30
mov rbx, rax
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x1400041da
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400041d5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047bd
call fcn.14000815c
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], 7
mov word [rsp + 0x40], r12w
mov rdx, rbx
lea rcx, [rbp - 8]
call fcn.140002110
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x14000423d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004238
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047c4
call fcn.14000815c
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], r12w
mov qword [rbp + 0x28], r12
lea rbx, [0x14000f078]
mov qword [rbp + 0x30], rbx
lea rdx, [rbp + 0x28]
lea rcx, [rbp - 8]
call fcn.1400031c0
cmp dword [rbp + 0x28], 0
jne 0x1400049be
test al, al
jne 0x1400042a2
mov qword [rbp + 0x18], r12
mov qword [rbp + 0x20], rbx
lea rdx, [rbp + 0x18]
lea rcx, [rbp - 8]
call fcn.1400032d0
cmp dword [rbp + 0x18], 0
jne 0x1400049a9
test al, al
je 0x140004931
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rbp + 0x160]
call sub.VCRUNTIME140.dll_memset
lea rax, str.package.json
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 0xc
call fcn.1400077fc
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rsp + 0x30], xmm0
lea r8, [rsp + 0x30]
mov edx, eax
lea rcx, [rsp + 0x40]
call fcn.1400019b0
nop
lea r8, [rsp + 0x40]
lea rdx, [rbp - 8]
lea rcx, [rbp - 0x80]
call fcn.140001e90
nop
cmp qword [rax + 0x18], 7
jbe 0x140004307
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp + 0x160]
call fcn.140007290
mov rax, qword [rbp + 0x160]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x160], r13
mov rax, qword [rbp + 0x160]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x15c], edx
mov rdx, qword [rbp - 0x68]
cmp rdx, 7
jbe 0x140004381
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000437c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047cb
call fcn.14000815c
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], r12w
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x1400043d4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400043cf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047d2
call fcn.14000815c
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], 7
mov word [rsp + 0x40], r12w
cmp qword [rbp + 0x1e8], 0
je 0x140004445
mov rdx, r14
lea rcx, [rbp + 0x160]
call fcn.140006060
lea rdx, [0x140006020]
mov rcx, rax
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]
lea rcx, [rbp + 0x168]
call fcn.140005ac0
test rax, rax
jne 0x140004445
mov rax, qword [rbp + 0x160]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x160]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rcx, [rbp + 0x38]
call qword [sym.imp.RPCRT4.dll_UuidCreate]
lea rdx, [rbp - 0x10]
lea rcx, [rbp + 0x38]
call qword [sym.imp.RPCRT4.dll_UuidToStringW]
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rbp + 0x50]
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rbp - 0x10]
mov qword [rbp - 0x40], rcx
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140004480
mov qword [rbp - 0x38], rax
movaps xmm0, xmmword [rbp - 0x40]
movdqa xmmword [rsp + 0x30], xmm0
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x60]
call fcn.140007550
nop
lea r8, [rsp + 0x60]
lea rdx, [rbp - 8]
lea rcx, [rbp - 0x30]
call fcn.140001e90
nop
cmp qword [rax + 0x18], 7
jbe 0x1400044c5
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp + 0x50]
call fcn.140007290
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x50], r13
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x4c], edx
mov rdx, qword [rbp - 0x18]
cmp rdx, 7
jbe 0x140004530
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000452b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047d9
call fcn.14000815c
mov qword [rbp - 0x20], r12
mov qword [rbp - 0x18], 7
mov word [rbp - 0x30], r12w
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x140004583
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000457e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047e0
call fcn.14000815c
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], r12w
cmp qword [rbp + 0xd8], 0
je 0x1400045e8
mov rdx, r15
lea rcx, [rbp + 0x50]
call fcn.140006060
lea rdx, [0x140006020]
mov rcx, rax
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]
lea rcx, [rbp + 0x58]
call fcn.140005ac0
test rax, rax
jne 0x1400045e8
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x50]
add rcx, rax
xor r8d, r8d
mov edx, 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 - 8]
lea rcx, [rbp - 0x80]
call fcn.140002110
mov rcx, rax
call fcn.140003a30
mov rbx, qword [rbp - 0x10]
lea rdx, [rbp - 8]
lea rcx, [rbp - 0x80]
call fcn.140002110
mov rdx, rbx
mov rcx, rax
call fcn.140003c60
nop
test al, al
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
je 0x1400047e7
mov qword [rbp + rcx + 0x50], r13
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x4c], edx
lea rsi, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x58], rsi
cmp qword [rbp + 0xd8], 0
je 0x14000468c
lea rcx, [rbp + 0xc8]
mov rax, qword [rbp + 0x70]
cmp qword [rax], rcx
jne 0x14000468c
mov rdx, qword [rbp + 0xe8]
mov rcx, qword [rbp + 0xe0]
mov qword [rax], rcx
mov rax, qword [rbp + 0x90]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 0xa8]
mov dword [rax], edx
cmp byte [rbp + 0xd4], 0
je 0x14000469e
lea rcx, [rbp + 0x58]
call fcn.140005ac0
lea rcx, [rbp + 0x58]
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 + 0x60]
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 + 0xf8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rax, qword [rbp + 0x160]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x160], r13
mov rax, qword [rbp + 0x160]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x15c], edx
mov qword [rbp + 0x168], rsi
cmp qword [rbp + 0x1e8], 0
je 0x140004736
lea rcx, [rbp + 0x1d8]
mov rax, qword [rbp + 0x180]
cmp qword [rax], rcx
jne 0x140004736
mov rdx, qword [rbp + 0x1f8]
mov rcx, qword [rbp + 0x1f0]
mov qword [rax], rcx
mov rax, qword [rbp + 0x1a0]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 0x1b8]
mov dword [rax], edx
cmp byte [rbp + 0x1e4], 0
je 0x14000474b
lea rcx, [rbp + 0x168]
call fcn.140005ac0
lea rcx, [rbp + 0x168]
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 + 0x170]
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 + 0x208]
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 + 0x10]
cmp rdx, 7
jbe 0x140004082
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400047b3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004968
call fcn.14000815c
jmp 0x140004082
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]
nop
mov qword [rbp + rcx + 0x50], r13
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x4c], edx
lea rbx, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x58], rbx
cmp qword [rbp + 0xd8], 0
je 0x140004849
lea rcx, [rbp + 0xc8]
mov rax, qword [rbp + 0x70]
cmp qword [rax], rcx
jne 0x140004849
mov rdx, qword [rbp + 0xe8]
mov rcx, qword [rbp + 0xe0]
mov qword [rax], rcx
mov rax, qword [rbp + 0x90]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 0xa8]
mov dword [rax], edx
cmp byte [rbp + 0xd4], 0
je 0x14000485b
lea rcx, [rbp + 0x58]
call fcn.140005ac0
lea rcx, [rbp + 0x58]
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 + 0x60]
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 + 0xf8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rax, qword [rbp + 0x160]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x160], r13
mov rax, qword [rbp + 0x160]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x15c], edx
mov qword [rbp + 0x168], rbx
cmp qword [rbp + 0x1e8], 0
je 0x1400048f3
lea rcx, [rbp + 0x1d8]
mov rax, qword [rbp + 0x180]
cmp qword [rax], rcx
jne 0x1400048f3
mov rdx, qword [rbp + 0x1f8]
mov rcx, qword [rbp + 0x1f0]
mov qword [rax], rcx
mov rax, qword [rbp + 0x1a0]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp + 0x1b8]
mov dword [rax], edx
cmp byte [rbp + 0x1e4], 0
je 0x140004908
lea rcx, [rbp + 0x168]
call fcn.140005ac0
lea rcx, [rbp + 0x168]
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 + 0x170]
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 + 0x208]
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 + 0x10]
cmp rdx, 7
jbe 0x140004974
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000496f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000496f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000815c
mov eax, 1
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.140008100
lea r11, [rsp + 0x380]
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
lea r8, [rbp - 8]
lea rdx, [rbp + 0x18]
lea rcx, str.create_directories
call fcn.140002ad0
int3
lea r8, [rbp - 8]
lea rdx, [rbp + 0x28]
lea rcx, str.exists
call fcn.140002ad0
int3