joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140041ad0
Capabilities:
Copy file

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rbx, rcx
test rcx, rcx
je 0x140041b15
cmp word [rcx], 0
je 0x140041b15
test rdx, rdx
je 0x140041b15
cmp word [rdx], 0
je 0x140041b15
call fcn.14006b3d4
mov rcx, rbx
test eax, eax
jne 0x140041b32
call fcn.140041d10
test rax, rax
jne 0x140041b22
lea ecx, [rax + 2]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov eax, 1
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
xor r8d, r8d
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov rbx, qword [rsp + 0x40]
cdqe
add rsp, 0x20
pop rdi
ret

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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
test rcx, rcx
je 0x140041e4f
cmp word [rcx], 0
je 0x140041e4f
lea rdx, vtable.CVolCommonBaseWithMemManager.0
mov qword [rbp - 0x60], rdx
lea rsi, vtable.CVolObject.0
mov qword [rbp - 0x60], rsi
xor edi, edi
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x50], rdi
lea rax, vtable.CWString.0
mov qword [rbp - 0x60], rax
lea rax, [rbp - 0x40]
mov qword [rbp + 0x20], rax
mov qword [rbp - 0x40], rdx
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rdi
mov qword [rbp - 0x30], rdi
lea r14, vtable.CVolMem.0
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x18], rdi
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x10], 0x40
mov qword [rbp - 0x48], rdi
mov qword [rbp - 0x10], 0xfe
cmp word [rcx], di
je 0x140041e06
cmp word [rcx + 2], di
je 0x140041e06
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp word [rcx + r8*2], 0
jne 0x140041dc0
cmp word [rcx + r8*2 - 2], 0x5c
jne 0x140041e06
cmp word [rcx + r8*2 - 4], 0x3a
je 0x140041e06
dec r8
mov rdx, rcx
lea rcx, [rbp - 0x60]
call fcn.1400452c0
mov rcx, qword [rbp - 0x48]
test rcx, rcx
jne 0x140041e06
lea rcx, [0x140090ec8]
cmp qword [rbp - 0x18], 0
cmovne rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rbx, rdi
cmp eax, 0xffffffff
setne bl
lea rax, [rbp - 0x40]
mov qword [rbp + 0x20], rax
mov qword [rbp - 0x40], r14
mov rdx, qword [rbp - 0x28]
test rdx, rdx
je 0x140041e36
lea rcx, [rbp - 0x40]
mov r8, qword [rbp - 0x40]
call qword [r8 + 0x18]
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x18], rdi
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x60], rsi
mov rax, rbx
jmp 0x140041e51
xor eax, eax
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x140041e70
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x10]
sub rsp, 0x110
test rcx, rcx
je 0x140041fd3
cmp word [rcx], 0
je 0x140041fd3
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x5c], xmm0
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
movups xmmword [rbp - 0x2c], xmm0
movups xmmword [rbp - 0x1c], xmm0
movups xmmword [rbp - 0xc], xmm0
mov dword [rbp + 4], eax
mov dword [rbp - 0x60], 0x68
test r8, r8
js 0x140041ed9
or dword [rbp - 0x24], 1
mov word [rbp - 0x20], r8w
lea rax, vtable.CVolCommonBaseWithMemManager.0
mov qword [rsp + 0x50], rax
lea rsi, vtable.CVolObject.0
mov qword [rsp + 0x50], rsi
xor edi, edi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], rdi
lea r14, vtable.CVolMem.0
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x70], rdi
mov qword [rbp - 0x80], 0x40
mov rdx, rcx
lea rcx, [rsp + 0x50]
call fcn.140043540
mov rdx, qword [rsp + 0x68]
cmp qword [rsp + 0x78], rdi
cmove rdx, rdi
lea rax, [rbp - 0x78]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x140041f75
mov ebx, edi
jmp 0x140041f9d
mov edx, 0x1f4
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.USER32.dll_WaitForInputIdle]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
mov qword [rsp + 0x50], r14
mov rdx, qword [rsp + 0x68]
test rdx, rdx
je 0x140041fba
lea rcx, [rsp + 0x50]
mov r8, qword [rsp + 0x50]
call qword [r8 + 0x18]
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x50], rsi
mov rax, rbx
jmp 0x140041fd5
xor eax, eax
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x140042cd0
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
movzx edi, cl
lea rax, [rdi - 0x60]
cmp rax, 9
ja 0x140042d55
sub rdi, 0x30
mov rbx, rdi
test rdi, rdi
je 0x140042d47
cmp rdi, 0x11
je 0x140042d11
mov ecx, 0x11
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x140042d11
mov rbx, rdi
bts rbx, 0xd
cmp rbx, 0x10
je 0x140042d2c
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x140042d2c
bts rbx, 0xf
cmp rbx, 0x12
je 0x140042d47
mov ecx, 0x12
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x140042d47
bts rbx, 0xe
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
cmp rdi, 0x6d
jne 0x140042d64
mov edi, 0xbd
mov ebx, edi
jmp 0x140042cf9
cmp rdi, 0x6e
jne 0x140042d73
mov edi, 0xbe
mov ebx, edi
jmp 0x140042cf9
cmp rdi, 0x6f
jne 0x140042d85
mov edi, 0xbf
mov ebx, edi
jmp 0x140042cf9
lea rax, [0x140092460]
mov rax, qword [rax + rdi*8]
cmp word [rax], 0
jne 0x140042ceb
mov rbx, qword [rsp + 0x30]
xor eax, eax
add rsp, 0x20
pop rdi
ret

Function at 0x140043810
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
sub rsp, 0x20
mov rbp, r8
mov rax, rdx
mov rbx, rcx
test rdx, rdx
je 0x140043924
cmp word [rdx], 0
je 0x140043924
lea rdx, [0x14009ba34]
mov qword [rsp + 0x30], rdi
mov rcx, rax
mov rsi, 0xffffffffffffffff
call fcn.140073758
mov rdi, rax
test rax, rax
je 0x1400438f4
cmp rbp, rsi
jne 0x14004388d
xor edx, edx
lea r8d, [rsi + 3]
mov rcx, rax
call fcn.14007027c
mov rcx, rdi
call fcn.140074188
xor r8d, r8d
movsxd rbp, eax
xor edx, edx
mov rcx, rdi
call fcn.14007027c
test rbp, rbp
jle 0x1400438ea
mov rdx, rbp
mov rcx, rbx
call fcn.1400433e0
mov rcx, rax
mov r9, rdi
mov r8, rbp
mov edx, 1
call fcn.140073ba8
mov rcx, rdi
mov rbp, rax
call fcn.1400742cc
test eax, eax
jne 0x1400438ec
mov rdx, rbp
mov rcx, rbx
call fcn.140043460
mov rcx, rdi
call fcn.14006bff8
mov rax, rbp
mov rdi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop rsi
ret
xor esi, esi
mov rcx, rdi
call fcn.14006bff8
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x140043907
mov r8, qword [rbx]
mov rcx, rbx
call qword [r8 + 0x18]
mov qword [rbx + 0x18], 0
mov rax, rsi
mov qword [rbx + 0x28], 0
mov qword [rbx + 0x20], 0
jmp 0x1400438d5
mov rbx, qword [rsp + 0x38]
mov rax, 0xffffffffffffffff
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop rsi
ret
Function at 0x140047170
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rdi, qword [rcx + 0x10]
mov rsi, rdx
mov rbx, rcx
test rdi, rdi
je 0x140047225
cmp qword [rdi], 0
mov rbx, qword [rcx]
je 0x1400471f1
lea rcx, str.Advapi32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je case.default.0x140047209
lea rdx, str.RegDeleteKeyTransactedW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je case.default.0x140047209
mov rdx, qword [rdi]
xor r9d, r9d
mov qword [rsp + 0x28], 0
xor r8d, r8d
mov qword [rsp + 0x20], rdx
mov rcx, rbx
mov rdx, rsi
call rax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
cmp dword [rdi + 8], 0
je case.default.0x140047209
mov rcx, rbx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
jmp qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov eax, 1
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
cmp byte [0x1400b8800], 0
jne 0x140047270
lea rcx, str.Advapi32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140047260
lea rdx, str.RegDeleteKeyExW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400b87f8], rax
mov byte [0x1400b8800], 1
jmp 0x140047277
mov rax, qword [0x1400b87f8]
mov byte [0x1400b8800], 1
jmp 0x140047277
mov rax, qword [0x1400b87f8]
mov rcx, qword [rbx]
mov rdx, rsi
test rax, rax
je 0x1400471fa
mov r8d, dword [rbx + 8]
xor r9d, r9d
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
jmp rax
call 0x151b822c2
push rcx
push rax
lahf
mov al, 9
jmp 0x18229ce37
Function at 0x140047a50
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x480
mov rax, qword [0x1400b4010]
xor rax, rsp
mov qword [rsp + 0x470], rax
mov r15, r9
mov rsi, r8
mov rbx, rdx
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x60], r14
xor edx, edx
lea r8d, [r14 + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x140047ad5
xor edx, edx
lea r8d, [r14 + 2]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x140047ad5
call fcn.140046f90
mov ebx, eax
jmp 0x140047bf7
mov r8, r15
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
jne 0x140047af6
call fcn.140046f90
jmp 0x140047be6
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x140047b19
call fcn.140046f90
jmp 0x140047be6
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov dword [rsp + 0x30], eax
inc eax
cmp eax, ebx
jae 0x140047b3b
mov ebx, 0x8007000e
jmp 0x140047be8
mov ecx, eax
test eax, eax
je 0x140047b70
xor edx, edx
mov rax, 0xffffffffffffffff
div rcx
cmp rax, 2
jb 0x140047c2f
lea rdx, [rcx + rcx]
cmp rdx, 0x400
jbe 0x140047b70
lea rcx, [rsp + 0x60]
call fcn.14004ac70
jmp 0x140047b7a
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
jmp 0x140047b8d
mov rax, qword [rsp + 0x60]
test rax, rax
jne 0x140047b9e
mov ebx, 0x8007000e
jmp 0x140047be8
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8, rsi
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x140047bc3
call fcn.140046f90
jmp 0x140047be6
mov ecx, eax
mov rax, qword [rsp + 0x60]
mov word [rax + rcx*2], r14w
mov r8d, dword [rsp + 0x4d0]
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x48]
call fcn.140048920
mov ebx, eax
test rdi, rdi
je 0x140047bf7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
lea rax, [rsp + 0x68]
cmp qword [rsp + 0x60], rax
je 0x140047c0e
lea rcx, [rsp + 0x60]
call fcn.14004ac60
nop
mov eax, ebx
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.140063fb0
add rsp, 0x480
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov ecx, 0x80070216
call fcn.140035ce0
int3
Function at 0x14006a9f4
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 0x14006a853
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14006a853
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14006a853
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14006a853
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14006a853
cmp dword [rcx + 0x84], 0xe
jbe 0x14006a853
cmp dword [rcx + 0xf8], 0
je 0x14006a853
mov ecx, ebx
call fcn.14006a910
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.14006a6e0
nop
cmp dword [rbp + 0x20], 0
je 0x14006a8a1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14006a8ac
int3
xor r8d, r8d
xor edx, edx
jmp 0x14006a7e4

Function at 0x140073fa4
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.140080ec0
sub rsp, rax
mov rax, qword [0x1400b4010]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14007619c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140073ff3
mov rax, rbp
jmp 0x1400740fb
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 + 0xb7890]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140076d78
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0xb7890]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1400740f7
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 0x1400740f7
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140076d78
test rax, rax
js 0x1400740f7
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1400740f7
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1400740e9
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x1400740e9
cmp byte [rcx], 0xd
jne 0x1400740cf
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x1400740de
cmp byte [rcx + 1], 0xa
jne 0x1400740de
inc rcx
jmp 0x1400740de
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0xb4340]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400740b1
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400740fb
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140063fb0
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 0x1400794b0
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x1400b7890]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x14007950e
cmp word [rdx], r12w
jne 0x14007950e
or byte [rax + r8*8 + 0x38], cl
jmp 0x140079514
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x14007966f
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14007964a
lea r9, [rcx + 2]
cmp ax, r13w
je 0x14007954d
mov rcx, r9
jmp 0x140079570
cmp r9, rdx
jae 0x140079587
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x140079531
jmp 0x14007966f
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140079644
cmp dword [rsp + 0x80], edi
je 0x140079644
mov rdx, r14
lea r11, [0x1400b7890]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x14007961d
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x1400795f0
mov word [rbx], r12w
jmp 0x14007966b
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x1400795f9
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14007966b
cmp word [rsp + 0x70], r12w
jne 0x14007962a
cmp rbx, rsi
je 0x1400795ea
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.140076d80
cmp word [rsp + 0x70], r12w
je 0x14007966f
mov word [rbx], r13w
jmp 0x14007966b
lea r11, [0x1400b7890]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140079667
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x14007966f
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140079ec4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x140079ef6
call fcn.14006b028
mov dword [rax], 0x16
call fcn.14006aeec
jmp 0x14007a015
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x14007a015
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x14007a015
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x140079f25
lock or dword [rcx + 0x14], 0x10
jmp 0x14007a015
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x140079f39
call fcn.14007d1fc
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.14007619c
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.14007995c
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x14007a003
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x140079fce
mov rcx, rsi
call fcn.14007619c
cmp eax, edi
je 0x140079fb9
mov rcx, rsi
call fcn.14007619c
cmp eax, 0xfffffffe
je 0x140079fb9
mov rcx, rsi
call fcn.14007619c
movsxd rbx, eax
lea r14, [0x1400b7890]
mov rcx, rsi
sar rbx, 6
call fcn.14007619c
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x140079fc0
lea rdx, [0x1400b42f0]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140079fce
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x140079ff2
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x140079ff2
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x140079ff2
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14007a018
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x14007b794
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14007b81b
mov rsi, rbx
cmp word [rax], bp
je 0x14007b7da
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14007b7c4
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14007b7c0
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140078108
mov rdi, rax
test rax, rax
je 0x14007b808
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140066230
mov rbp, rdi
xor ecx, ecx
call fcn.140075598
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140080030
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140076d80
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140076d80
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140080180
cmp rax, 0xffffffffffffffff
je 0x140080180
xor edi, edi
test rbp, rbp
jle 0x14008012b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14007a544
mov rbx, rax
test rax, rax
jne 0x1400800b8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140080121
mov edx, 0x8000
mov ecx, r14d
call fcn.1400752a4
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140077a74
cmp eax, 0xffffffff
je 0x140080101
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400800c8
mov edx, r15d
mov ecx, r14d
call fcn.1400752a4
jmp 0x140080121
cmp byte [rsi + 0x38], dil
je 0x140080118
cmp dword [rsi + 0x34], 5
jne 0x140080118
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140080121
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140075598
jmp 0x140080194
jns 0x140080194
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140076d80
cmp rax, 0xffffffffffffffff
jne 0x14008014c
cmp byte [rsi + 0x30], dil
je 0x140080194
mov edi, dword [rsi + 0x2c]
jmp 0x140080194
mov ecx, r14d
call fcn.14007c0f8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140080194
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140080194
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14008018d
mov eax, dword [rsi + 0x2c]
jmp 0x140080192
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140076d80
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x2fc4da250
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x2fc4dac52
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4ff108]
test eax, eax
je 0x2fc4dacea
lea rax, [0x2fc4ff0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4ff110]
mov qword [rbp - 8], rax
jmp 0x2fc4dacce
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4dacc2
cmp qword [rbp - 0x10], 0
je 0x2fc4dacc2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4dac88
lea rax, [0x2fc4ff0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4daceb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4dadf0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4dae18
mov eax, 0
jmp 0x2fc4dae66
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4dae41
mov eax, 0
jmp 0x2fc4dae66
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4dae61
mov eax, 0
jmp 0x2fc4dae66
mov eax, 1
add rsp, 0x20
pop rbp
ret