joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41e9c0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x8e0
mov rbp, rsp
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rdx
mov qword [rbp + 0x58], 0
nop
mov rcx, qword [rbp + 0x40]
mov rdx, qword [rbp + 0x48]
lea r8, [rbp + 0x60]
mov r9d, 0x400
call fcn.0041e760
mov ebx, eax
mov rax, qword [0x0042b7e0]
cmp byte [rax], 0
je 0x41eaf8
mov rcx, qword [0x0042b610]
call fcn.00405930
call fcn.00404df0
mov ecx, 1
xor rdx, rdx
lea r8, [rbp + 0x60]
mov r9d, ebx
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
call sub.kernel32.dll_WideCharToMultiByte_1
mov esi, eax
lea rcx, [rbp + 0x58]
mov rdx, qword [0x0041e980]
mov r8d, 1
movsxd r9, esi
call fcn.0040b430
mov ecx, 1
xor rdx, rdx
lea r8, [rbp + 0x60]
mov r9d, ebx
mov rax, qword [rbp + 0x58]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
call sub.kernel32.dll_WideCharToMultiByte_1
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle_1
mov rcx, rax
mov rdx, qword [rbp + 0x58]
mov r8d, esi
lea r9, [rbp + 0x54]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile_1
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle_1
mov rcx, rax
lea rdx, [0x0041eb98]
mov r8d, 2
lea r9, [rbp + 0x54]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile_1
jmp 0x41eb3e
mov rcx, qword [0x00430d58]
call fcn.0040b5a0
mov rcx, rax
mov rax, qword [0x0042b5c8]
mov edx, dword [rax + 8]
lea r8, [rbp + 0x860]
mov r9d, 0x40
call sub.user32.dll_LoadStringW_1
xor rcx, rcx
lea rdx, [rbp + 0x60]
lea r8, [rbp + 0x860]
mov r9d, 0x2010
call sub.user32.dll_MessageBoxW
nop
lea rcx, [rbp + 0x58]
mov rdx, qword [0x0041e980]
call fcn.0040b470
lea rsp, [rbp + 0x8e0]
pop rbx
pop rsi
pop rbp
ret

Function at 0x4205b0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r13
push rdi
push rsi
push rbx
sub rsp, 0x240
mov rbp, rsp
mov rbx, rcx
mov rcx, rbx
call fcn.00409ca0
mov r13d, eax
mov ecx, 0xfde9
xor rdx, rdx
mov r8, rbx
mov r9d, r13d
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x28], 0
call fcn.0040d6d0
mov esi, eax
cmp esi, 0x104
jbe 0x42060d
mov ecx, esi
add ecx, ecx
mov ecx, ecx
call fcn.00404ab0
mov rdi, rax
jmp 0x420611
lea rdi, [rbp + 0x38]
mov ecx, 0xfde9
xor rdx, rdx
mov r8, rbx
mov r9d, r13d
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], esi
call fcn.0040d6d0
mov rax, rdi
mov rcx, rax
call sub.user32.dll_CharUpperW
xor rbx, rbx
xor rax, rax
mov ecx, esi
sub ecx, 1
cmp eax, ecx
jg 0x420667
add ecx, 1
mov edx, ebx
shl edx, 5
shr ebx, 0x1b
or edx, ebx
mov ebx, edx
movsxd rdx, eax
movzx edx, word [rdi + rdx*2]
xor ebx, edx
add eax, 1
cmp eax, ecx
jne 0x42064b
nop
lea rax, [rbp + 0x38]
cmp rdi, rax
je 0x420679
mov rcx, rdi
call fcn.00404ae0
mov eax, ebx
lea rsp, [rbp + 0x240]
pop rbx
pop rsi
pop rdi
pop r13
pop rbp
ret
Function at 0x421710
Capabilities:
Accept command line arguments

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
call sub.kernel32.dll_GetCommandLineW_1
mov rsi, rax
xor rax, rax
movzx rcx, word [rsi]
sub cx, 1
cmp cx, 0xffff
je 0x421754
cmp cx, 0x20
jb 0x421743
sub cx, 0x21
test cx, cx
jne 0x42174e
jmp 0x421749
test al, al
je 0x421754
jmp 0x42174e
test al, al
sete al
add rsi, 2
jmp 0x421724
nop
jmp 0x42175b
add rsi, 2
movzx rcx, word [rsi]
lea rdx, [0x00421784]
call fcn.00419840
test al, al
jne 0x421757
mov rcx, rbx
mov rdx, rsi
call fcn.0040a400
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x4218a0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub rsp, 0x28
call fcn.0040a380
mov rcx, rax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4218be
test eax, 0x10
je 0x4218c3
xor rax, rax
jmp 0x4218c5
mov al, 1
add rsp, 0x28
ret

Function at 0x421c40
Capabilities:
Encrypt data using rc6

Disassembly:
push r14
push r13
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rcx, qword [0x004352c8]
lea rdx, [rsp + 0x20]
mov r8d, 0x40
call fcn.00404e80
mov dword [0x0043520c], 0xb7e15163
mov ebx, 1
lea rax, [0x0043520c]
movsxd rcx, ebx
lea rdx, [0x00435208]
movsxd r8, ebx
mov edx, dword [rdx + r8*4]
add edx, 0x9e3779b9
mov dword [rax + rcx*4], edx
add ebx, 1
cmp ebx, 0x2c
jne 0x421c73
nop
xor rbx, rbx
xor rsi, rsi
xor r13, r13
xor r14, r14
mov edi, 1
lea rax, [0x0043520c]
movsxd rcx, ebx
mov ecx, dword [rax + rcx*4]
add ecx, r13d
add ecx, r14d
mov edx, 3
call fcn.00421a90
mov r13d, eax
lea rax, [0x0043520c]
movsxd rcx, ebx
mov dword [rax + rcx*4], r13d
movsxd rax, esi
mov ecx, dword [rsp + rax*4 + 0x20]
add ecx, r13d
add ecx, r14d
mov edx, r13d
add edx, r14d
call fcn.00421a90
mov r14d, eax
movsxd rax, esi
mov dword [rsp + rax*4 + 0x20], r14d
mov eax, ebx
add eax, 1
mov ecx, 0x2c
cdq
idiv ecx
mov rbx, rdx
mov eax, esi
add eax, 1
mov ecx, 0x10
cdq
idiv ecx
mov rsi, rdx
add edi, 1
cmp edi, 0x85
jne 0x421caf
nop
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop r13
pop r14
ret
Function at 0x421e70
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x240
mov rbp, rsp
mov rbx, rcx
xor rsi, rsi
mov rcx, 0xffffffff80000002
lea rdx, [0x00421f70]
xor r8, r8
mov r9d, 0x20019
lea rax, [rbp + 0x238]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW_1
test eax, eax
jne 0x421f49
mov rcx, qword [rbp + 0x238]
lea rdx, [0x00421fb0]
xor r8, r8
lea r9, [rbp + 0x30]
lea rax, [rbp + 0x38]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x34]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x421ee9
mov sil, 1
jmp 0x421f49
mov rcx, 0xffffffff80000002
lea rdx, [0x00421f70]
xor r8, r8
mov r9d, 0x20119
lea rax, [rbp + 0x238]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW_1
test eax, eax
jne 0x421f49
mov rcx, qword [rbp + 0x238]
lea rdx, [0x00421fb0]
xor r8, r8
lea r9, [rbp + 0x30]
lea rax, [rbp + 0x38]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x34]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x421f49
mov sil, 1
test sil, sil
je 0x421f61
mov rcx, rbx
lea rdx, [rbp + 0x38]
mov r8d, pe_nt_image_headers64
call fcn.0040a430
mov rax, rbx
lea rsp, [rbp + 0x240]
pop rbx
pop rsi
pop rbp
ret

Function at 0x421fd0
Capabilities:
Get common file path

Disassembly:
push rbp
mov eax, 0xfa0
sub rax, 0x1000
mov byte [rsp + rax], al
cmp rax, 0xffffffffffffbfa0
ja 0x421fd7
sub rsp, 0x4060
mov rbp, rsp
mov qword [rbp + 0x30], rcx
mov dword [rbp + 0x3c], edx
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x58], 0
nop
mov eax, 1
movsxd rcx, eax
mov word [rbp + rcx*2 + 0x5e], 0x20
add eax, 1
cmp eax, 0x2001
jne 0x422021
nop
mov eax, dword [rbp + 0x3c]
sub eax, 1
cmp eax, 0xffffffff
je 0x422053
test eax, eax
je 0x422085
sub eax, 1
test eax, eax
jne 0x4220de
jmp 0x4220c5
mov ecx, 0x2000
lea rdx, [rbp + 0x60]
call sub.kernel32.dll_GetTempPathW
lea rcx, [rbp + 0x58]
lea rdx, [rbp + 0x60]
mov r8d, 0x2000
call fcn.00409810
mov rcx, qword [rbp + 0x30]
mov rdx, qword [rbp + 0x58]
call fcn.00419860
jmp 0x4220de
xor rcx, rcx
mov edx, 0x1c
xor r8, r8
xor r9, r9
lea rax, [rbp + 0x60]
mov qword [rsp + 0x20], rax
call sub.SHFolder.dll_SHGetFolderPathW
lea rcx, [rbp + 0x50]
lea rdx, [rbp + 0x60]
mov r8d, 0x2000
call fcn.00409810
mov rcx, qword [rbp + 0x30]
mov rdx, qword [rbp + 0x50]
call fcn.00419860
jmp 0x4220de
lea rcx, [rbp + 0x48]
xor rdx, rdx
call fcn.00405130
mov rcx, qword [rbp + 0x30]
mov rdx, qword [rbp + 0x48]
call fcn.0041a0c0
lea rcx, [rbp + 0x40]
mov rax, qword [rbp + 0x30]
mov rdx, qword [rax]
call fcn.00420240
mov rcx, qword [rbp + 0x30]
mov rdx, qword [rbp + 0x40]
call fcn.00409ab0
nop
lea rcx, [rbp + 0x40]
mov edx, 4
call fcn.00409680
mov rax, qword [rbp + 0x30]
lea rsp, [rbp + 0x4060]
pop rbp
ret
Function at 0x422150
Capabilities:
Create process on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x128
mov rbp, rsp
mov qword [rbp + 0x118], 0
mov qword [rbp + 0x110], 0
mov qword [rbp + 0x58], rbp
mov qword [rbp + 0x140], rcx
nop
lea rcx, [rbp + 0xf0]
mov edx, 0x18
xor r8, r8
call fcn.004059e0
lea rcx, [rbp + 0x88]
mov edx, 0x68
xor r8, r8
call fcn.004059e0
mov dword [rbp + 0x88], 0x68
mov dword [rbp + 0xf0], 0x18
mov dword [rbp + 0xc4], 1
mov word [rbp + 0xc8], 0
mov dword [rbp + 0x100], 0xffffffff
mov byte [rbp + 0x6f], 1
mov rcx, qword [rbp + 0x140]
call fcn.0040a380
xor rcx, rcx
mov rdx, rax
lea r8, [rbp + 0xf0]
lea r9, [rbp + 0xf0]
cmp byte [rbp + 0x6f], 0
setne al
movzx rax, al
neg eax
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
lea rax, [rbp + 0x88]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x70]
mov qword [rsp + 0x48], rax
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x4222b8
lea rcx, [rbp + 0x118]
lea rdx, [0x00421e20]
call fcn.0040d600
lea rcx, [rbp + 0x110]
lea rdx, [0x00422398]
call fcn.00409b30
nop
mov rcx, qword [rbp + 0x118]
call fcn.0040a380
mov rbx, rax
mov rcx, qword [rbp + 0x110]
call fcn.0040a380
xor rcx, rcx
mov rdx, rbx
mov r8, rax
mov r9d, 0x40
call sub.user32.dll_MessageBoxW
nop
lea rcx, [rbp + 0x118]
call fcn.004095a0
lea rcx, [rbp + 0x110]
call fcn.004095a0
jmp 0x4222e6
mov rcx, qword [rbp + 0x70]
or edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
mov rcx, qword [rbp + 0x70]
lea rdx, [rbp + 0x10c]
call sub.kernel32.dll_GetExitCodeProcess
mov rcx, qword [rbp + 0x70]
call sub.kernel32.dll_CloseHandle_1
mov rcx, qword [rbp + 0x78]
call sub.kernel32.dll_CloseHandle_1
nop
lea rcx, [rbp + 0x110]
mov edx, 2
call fcn.00409680
mov eax, dword [rbp + 0x10c]
lea rsp, [rbp + 0x128]
pop rbx
pop rbp
ret

Function at 0x422870
Capabilities:
Write file on windows

Disassembly:
push rbp
sub rsp, 0x50
mov rbp, rsp
mov qword [rbp + 0x48], rbp
mov qword [rbp + 0x60], rcx
mov qword [rbp + 0x68], rdx
mov rcx, qword [rbp + 0x68]
call fcn.00409730
nop
mov rcx, qword [rbp + 0x68]
call fcn.0040a380
mov rcx, rax
mov edx, 0x40000000
xor r8, r8
xor r9, r9
mov dword [rsp + 0x20], 2
mov dword [rsp + 0x28], 0x102
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW_1
mov rcx, qword [rbp + 0x60]
mov qword [rcx + 0x58], rax
nop
mov rax, qword [rbp + 0x60]
mov rcx, qword [rax + 0x58]
mov rax, qword [rbp + 0x60]
mov rdx, qword [rax + 0x60]
mov rax, qword [rbp + 0x60]
mov r8d, dword [rax + 0x68]
mov rax, qword [rbp + 0x60]
lea r9, [rax + 0x54]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile_1
nop
mov rax, qword [rbp + 0x60]
mov rcx, qword [rax + 0x58]
call sub.kernel32.dll_CloseHandle_1
nop
lea rcx, [rbp + 0x68]
call fcn.004095a0
lea rsp, [rbp + 0x50]
pop rbp
ret
Function at 0x14000146d
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140020930]
mov dword [rax], 1
mov rax, qword [0x140020940]
mov dword [rax], 1
mov rax, qword [0x140020950]
mov dword [rax], 1
mov rax, qword [0x1400208b0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014be
mov eax, 0
jmp 0x14000156b
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400014ea
mov eax, 0
jmp 0x14000156b
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x140001510
cmp eax, 0x20b
je 0x140001537
jmp 0x140001566
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x140001523
mov eax, 0
jmp 0x14000156b
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000156b
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x140001552
mov eax, 0
jmp 0x14000156b
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000156b
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001c90
Capabilities:
Read file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [rcx]
mov rbx, rcx
mov r13, rdx
test r12, r12
je 0x140001da0
mov edx, dword [r13 + 4]
xor r8d, r8d
add edx, dword [rbx + 8]
mov rcx, r12
call fcn.14000f450
test eax, eax
js 0x140001db8
mov esi, dword [r13 + 0xc]
mov rcx, rsi
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x140001ded
cmp byte [r13 + 0x10], 1
je 0x140001d80
mov rbp, rax
mov r14d, 0x2000
test rsi, rsi
jne 0x140001d08
jmp 0x140001d51
add rbp, rdi
sub rsi, rdi
je 0x140001d51
cmp rsi, 0x2000
mov rdi, r14
mov r9, qword [rbx]
mov rcx, rbp
cmovbe rdi, rsi
mov r8d, 1
mov rdx, rdi
call sub.msvcrt.dll_fread
test rax, rax
jne 0x140001d00
lea r8, [r13 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
lea rcx, str.fread
call fcn.1400030e0
mov rcx, r12
xor r12d, r12d
call sub.msvcrt.dll_free
mov rcx, qword [rbx]
test rcx, rcx
je 0x140001d65
call sub.msvcrt.dll_fclose
mov qword [rbx], 0
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
xor r8d, r8d
mov r9, rax
mov rdx, r13
mov rcx, rbx
call fcn.140001860
test eax, eax
jne 0x140001d46
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140001d59
jmp 0x140001d65
call fcn.140001830
test eax, eax
jne 0x140001dd8
mov r12, qword [rbx]
jmp 0x140001cb0
lea r8, [r13 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
xor r12d, r12d
lea rcx, str.fseek
call fcn.1400030e0
jmp 0x140001d65
lea rdx, [r13 + 0x12]
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
call fcn.140002f50
jmp 0x140001d65
mov r9d, esi
lea r8, [r13 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
lea rcx, [0x14001a0ea]
call fcn.1400030e0
jmp 0x140001d51
Function at 0x140001e10
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov r12, rdx
call fcn.1400078e0
mov r13d, eax
cmp eax, 0xffffffff
je 0x140001f58
lea rsi, [r12 + 0x12]
lea rcx, [rbx + 0x3078]
mov rdx, rsi
call fcn.140007b70
mov r14, rax
test rax, rax
je 0x140001ffa
mov rcx, qword [rbx]
test rcx, rcx
je 0x140001f78
mov edx, dword [r12 + 4]
xor r8d, r8d
add edx, dword [rbx + 8]
call fcn.14000f450
test eax, eax
js 0x140001fb8
cmp byte [r12 + 0x10], 1
je 0x140001f28
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r15, rax
test rax, rax
je 0x14000201b
mov r12d, dword [r12 + 0xc]
mov edi, 0x2000
test r12, r12
jne 0x140001ed6
jmp 0x140001f70
mov r9, r14
mov r8d, 1
mov rdx, r13
mov rcx, r15
call sub.msvcrt.dll_fwrite
test rax, rax
je 0x140001f90
sub r12, r13
je 0x140001f70
cmp r12, 0x2000
mov r13, rdi
mov r9, qword [rbx]
mov rcx, r15
cmovbe r13, r12
mov r8d, 1
mov rdx, r13
call sub.msvcrt.dll_fread
test rax, rax
jne 0x140001eb0
mov r8, rsi
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
lea rcx, str.fread
mov r13d, 0xffffffff
call fcn.1400030e0
mov rcx, r15
call sub.msvcrt.dll_free
jmp 0x140001f3c
xor r9d, r9d
mov r8, r14
mov rdx, r12
mov rcx, rbx
call fcn.140001860
mov r13d, eax
mov rcx, qword [rbx]
test rcx, rcx
je 0x140001f50
call sub.msvcrt.dll_fclose
mov qword [rbx], 0
mov rcx, r14
call sub.msvcrt.dll_fclose
mov eax, r13d
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
ret
xor r13d, r13d
jmp 0x140001f19
mov rcx, rbx
call fcn.140001830
test eax, eax
jne 0x140001fe0
mov rcx, qword [rbx]
jmp 0x140001e62
mov r8, rsi
lea rdx, str.Failed_to_extract__s:_failed_to_write_data_chunk__n
lea rcx, str.fwrite
mov r13d, 0xffffffff
call fcn.1400030e0
jmp 0x140001f19
mov r8, rsi
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
lea rcx, str.fseek
mov r13d, 0xffffffff
call fcn.1400030e0
jmp 0x140001f3c
mov rdx, rsi
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov r13d, 0xffffffff
call fcn.140002f50
jmp 0x140001f3c
mov r8, rsi
lea rdx, str.Failed_to_extract__s:_failed_to_open_target_file__n
lea rcx, str.fopen
mov r13d, 0xffffffff
call fcn.1400030e0
jmp 0x140001f58
mov r8, rsi
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
lea rcx, [0x14001a0ea]
or r13d, 0xffffffff
call fcn.1400030e0
jmp 0x140001f3c
Function at 0x140002040
Capabilities:
Read file on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
mov rbx, rcx
mov rcx, qword [rcx]
test rcx, rcx
je 0x1400021e0
mov rax, qword [0x140020380]
lea rdx, [rsp + 0x28]
mov r8d, 8
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
shr rax, 0x18
add eax, 0xc
mov byte [rsp + 0x2b], al
call fcn.1400082b0
mov rsi, rax
test rax, rax
je 0x140002207
mov rcx, qword [rbx]
xor r8d, r8d
mov edx, eax
call fcn.14000f450
test eax, eax
js 0x1400021f4
mov r9, qword [rbx]
lea rcx, [rbx + 0x20]
mov r8d, 1
mov edx, 0x58
call sub.msvcrt.dll_fread
test rax, rax
je 0x140002210
mov eax, dword [rbx + 0x28]
mov ecx, dword [rbx + 0x30]
add rsi, 0x58
xor r8d, r8d
mov dword [rbx + 0x507c], 0
mov edx, dword [rbx + 0x2c]
bswap eax
bswap ecx
mov dword [rbx + 0x28], eax
mov eax, eax
mov dword [rbx + 0x30], ecx
mov ecx, dword [rbx + 0x34]
sub rsi, rax
bswap edx
mov qword [rbx + 8], rsi
bswap ecx
mov dword [rbx + 0x2c], edx
add edx, esi
mov dword [rbx + 0x34], ecx
mov dword [0x140026090], ecx
mov rcx, qword [rbx]
call fcn.14000f450
movsxd r12, dword [rbx + 0x30]
mov rcx, r12
call sub.msvcrt.dll_malloc
mov qword [rbx + 0x10], rax
mov rcx, rax
test rax, rax
je 0x14000225d
mov r9, qword [rbx]
mov r8d, 1
mov rdx, r12
call sub.msvcrt.dll_fread
test rax, rax
je 0x14000222b
movsxd rax, dword [rbx + 0x30]
add rax, qword [rbx + 0x10]
mov qword [rbx + 0x18], rax
mov rcx, qword [rbx]
call sub.msvcrt.dll_ferror
mov r12d, eax
test eax, eax
jne 0x140002246
mov rax, qword [rbx + 0x10]
mov r8, qword [rbx + 0x18]
lea rsi, str.Cannot_read_Table_of_Contents._n
cmp rax, r8
jae 0x1400021b8
mov ecx, dword [rax + 4]
mov edx, dword [rax]
bswap ecx
mov dword [rax + 4], ecx
mov ecx, dword [rax + 8]
bswap edx
mov dword [rax], edx
movsxd rdx, edx
bswap ecx
mov dword [rax + 8], ecx
mov ecx, dword [rax + 0xc]
bswap ecx
mov dword [rax + 0xc], ecx
add rax, rdx
cmp rax, qword [rbx + 0x10]
jae 0x140002170
mov rcx, rsi
call fcn.140002f50
mov rax, qword [rbx + 0x18]
mov r8, rax
cmp rax, r8
jb 0x140002175
nop dword [rax + rax]
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400021cc
call sub.msvcrt.dll_fclose
mov qword [rbx], 0
mov eax, r12d
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov rcx, rbx
call fcn.140001830
test eax, eax
jne 0x140002207
mov rcx, qword [rbx]
jmp 0x140002057
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.1400030e0
mov r12d, 0xffffffff
jmp 0x1400021cc
lea rdx, str.Failed_to_read_cookie__n
lea rcx, str.fread
mov r12d, 0xffffffff
call fcn.1400030e0
jmp 0x1400021cc
lea rdx, str.Could_not_read_full_TOC__n
lea rcx, str.fread
mov r12d, 0xffffffff
call fcn.1400030e0
jmp 0x1400021cc
lea rcx, str.Error_on_file._n
mov r12d, 0xffffffff
call fcn.140002f50
jmp 0x1400021cc
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
lea rcx, [0x14001a0ea]
or r12d, 0xffffffff
call fcn.1400030e0
jmp 0x1400021cc
Function at 0x1400060f0
Capabilities:
Read file on windows

Disassembly:
push r12
sub rsp, 0x20
mov rdx, qword [rcx + 0x10]
mov r12, rcx
cmp rdx, qword [rcx + 0x18]
jb 0x140006117
jmp 0x140006130
call fcn.140001c50
mov rdx, rax
cmp qword [r12 + 0x18], rax
jbe 0x140006130
cmp byte [rdx + 0x11], 0x6c
mov rcx, r12
jne 0x140006108
add rsp, 0x20
pop r12
jmp fcn.140001c90
xor eax, eax
add rsp, 0x20
pop r12
ret
Function at 0x1400074b0
Capabilities:
Query environment variable

Disassembly:
push r12
mov eax, 0x4020
call fcn.14000e400
sub rsp, rax
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
lea r12, [rsp + 0x20]
call fcn.140008770
mov r8d, 0x2000
mov rdx, r12
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x1400074f8
xor eax, eax
add rsp, 0x4020
pop r12
ret
lea rdx, [rsp + 0x2020]
mov r8d, 0x2000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
xor r8d, r8d
mov rdx, r12
call fcn.1400084d0
mov rcx, rax
test rax, rax
je 0x1400074e7
cmp byte [rax], 0
je 0x1400074e7
call sub.msvcrt.dll__strdup
add rsp, 0x4020
pop r12
ret

Function at 0x1400075a0
Capabilities:
Set environment variable

Disassembly:
push r13
push r12
sub rsp, 0x28
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.140008770
xor edx, edx
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, r12
mov r13d, eax
call sub.msvcrt.dll_free
mov eax, r13d
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x1400075e0
Capabilities:
Create directory
Query environment variable

Disassembly:
push r13
mov eax, 0x4020
push r12
push rdi
push rsi
push rbx
call fcn.14000e400
sub rsp, rax
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.140008770
mov r12, rax
test rax, rax
je 0x140007720
lea r13, [rsp + 0x20]
mov rcx, rax
mov r8d, 0x1000
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, r12
mov ebx, eax
call sub.msvcrt.dll_free
test ebx, ebx
je 0x140007708
mov rcx, r13
call fcn.140008bc0
test eax, eax
jne 0x1400076f0
mov r8d, 0x1000
mov rdx, r13
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__wfullpath]
mov r12, rax
test r12, r12
je 0x14000772e
lea rsi, [rsp + 0x2020]
xor eax, eax
mov ecx, 0x400
mov edx, 0x5c
mov rdi, rsi
rep stosq qword [rdi], rax
mov rcx, r12
call sub.msvcrt.dll_wcschr
mov rdi, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rbx, rax
test rax, rax
je 0x1400076cd
nop dword [rax]
mov r8, rbx
mov rdx, r12
mov rcx, rsi
sub r8, r12
sar r8, 1
add r8, 1
call sub.msvcrt.dll_wcsncpy
xor edx, edx
mov rcx, rsi
call rdi
lea rcx, [rbx + 2]
mov edx, 0x5c
call sub.msvcrt.dll_wcschr
mov rbx, rax
test rax, rax
jne 0x140007698
xor edx, edx
mov rcx, r12
call rdi
mov rax, r12
add rsp, 0x4020
pop rbx
pop rsi
pop rdi
pop r12
pop r13
ret
mov rcx, r13
call qword [sym.imp.msvcrt.dll__wcsdup_1]
mov r12, rax
jmp 0x14000765a
lea rcx, str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
xor r12d, r12d
call fcn.140002f50
jmp 0x1400076d4
lea rcx, str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.140002f50
jmp 0x1400076d4
lea rcx, str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.140002f50
jmp 0x1400076d4
Function at 0x140007740
Capabilities:
Get common file path

Disassembly:
push r15
mov eax, 0x2048
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000e400
sub rsp, rax
mov r15, rcx
mov rsi, rdx
test rdx, rdx
je 0x1400077a9
lea rcx, [0x14001c563]
call fcn.1400074b0
mov rcx, rsi
mov r14, rax
call fcn.1400075e0
mov r12, rax
test rax, rax
je 0x14000785c
lea rcx, [0x14001c568]
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, r12
mov ebx, eax
call sub.msvcrt.dll_free
test ebx, ebx
jne 0x140007868
lea rbp, [rsp + 0x40]
mov ecx, 0x1000
lea rdi, [rsp + 0x20]
mov ebx, 5
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.msvcrt.dll__getpid
lea r8, str._MEI_d
mov edx, 0x10
mov rcx, rdi
mov r9d, eax
call fcn.140007330
mov r13, qword [sym.imp.msvcrt.dll__wtempnam]
mov rcx, rbp
mov rdx, rdi
call r13
mov rcx, rax
mov r12, rax
call fcn.1400089b0
test eax, eax
je 0x140007880
mov rcx, r12
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x1400077e9
test rsi, rsi
je 0x14000785c
test r14, r14
je 0x140007850
mov rdx, r14
lea rcx, [0x14001c563]
xor r12d, r12d
call fcn.140007540
mov rcx, r14
call sub.msvcrt.dll_free
mov eax, r12d
add rsp, 0x2048
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x14001c563]
call fcn.1400075a0
xor r12d, r12d
jmp 0x140007832
lea rcx, str.LOADER:_Failed_to_set_the_TMP_environment_variable._n
xor r12d, r12d
call fcn.140002f50
jmp 0x140007832
mov rdx, r12
mov r8d, 0x1000
mov rcx, r15
call fcn.1400084d0
mov rcx, r12
mov r12d, 1
call sub.msvcrt.dll_free
test rsi, rsi
je 0x140007832
test r14, r14
je 0x1400078c5
mov rdx, r14
lea rcx, [0x14001c563]
call fcn.140007540
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x140007832
lea rcx, [0x14001c563]
call fcn.1400075a0
jmp 0x140007832