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

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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.6d0875c0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.6d0875c0
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x6d081590
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x6d7d1064]
mov r12, rcx
test ebx, ebx
jle 0x6d0816c0
mov rax, qword [0x6d7d1068]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x6d0815dc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x6d081663
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x6d0815c0
mov rcx, r12
call fcn.6d081d20
mov rsi, rax
test rax, rax
je 0x6d0816e2
mov rax, qword [0x6d7d1068]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.6d081e50
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x6d7d1068]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d0816c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x6d08165c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x6d081670
add dword [0x6d7d1064], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x6d7d1068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x6d08165c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.6d081520
nop dword [rax]
xor ebx, ebx
jmp 0x6d0815e7
mov rax, qword [0x6d7d1068]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.6d081520
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.6d081520
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x6d081990
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6d7d10a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6d7d1080]
test rbx, rbx
je 0x6d0819e4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x6d0819db
test r12, r12
je 0x6d0819db
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d0819c0
lea rcx, [0x6d7d10a0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6d081d20
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x6d14ab50]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x6d081d40
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x6d081d48
ret
cmp word [r8 + 0x18], 0x20b
jne 0x6d081d40
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x6d081d95
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x6d081d8c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d081d40
add rax, 0x28
cmp rax, r9
jne 0x6d081d78
xor eax, eax
ret

Function at 0x6d081da0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x6d14ab50]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x6d081dc0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x6d081dc8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x6d081dc0
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x6d081e50
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x6d14ab50]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x6d081e70
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x6d081e78
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x6d144588
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov eax, dword [0x6d7d1b28]
mov ecx, dword [0x6d7d1b00]
lea edx, [rax - 1]
imul edx, eax
test dl, 1
sete al
sete byte [rsp + 0x26]
cmp ecx, 0xa
setl byte [rsp + 0x27]
setl cl
or cl, al
mov eax, 0x8d21afb2
mov r8d, 0xfb36163d
cmovne r8d, eax
mov r9d, 0x1f84d585
mov eax, 0x77ff3dba
cmove r9d, eax
mov eax, 0xe2789863
mov r10d, 0xdc590989
cmovne r10d, eax
mov ecx, 0xe5c31bae
mov eax, 0xb1eb8810
cmp ecx, 0xf49ec8e6
jle 0x6d144612
cmp ecx, 0x24f560e4
jle 0x6d144634
cmp ecx, 0x24f560e5
je 0x6d144658
cmp ecx, 0x77ff3dba
jne 0x6d1445ed
mov ecx, r8d
jmp 0x6d1445ed
cmp ecx, 0xdc590988
jle 0x6d144646
cmp ecx, 0xe5c31bae
je 0x6d14465f
cmp ecx, 0xdc590989
je 0x6d14468a
cmp ecx, 0xe2789863
jne 0x6d1445ed
jmp 0x6d14468a
cmp ecx, 0xf49ec8e7
je 0x6d14467a
cmp ecx, 0xfb36163d
jne 0x6d1445ed
jmp 0x6d14468a
cmp ecx, 0xb1eb8810
je 0x6d144682
cmp ecx, 0x8d21afb2
jne 0x6d1445ed
jmp 0x6d14468a
mov ecx, 0xb1eb8810
jmp 0x6d1445ed
mov dl, byte [rsp + 0x26]
cmp byte [rsp + 0x27], 0
mov ecx, 0x77ff3dba
cmovne ecx, eax
test dl, dl
cmovne ecx, eax
jmp 0x6d1445ed
mov ecx, r9d
jmp 0x6d1445ed
mov ecx, r10d
jmp 0x6d1445ed
call fcn.6d12ace2
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x140001110
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x48
lea rcx, str.____allocating_memory_for_payload._n
call fcn.1400013a0
mov eax, dword [rsp + 0x58]
mov r9d, 0x40
mov r8d, 0x3000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140001163
lea rcx, str.____unable_to_allocate_memory._n
call fcn.1400013a0
xor eax, eax
jmp 0x1400011f3
mov rdx, qword [rsp + 0x28]
lea rcx, str.____writing_code_to_0x_p._n
call fcn.1400013a0
mov eax, dword [rsp + 0x58]
mov r8d, eax
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x28]
call fcn.140016680
mov eax, dword [rsp + 0x58]
lea r9, [rsp + 0x20]
mov r8d, 0x20
mov edx, eax
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rcx, [0x140023090]
call fcn.1400013a0
call fcn.140004d9c
lea rcx, str.____jumping_to_shellcode._n
call fcn.1400013a0
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
call qword [rsp + 0x30]
lea rcx, str.____shellcode_completed_execution._n
call fcn.1400013a0
lea rcx, str.____press_any_key_to_continue._n
call fcn.1400013a0
call fcn.140004d9c
mov eax, 1
add rsp, 0x48
ret

Function at 0x140001200
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x1400012ad
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
add eax, 0x10
mov eax, eax
mov ecx, eax
call fcn.140004a94
mov rcx, qword [rsp + 0x68]
mov qword [rcx], rax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
mov rax, qword [rsp + 0x68]
mov rdx, qword [rax]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [rsp + 0x44]
add rsp, 0x58
ret

Function at 0x140001ee4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001f2e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001f2e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001f2e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001f2e
cmp dword [rcx + 0x84], 0xe
jbe 0x140001f2e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001f30
xor al, al
add rsp, 0x28
ret
Function at 0x1400085a4
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 0x140008613
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140008613
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140008613
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140008613
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140008613
cmp dword [rcx + 0x84], 0xe
jbe 0x140008613
cmp dword [rcx + 0xf8], 0
je 0x140008613
mov ecx, ebx
call fcn.1400086c4
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.1400084a0
nop
cmp dword [rbp + 0x20], 0
je 0x140008661
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000866c
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x1400085a4

Function at 0x1400087a8
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400085a4
Function at 0x14000dc30
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 0x14000dc60
xor eax, eax
jmp 0x14000dd23
mov rbp, rbx
cmp word [rax], si
je 0x14000dc85
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000dc6c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000dc68
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.14000db50
movsxd r14, eax
test eax, eax
jne 0x14000dcc3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000dc59
mov rcx, r14
call fcn.1400090e8
mov rdi, rax
test rax, rax
jne 0x14000dcdc
xor ecx, ecx
call fcn.1400090ac
jmp 0x14000dcb8
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.14000db50
test eax, eax
jne 0x14000dd0d
mov rcx, rdi
call fcn.1400090ac
jmp 0x14000dd17
xor ecx, ecx
call fcn.1400090ac
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 0x140010314
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
lea r9, [0x140024740]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x14001036b
cmp word [rdx], r13w
jne 0x14001036b
or byte [rax + rdi*8 + 0x38], cl
jmp 0x140010370
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140010495
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400104b6
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400103a9
mov rdx, r9
mov word [rbx], cx
jmp 0x1400103d0
cmp r9, r8
jae 0x1400103e0
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x14001038a
jmp 0x140010495
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001048a
cmp dword [rsp + 0x80], esi
je 0x14001048a
lea r8, [0x140024740]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x140010462
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140010432
mov word [rbx], r13w
jmp 0x140010492
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14001043f
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x140010492
cmp word [rsp + 0x70], r13w
jne 0x14001046f
cmp rbx, r14
je 0x14001042c
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140014294
cmp word [rsp + 0x70], r13w
je 0x140010495
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
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
lea r8, [0x140024740]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001048f
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140010495
Function at 0x140012aac
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140012ac2
mov al, 1
jmp 0x140012b22
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140012ad3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140012b20
mov ecx, dword [rcx + 0x18]
nop
call fcn.14000e550
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140012b20
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140012b20
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140012b20
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140012b22
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140013b60
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.14000cc20
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140013bea
cmp byte [rbp - 0x21], r15b
je 0x140013be5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140013c20
call fcn.1400098b4
test eax, eax
jne 0x140013c0c
cmp byte [rbp - 0x21], r15b
je 0x140013c04
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140013c20
cmp byte [rbp - 0x21], r15b
je 0x140013c1d
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.14000c200
test eax, eax
jne 0x140013cc0
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000cc20
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140013c5f
cmp byte [rbp - 0x21], r15b
je 0x140013c94
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140013c94
call fcn.1400098b4
test eax, eax
jne 0x140013c80
cmp byte [rbp - 0x21], r15b
je 0x140013c79
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140013c94
cmp byte [rbp - 0x21], r15b
je 0x140013c91
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.14000c200
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140013cc0
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140013cc3
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140013cd1
mov rcx, rdi
call fcn.1400090ac
cmp byte [rbp + 0x3f], r15b
je 0x140013ce0
mov rcx, qword [rbp + 0x27]
call fcn.1400090ac
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 0x140016290
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400162b8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400162b8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140002160
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x1400ddfc0]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rbx, rdx
xor dil, dil
cmp qword [rdx + 0x10], 0
je 0x14000224a
mov rax, qword [rcx]
call qword [rax + 0x10]
test al, al
jne 0x14000224a
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.1400041d0
nop
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 7
cmova rcx, qword [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1400021c8
mov dil, 1
jmp 0x140002205
lea rdx, str.Error_creating_directory
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400165b0
mov r8, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0xf
jbe 0x1400021e9
mov rbx, qword [rbx]
mov rdx, rbx
mov rcx, rax
call fcn.140018d60
lea rdx, [0x140016790]
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]
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 7
jbe 0x14000224a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002245
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002245
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009fb90
movzx eax, dil
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14009f750
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x140012c90
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140012cb8
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x140012cde
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140012ce0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140012d39
test ecx, ecx
jle 0x140012d19
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140012d39
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140012d39
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x140012d60
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140012d82
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140012d98
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140012db4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140012db6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140012df2
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x140012e8e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140012e2d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x140012e6e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x140012e8e
cmp rbx, rax
ja 0x140012e40
test rbx, rbx
je 0x140012e8e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret