joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000f790
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r9, rcx
mov r10d, 0x270
mov ecx, dword [rcx]
cmp ecx, r10d
jne 0x14000f7f1
lea r8, [r9 + 8]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r10, 1
jne 0x14000f7b0
mov ecx, dword [r9]
jmp 0x14000f8db
cmp ecx, 0x4e0
jb 0x14000f8db
lea r10, [r9 + 0x9c4]
mov qword [rsp], rbx
mov r11d, dword [r10]
mov ebx, 0xe3
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
add r10, 4
mov edx, r11d
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x634]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x14000f810
lea r10, [r9 + 0xd50]
mov ebx, 0x18c
mov r11d, dword [r10]
nop
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
mov edx, eax
xor edx, r11d
add r10, 4
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 - 0xd4c]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x14000f860
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret

Function at 0x140010454
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14001049e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14001049e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14001049e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14001049e
cmp dword [rcx + 0x84], 0xe
jbe 0x14001049e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400104a0
xor al, al
add rsp, 0x28
ret
Function at 0x14000c808
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
mov eax, 0x1020
call fcn.1400226f0
sub rsp, rax
xor r15d, r15d
mov rdi, r8
mov rbp, rdx
mov rbx, rcx
cmp word [rcx], r15w
je 0x14000c9bd
call fcn.14000c9e4
mov rcx, rbx
call fcn.1400263d8
mov rcx, rbx
mov r14, rax
call fcn.14000ca18
test al, al
je 0x14000c8ee
mov rcx, rbx
call fcn.14000c9e4
test al, al
je 0x14000c89f
lea rax, [r14 + 4]
cmp rdi, rax
jbe 0x14000c9bd
mov r8, rdi
lea rdx, [0x140035dd8]
mov rcx, rbp
call fcn.140010e74
mov rdx, rbx
mov r8, rdi
mov rcx, rbp
call fcn.140010e30
mov al, 1
jmp 0x14000c9bf
mov esi, 0x5c
cmp word [rbx], si
jne 0x14000c9bd
cmp word [rbx + 2], si
jne 0x14000c9bd
lea rax, [r14 + 6]
cmp rdi, rax
jbe 0x14000c9bd
mov r8, rdi
lea rdx, [0x140035dd8]
mov rcx, rbp
call fcn.140010e74
mov r8, rdi
lea rdx, [0x140035de8]
mov rcx, rbp
call fcn.140010e30
lea rdx, [rbx + 2]
jmp 0x14000c88d
lea rdx, [rsp + 0x20]
mov ecx, 0x7ff
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
dec eax
cmp eax, 0x7fe
ja 0x14000c9bd
movzx eax, word [rbx]
mov esi, 0x5c
cmp eax, esi
je 0x14000c987
cmp eax, 0x2f
je 0x14000c987
mov edx, 0x800
lea rcx, [rsp + 0x20]
call fcn.14000c274
lea rcx, [rsp + 0x20]
call fcn.1400263d8
lea rcx, [rax + 4]
add rcx, r14
cmp rdi, rcx
jbe 0x14000c9bd
mov r8, rdi
lea rdx, [0x140035dd8]
mov rcx, rbp
call fcn.140010e74
mov r8, rdi
lea rdx, [rsp + 0x20]
mov rcx, rbp
call fcn.140010e30
cmp word [rbx], 0x2e
jne 0x14000c88a
movzx eax, word [rbx + 2]
cmp eax, esi
je 0x14000c97e
cmp eax, 0x2f
jne 0x14000c88a
add rbx, 4
jmp 0x14000c88a
lea rax, [r14 + 6]
cmp rdi, rax
jbe 0x14000c9bd
mov r8, rdi
lea rdx, [0x140035dd8]
mov rcx, rbp
call fcn.140010e74
mov r8, rdi
mov word [rsp + 0x24], r15w
lea rdx, [rsp + 0x20]
mov rcx, rbp
call fcn.140010e30
jmp 0x14000c88a
xor al, al
lea r11, [rsp + 0x1020]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret

Function at 0x14000d794
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov edi, r8d
mov rsi, r9
mov r10b, bl
cmp r8d, 1
jbe 0x14000d7c8
lea rcx, [rdx + 1]
lea r8d, [rdi - 1]
xor r10b, byte [rcx]
inc rcx
sub r8, 1
jne 0x14000d7bc
cmp r10b, byte [rdx]
jne 0x14000d804
mov r8, rdi
or ecx, 0xffffffff
call fcn.140006380
lea rdx, [0x140045030]
not eax
mov rcx, rdx
cmp dword [rcx + 4], eax
jne 0x14000d7ed
cmp dword [rcx], edi
je 0x14000d7fa
inc ebx
add rcx, 0xc
cmp ebx, 6
jae 0x14000d804
jmp 0x14000d7e4
lea rcx, [rbx + rbx*2]
mov eax, dword [rdx + rcx*4 + 8]
mov dword [rsi], eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x14001a1fc
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140019ff8

Function at 0x14001fd00
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xdeac
cmp ecx, eax
ja 0x14001fd58
je 0x14001fd4f
mov eax, 0xc433
cmp ecx, eax
ja 0x14001fd33
je 0x14001fd4f
mov eax, ecx
sub eax, 0x2a
je 0x14001fd4f
sub eax, 0xc402
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
cmp eax, 3
jmp 0x14001fd4d
mov eax, ecx
sub eax, 0xc435
je 0x14001fd4f
sub eax, 0x1263
je 0x14001fd8b
sub eax, 0x812
je 0x14001fd4f
cmp eax, 1
jne 0x14001fd51
xor edx, edx
call fcn.140056c54
sub dword [rbx - 0x2152d23f], ecx
add byte [rax], al
mov eax, ecx
sub eax, 0xdead
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
sub eax, 1
je 0x14001fd4f
sub eax, 0x1f35
je 0x14001fd4f
cmp eax, 1
jne 0x14001fd51
and edx, 8
jmp 0x14001fd51

Function at 0x14002a5a0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14002a5c8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14002a5c8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140815160
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1408152e7
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140815191
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140815177
add dl, dl
jne 0x14081519e
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408151fe
xor eax, eax
add dl, dl
jne 0x1408151ad
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408152b5
add dl, dl
jne 0x1408151be
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408151cb
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408151d8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408151e5
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1408151f2
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140815186
mov eax, 1
add dl, dl
jne 0x14081520e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14081521b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140815203
sub eax, ebx
mov ebx, 1
jne 0x140815254
mov ecx, 1
add dl, dl
jne 0x140815236
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140815243
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14081522b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140815186
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140815270
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14081527d
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140815265
cmp eax, 0x7d00
jae 0x1408152a3
cmp eax, 0x500
jb 0x14081529e
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140815186
cmp eax, 0x7f
ja 0x1408152a6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140815186
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1408152da
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140815186
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140025e80
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r14
sub rsp, 0x260
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rsp + 0x250], rax
xor esi, esi
mov r14, rdx
cmp qword [rcx + 0x18], 8
mov rbx, rcx
mov qword [rsp + 0x30], rsi
jb 0x140025ebb
mov rdx, qword [rcx]
jmp 0x140025ebe
mov rdx, rbx
lea r8, [rsp + 0x30]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
xor eax, eax
lea rdi, [rsp + 0x40]
mov ecx, 0x208
lea rdx, [rsp + 0x40]
rep stosb byte [rdi], al
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x40]
or rax, 0xffffffffffffffff
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140025f00
mov rcx, qword [rsp + 0x30]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, [0x14009a760]
lea rax, [rsp + 0x40]
mov r9d, 2
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov dword [rsp + 0x28], 4
lea rdx, [0x14009a788]
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x38], 7
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r8, qword [rbx + 0x18]
cmp r8, 8
jb 0x140025f90
mov rdx, qword [rbx]
inc r8
call fcn.140023b90
mov qword [rbx + 0x18], 7
cmp qword [rbx + 0x18], 8
mov qword [rbx + 0x10], rsi
jb 0x140025fa6
mov rbx, qword [rbx]
mov word [rbx], si
mov r8, qword [r14 + 0x18]
cmp r8, 8
jb 0x140025fbe
mov rdx, qword [r14]
inc r8
call fcn.140023b90
mov qword [r14 + 0x18], 7
cmp qword [r14 + 0x18], 8
mov qword [r14 + 0x10], rsi
jb 0x140025fd9
mov rax, qword [r14]
mov word [rax], si
jmp 0x140025fdd
mov word [r14], si
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140055590
mov rbx, qword [rsp + 0x290]
add rsp, 0x260
pop r14
pop rdi
pop rsi
ret
Function at 0x1400366d0
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x140
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov rbx, rcx
mov rcx, qword [rcx + 0x20]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea rax, [rbx + 0x2c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9, rbx
lea r8, [0x1400367e0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 8], rax
test rax, rax
jne 0x1400367bf
mov qword [rsp + 0x38], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea rdx, str.Thread::Start
lea rcx, [rsp + 0x48]
call fcn.140023490
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0xd0]
call fcn.140024650
nop
lea rdx, str.CreateThreadfailed__error
mov rcx, rax
call fcn.14002bd50
mov rcx, rax
lea rdx, [rsp + 0x30]
call fcn.140035970
mov rcx, rax
call fcn.140036e40
mov rcx, rax
call fcn.140034800
mov rcx, rax
lea rdx, [rsp + 0x38]
call fcn.140036c80
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140024750
lea rdx, [0x1400afe00]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, rbx
call fcn.140036a50
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140055590
add rsp, 0x140
pop rbx
ret
Function at 0x14003bfb0
Capabilities:
Access the windows event log

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x238]
sub rsp, 0x310
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov r14, r8
mov rsi, rcx
lea rdx, [rcx + 0x28]
cmp qword [rdx + 0x18], 0x10
jb 0x14003bfff
mov rdx, qword [rdx]
mov qword [rsp + 0x70], 0xf
xor r15d, r15d
mov qword [rsp + 0x68], r15
mov byte [rsp + 0x58], r15b
cmp byte [rdx], r15b
jne 0x14003c01f
mov r8d, r15d
jmp 0x14003c02c
or r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r15b
jne 0x14003c023
lea rcx, [rsp + 0x58]
call fcn.1400238d0
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x60]
call fcn.140024a70
nop
mov ebx, r15d
nop dword [rax + rax]
inc ebx
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], 8
cmovae rdx, qword [rbp - 0x60]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rdi, rax
test rax, rax
jne 0x14003c0ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, 3
jl 0x14003c050
lea rdx, str.iusl::EventLog::StoreEvent
lea rcx, [rbp - 0x40]
call fcn.140023490
nop
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 0x80]
call fcn.1400291f0
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.140024890
mov rbx, rax
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0x100]
call fcn.14003bf30
nop
mov rdx, rbx
mov rcx, rax
call fcn.14003c830
mov rdx, rax
lea rcx, [rbp]
call fcn.14003c200
lea rdx, [0x1400b0188]
lea rcx, [rbp]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov r12d, 1
xor r8d, r8d
mov rax, qword [rsi + 0x48]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r15d
mov word [rsp + 0x28], r12w
mov qword [rsp + 0x20], r15
mov r9d, 0xc0021f96
movzx edx, word [rax]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x14003c1b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x14003c18f
mov ebx, r15d
nop dword [rax + rax]
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r8d, r8d
mov rax, qword [rsi + 0x48]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r15d
mov word [rsp + 0x28], r12w
mov qword [rsp + 0x20], r15
mov r9d, 0xc0021f96
movzx edx, word [rax]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x14003c1b2
inc ebx
cmp ebx, 5
jl 0x14003c140
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
lea rcx, [rbp]
call fcn.14003bf00
lea rdx, [0x1400b0188]
lea rcx, [rbp]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
nop
mov r8, qword [rbp - 0x48]
cmp r8, 8
jb 0x14003c1d2
inc r8
mov rdx, qword [rbp - 0x60]
call fcn.140023b90
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.140055590
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140049090
Capabilities:
Identify system language via api

Disassembly:
sub rsp, 0x28
cmp byte [0x1400b5cbd], 0
je 0x1400490a8
mov eax, dword [0x1400b5cf0]
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx r8d, ax
mov edx, r8d
and edx, 0x3ff
sub edx, 7
je 0x14004910e
sub edx, 3
je 0x1400490ea
sub edx, 0xb
je 0x1400490e0
cmp edx, 1
je 0x1400490d6
xor eax, eax
add rsp, 0x28
ret
mov eax, 2
add rsp, 0x28
ret
mov eax, 5
add rsp, 0x28
ret
mov eax, 0xfc00
mov ecx, 0x800
and r8w, ax
mov edx, 1
cmp r8w, cx
mov eax, 3
cmovne eax, edx
add rsp, 0x28
ret
mov eax, 4
add rsp, 0x28
ret

Function at 0x14004d160
Capabilities:
Get common file path

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x260]
sub rsp, 0x360
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x390], rbx
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rbp + 0x250], rax
mov r10, rdx
mov rsi, rcx
xor ebx, ebx
mov dword [rsp + 0x28], ebx
lea rdi, [rbp + 0x40]
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x20]
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
jns 0x14004d204
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
lea rcx, [rbp - 0x20]
call fcn.140024570
nop
mov rcx, rax
call fcn.14004d670
mov rdx, rax
lea rcx, [rbp - 0x80]
call fcn.140024750
lea rdx, [0x1400afe00]
lea rcx, [rbp - 0x80]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov qword [rsp + 0x78], 7
mov qword [rsp + 0x70], rbx
mov word [rsp + 0x60], bx
mov rdx, qword [rsp + 0x20]
cmp word [rdx], bx
jne 0x14004d226
mov r8, rbx
jmp 0x14004d23a
or r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], bx
jne 0x14004d230
lea rcx, [rsp + 0x60]
call fcn.140023580
nop
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rdx, qword [rsp + 0x60]
lea rcx, [rbp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rsp + 0x48], 7
mov qword [rsp + 0x40], rbx
mov word [rsp + 0x30], bx
cmp word [rbp + 0x40], 0
je 0x14004d29a
lea rax, [rbp + 0x40]
or rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x14004d290
mov r8, rbx
lea rdx, [rbp + 0x40]
lea rcx, [rsp + 0x30]
call fcn.140023580
lea rdx, [rsp + 0x30]
mov rcx, rsi
call fcn.140024890
nop
mov r8, qword [rsp + 0x78]
cmp r8, 8
jb 0x14004d2d1
inc r8
mov rdx, qword [rsp + 0x60]
call fcn.140023b90
mov rax, rsi
mov rcx, qword [rbp + 0x250]
xor rcx, rsp
call fcn.140055590
mov rbx, qword [rsp + 0x390]
add rsp, 0x360
pop rdi
pop rsi
pop rbp
ret
Function at 0x140050500
Capabilities:
Delete file

Disassembly:
push rbx
sub rsp, 0x150
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rbx, rcx
call fcn.140050400
cmp qword [rbx + 0x20], 8
jb 0x140050539
mov rcx, qword [rbx + 8]
jmp 0x14005053d
lea rcx, [rbx + 8]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400505dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea rdx, [rbx + 8]
lea rcx, [rsp + 0x38]
call fcn.1400291f0
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140024890
mov rbx, rax
lea rcx, [rsp + 0xe0]
call fcn.140024570
nop
lea rdx, str.Error_when_deleting_file:
mov rcx, rax
call fcn.14002bd50
mov rcx, rax
mov rdx, rbx
call fcn.140040a30
mov rcx, rax
lea rdx, str.Last_error:
call fcn.14002bd50
mov rcx, rax
lea rdx, [rsp + 0x20]
call fcn.140035970
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140024750
lea rdx, [0x1400afe00]
lea rcx, [rsp + 0x80]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140055590
add rsp, 0x150
pop rbx
ret

Function at 0x140050600
Capabilities:
Move file

Disassembly:
push rdi
sub rsp, 0x190
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x1b0], rbx
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov rdi, rdx
mov rbx, rcx
call fcn.140050400
cmp qword [rdi + 0x18], 8
jb 0x140050643
mov rdx, qword [rdi]
jmp 0x140050646
mov rdx, rdi
cmp qword [rbx + 0x20], 8
jb 0x140050653
mov rcx, qword [rbx + 8]
jmp 0x140050657
lea rcx, [rbx + 8]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x140050722
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov rdx, rdi
lea rcx, [rsp + 0x38]
call fcn.1400291f0
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140024890
mov rdi, rax
lea rdx, [rbx + 8]
lea rcx, [rsp + 0x58]
call fcn.1400291f0
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.140024890
mov rbx, rax
lea rcx, [rsp + 0x120]
call fcn.140024570
nop
mov rcx, rax
call fcn.1400511a0
mov rcx, rax
mov rdx, rbx
call fcn.140040a30
mov rcx, rax
call fcn.140051360
mov rcx, rax
mov rdx, rdi
call fcn.140040a30
mov rcx, rax
lea rdx, str.Last_error:
call fcn.14002bd50
mov rcx, rax
lea rdx, [rsp + 0x20]
call fcn.140035970
mov rdx, rax
lea rcx, [rsp + 0xc0]
call fcn.140024750
lea rdx, [0x1400afe00]
lea rcx, [rsp + 0xc0]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.140055590
mov rbx, qword [rsp + 0x1b0]
add rsp, 0x190
pop rdi
ret
Function at 0x140050900
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x180
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov esi, r8d
mov rdi, rdx
mov rbx, rcx
mov dword [rsp + 0x38], r8d
mov dword [rsp + 0x30], 0
test rdx, rdx
je 0x140050a29
mov edx, 0xc0000004
mov r9d, 2
call fcn.140050230
mov dword [rsp + 0x34], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x34]
mov r8d, esi
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140050a64
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea rdx, [rbx + 8]
lea rcx, [rsp + 0x50]
call fcn.1400291f0
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140024890
mov rbx, rax
lea rcx, [rsp + 0x110]
call fcn.140024570
nop
mov rcx, rax
call fcn.140051520
mov rcx, rax
lea rdx, [rsp + 0x38]
call fcn.140050e20
mov rcx, rax
lea rdx, str._bytes_to_file
call fcn.14002bd50
mov rcx, rax
mov rdx, rbx
call fcn.140040a30
mov rcx, rax
lea rdx, str.Last_error:
call fcn.14002bd50
mov rcx, rax
lea rdx, [rsp + 0x30]
call fcn.140035970
mov rdx, rax
lea rcx, [rsp + 0xb0]
call fcn.140024750
lea rdx, [0x1400afe00]
lea rcx, [rsp + 0xb0]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Invalid_data_passed
lea rcx, [rsp + 0x50]
call fcn.140023490
nop
mov dword [rsp + 0x30], 1
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.140037840
lea rdx, [0x1400b0090]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.140055590
add rsp, 0x180
pop rdi
pop rsi
pop rbx
ret
Function at 0x140050a80
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x170
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x1a8], rbx
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov edi, r8d
mov rsi, rdx
mov rbx, rcx
mov dword [rsp + 0x30], 0
test rdx, rdx
je 0x140050bf8
add rcx, 8
call fcn.1400500f0
cmp eax, edi
jb 0x140050bbd
mov rax, qword [rbx + 0x28]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140050aee
mov rcx, rbx
call fcn.140050400
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rbx
call fcn.140050230
mov dword [rsp + 0x34], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x34]
mov r8d, edi
mov rdx, rsi
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140050c33
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea rdx, [rbx + 8]
lea rcx, [rsp + 0x48]
call fcn.1400291f0
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140024890
mov rbx, rax
lea rcx, [rsp + 0x100]
call fcn.140024570
nop
lea rdx, str.Error_when_reading_file
mov rcx, rax
call fcn.14002bd50
mov rcx, rax
mov rdx, rbx
call fcn.140040a30
mov rcx, rax
lea rdx, str.Last_error:
call fcn.14002bd50
mov rcx, rax
lea rdx, [rsp + 0x30]
call fcn.140035970
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.140024750
lea rdx, [0x1400afe00]
lea rcx, [rsp + 0xa0]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Invalid_size_passed
lea rcx, [rsp + 0x48]
call fcn.140023490
nop
mov dword [rsp + 0x30], 2
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.140037840
lea rdx, [0x1400b0090]
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Invalid_data_passed
lea rcx, [rsp + 0x48]
call fcn.140023490
nop
mov dword [rsp + 0x30], 1
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.140037840
lea rdx, [0x1400b0090]
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.140055590
mov rbx, qword [rsp + 0x1a8]
add rsp, 0x170
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400547d0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x58
mov rax, qword [0x1400b4030]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea r8, [0x14009dcb4]
lea rcx, [rsp + 0x20]
call fcn.1400450f0
cmp qword [rsp + 0x38], 8
lea rcx, [rsp + 0x20]
cmovae rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov r8, qword [rsp + 0x38]
cmp r8, 8
jb 0x140054823
mov rdx, qword [rsp + 0x20]
inc r8
call fcn.140023b90
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140055590
add rsp, 0x58
ret