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

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140002600
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140002600
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140001830
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007094]
mov rbx, rcx
test esi, esi
jle 0x140001960
mov rax, qword [0x140007098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000187b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001905
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001860
mov rcx, rbx
call fcn.1400022a0
mov rdi, rax
test rax, rax
je 0x140001982
mov rax, qword [0x140007098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400023e0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140007098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001967
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400018fe
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001910
add dword [0x140007094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140007098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400018fe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400017c0
nop dword [rax]
xor esi, esi
jmp 0x140001888
mov rax, qword [0x140007098]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400017c0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400017c0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140001f10
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x140001f6c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140001f63
test eax, eax
jne 0x140001f63
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001f48
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x1400022a0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140004520]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400022c0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400022c8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400022c0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000231d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140002314
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400022c0
add rax, 0x28
cmp rax, r9
jne 0x140002300
xor eax, eax
ret

Function at 0x140002320
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004520]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000233f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002348
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000233f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x1400023e0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004520]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400023ff
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002408
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140002750
Capabilities:
Allocate or change rwx memory
Create thread
Spawn thread to rwx shellcode

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x190
lea rsi, [0x140004038]
call fcn.1400015b0
lea rbx, [rsp + 0x40]
mov ecx, 0x29
mov r8d, 0x3000
mov rdi, rbx
mov r9d, 0x40
mov edx, 0x149
rep movsq qword [rdi], qword [rsi]
movzx eax, byte [rsi]
mov byte [rdi], al
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8, rax
test rax, rax
je 0x14000280e
mov rax, qword [rsp + 0x40]
lea rdi, [r8 + 8]
mov rcx, r8
xor r9d, r9d
and rdi, 0xfffffffffffffff8
xor edx, edx
mov qword [r8], rax
sub rcx, rdi
mov rax, qword [rsp + 0x181]
sub rbx, rcx
add ecx, 0x149
mov qword [r8 + 0x141], rax
mov rsi, rbx
shr ecx, 3
lea rax, [rsp + 0x3c]
rep movsq qword [rdi], qword [rsi]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
test rax, rax
je 0x14000282e
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
add rsp, 0x190
pop rbx
pop rsi
pop rdi
ret
mov rcx, qword [sym.imp.libstdc_6.dll_std::cerr]
lea rdx, str.Failed_to_allocate_memory
call fcn.1400014d0
mov rcx, rax
call fcn.140001450
or eax, 0xffffffff
jmp 0x140002803
mov rcx, qword [sym.imp.libstdc_6.dll_std::cerr]
lea rdx, str.Failed_to_create_thread
call fcn.1400014d0
mov rcx, rax
call fcn.140001450
jmp 0x140002829
Function at 0x140002434
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000247e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000247e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000247e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000247e
cmp dword [rcx + 0x84], 0xe
jbe 0x14000247e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002480
xor al, al
add rsp, 0x28
ret
Function at 0x140001000
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 0x18
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x140001053
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_in_CryptAcquireContextW___u__n
call fcn.140001bf0
nop
jmp 0x14000116a
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x800c
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x140001091
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_in_CryptCreateHash___u__n
call fcn.140001bf0
nop
jmp 0x14000116a
xor r9d, r9d
mov r8d, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x1400010c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_in_CryptHashData___u__n
call fcn.140001bf0
nop
jmp 0x14000116a
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0x38]
mov edx, 0x6610
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x140001104
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_in_CryptDeriveKey___u__n
call fcn.140001bf0
nop
jmp 0x14000116a
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x140001146
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_in_CryptDecrypt___u__n
call fcn.140001bf0
nop
jmp 0x14000116a
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
nop
add rsp, 0x58
ret
Function at 0x14000236c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400023b6
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400023b6
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400023b6
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400023b6
cmp dword [rcx + 0x84], 0xe
jbe 0x1400023b6
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400023b8
xor al, al
add rsp, 0x28
ret

Function at 0x140007eac
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140007f1b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140007f1b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140007f1b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140007f1b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140007f1b
cmp dword [rcx + 0x84], 0xe
jbe 0x140007f1b
cmp dword [rcx + 0xf8], 0
je 0x140007f1b
mov ecx, ebx
call fcn.140007fc0
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140007db4
nop
cmp dword [rbp + 0x20], 0
jne 0x140007f7c
call fcn.14000dfec
cmp eax, 1
jne 0x140007f6c
xor dl, dl
jmp 0x140007f76
call fcn.14000dfb8
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x140007f87
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140007f90
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x140007eac

Function at 0x140008094
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140007eac
Function at 0x14000d9a8
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14000d9d8
xor eax, eax
jmp 0x14000da9b
mov rbp, rbx
cmp word [rax], si
je 0x14000d9fd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000d9e4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000d9e0
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14000d8c8
movsxd r14, eax
mov rcx, r14
test eax, eax
jne 0x14000da3e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000d9d1
call fcn.140009d40
mov rdi, rax
test rax, rax
jne 0x14000da54
xor ecx, ecx
call fcn.140008ef0
jmp 0x14000da33
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14000d8c8
test eax, eax
jne 0x14000da85
mov rcx, rdi
call fcn.140008ef0
jmp 0x14000da8f
xor ecx, ecx
call fcn.140008ef0
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140010180
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
xor edi, edi
mov rax, r15
lea rcx, [0x140023f90]
and eax, 0x3f
mov r12, r15
sar r12, 6
mov rsi, rdx
lea r9d, [rdi + 0xa]
mov r14, r15
lea rbp, [rax + rax*8]
mov rax, qword [rcx + r12*8]
mov r10, qword [rax + rbp*8 + 0x28]
test r8, r8
je 0x1400101d6
cmp word [rdx], r9w
jne 0x1400101d6
or byte [rax + rbp*8 + 0x38], 4
jmp 0x1400101db
and byte [rax + rbp*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rax, rsi
mov rbx, rsi
cmp rsi, r8
jae 0x14001035a
mov r11d, 0xd
lea r13d, [r11 - 0xb]
movzx edx, word [rax]
cmp dx, 0x1a
je 0x140010325
lea rcx, [rax + 2]
cmp dx, r11w
jne 0x140010223
cmp rcx, r8
jae 0x140010243
cmp word [rcx], r9w
jne 0x140010223
add rax, 4
mov edx, r9d
jmp 0x140010226
mov rax, rcx
mov word [rbx], dx
mov r9, r13
mov rcx, rbx
mov r9d, 0xa
lea rbx, [rbx + r13]
cmp rax, r8
jb 0x1400101f8
jmp 0x14001035a
lea r9, [rsp + 0x80]
mov word [rsp + 0x70], di
mov r8d, r13d
mov dword [rsp + 0x80], edi
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x20], rdi
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001031e
cmp dword [rsp + 0x80], edi
je 0x14001031e
lea r9, [0x140023f90]
mov rax, qword [r9 + r12*8]
test byte [rax + rbp*8 + 0x38], 0x48
mov ebp, 0xa
je 0x1400102f8
movzx eax, word [rsp + 0x70]
cmp ax, bp
jne 0x1400102ab
mov word [rbx], bp
jmp 0x140010357
mov word [rsp + 0x78], ax
mov rdx, r14
mov rax, r14
sar rdx, 6
and eax, 0x3f
mov word [rbx], 0xd
lea r8, [rax + rax*8]
mov rax, qword [r9 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, r13
jl 0x1400102c6
mov rax, r14
sar rax, 6
and r14d, 0x3f
mov rax, qword [r9 + rax*8]
lea rcx, [r14 + r14*8]
mov byte [rax + rcx*8 + 0x3c], bpl
jmp 0x140010357
cmp word [rsp + 0x70], bp
jne 0x140010304
cmp rbx, rsi
je 0x1400102a3
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140013f40
cmp word [rsp + 0x70], bp
je 0x14001035a
mov word [rbx], 0xd
jmp 0x140010357
mov rcx, r15
lea r9, [0x140023f90]
and ecx, 0x3f
mov rax, r15
sar rax, 6
lea r8, [rcx + rcx*8]
mov rcx, qword [r9 + rax*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140010354
or al, r13b
mov byte [rcx + r8*8 + 0x38], al
jmp 0x14001035a
mov word [rbx], dx
add rbx, r13
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400127ec
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140012802
mov al, 1
jmp 0x14001286e
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140012813
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001286c
mov ecx, dword [rcx + 0x18]
nop
call fcn.14000e2c8
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001286c
and qword [rsp + 0x38], 0
lea r8, [rsp + 0x38]
mov r9d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001286c
and qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001286c
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001286e
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400137ec
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14000c980
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140013876
cmp byte [rbp - 0x21], r15b
je 0x140013871
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400138ac
call fcn.140009190
test eax, eax
jne 0x140013898
cmp byte [rbp - 0x21], r15b
je 0x140013890
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400138ac
cmp byte [rbp - 0x21], r15b
je 0x1400138a9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.14000bf14
test eax, eax
jne 0x14001394c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000c980
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400138eb
cmp byte [rbp - 0x21], r15b
je 0x140013920
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140013920
call fcn.140009190
test eax, eax
jne 0x14001390c
cmp byte [rbp - 0x21], r15b
je 0x140013905
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140013920
cmp byte [rbp - 0x21], r15b
je 0x14001391d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.14000bf14
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14001394c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14001394f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14001395d
mov rcx, rdi
call fcn.140008ef0
cmp byte [rbp + 0x3f], r15b
je 0x14001396c
mov rcx, qword [rbp + 0x27]
call fcn.140008ef0
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x140015dc0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140015de8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140015de8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001070
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x250
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rbx, r8
lea rcx, [rsp + 0x130]
mov r8d, 0x104
xor edx, edx
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x20]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x140001111
lea r9, [rsp + 0x20]
mov edx, 0x104
lea r8, str._sSettings.ini
lea rcx, [rsp + 0x130]
call fcn.140001010
lea r9, [rsp + 0x130]
mov r8, rbx
lea rdx, str.Executable
lea rcx, str.Settings
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
xor ecx, ecx
test eax, eax
setne cl
mov eax, ecx
jmp 0x140001113
xor eax, eax
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1400026d0
add rsp, 0x250
pop rbx
ret
Function at 0x140002570
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rbp, r8
mov qword [rsp + 0x30], 0
mov rsi, rdx
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140002649
xor edx, edx
mov qword [rsp + 0x50], rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp eax, 0xffffffff
je 0x140002619
mov ecx, ebx
call fcn.1400026f8
mov r9, rbp
mov qword [rsi], rax
mov r8d, ebx
mov qword [rsp + 0x20], 0
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140002639
mov rbx, qword [rsi]
mov rcx, rbx
call fcn.1400026f0
test rbx, rbx
je 0x140002619
mov qword [rsi], 0x8123
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x140002624
mov rbp, qword [rsp + 0x58]
xor eax, eax
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret

Function at 0x140002fe4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000302e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000302e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000302e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000302e
cmp dword [rcx + 0x84], 0xe
jbe 0x14000302e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140003030
xor al, al
add rsp, 0x28
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400099d0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400099e0]
mov dword [rax], 1
mov rax, qword [0x1400099f0]
mov dword [rax], 1
mov rax, qword [0x1400099c0]
mov dword [rax], 1
mov rax, qword [0x140009880]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x1400099b0]
mov dword [0x14000c00c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x1400010c0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140009970]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140009950]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140009830]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067

Function at 0x1400015e4
Capabilities:
Create process on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xe0
lea rax, [rbp - 0x70]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x70], 0x68
lea rax, [rbp - 0x90]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp - 0x90]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
lea rdx, str.notepad.exe
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
jne 0x140001691
lea rcx, str.Failed_to_create_process._n
call sym.printf
jmp 0x14000169d
lea rcx, str.Process_created_successfully._n
call sym.printf
mov rax, qword [rbp - 0x90]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp - 0x90]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
nop
add rsp, 0xe0
pop rbp
ret