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

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140002b53
cmp byte [rcx + 0x71], 0
je 0x140002b53
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140002b4f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002b14
sub eax, 1
je 0x140002b18
cmp eax, 2
jne 0x140002b4f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003130
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140002b46
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140002b4f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140002afc
xor al, al
jmp 0x140002afc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003130
add rsp, 0x60
pop rbx
ret

Function at 0x140003ab0
Capabilities:
Parse pe header

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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400acc80]
mov dword [rax], 1
mov rax, qword [0x1400acc90]
mov dword [rax], 1
mov rax, qword [0x1400acca0]
mov dword [rax], 1
mov rax, qword [0x1400acc20]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
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 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140026250
Capabilities:
Query environment variable

Disassembly:
push r15
mov eax, 0x10088
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.140089330
sub rsp, rax
xor edx, edx
mov rbp, rcx
xor ecx, ecx
mov word [rsp + 0x80], dx
lea r15, [rsp + 0x30]
movzx eax, byte [rbp]
mov word [rsp + 0x30], cx
test al, al
je 0x140026315
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14009a238
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x1400262f6
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x1400262e8
test rsi, rsi
je 0x14009a238
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x1400262a8
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, r15
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x140026344
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10088
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140026360
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movzx eax, byte [rcx]
mov qword [rsp + 0xd8], rdx
xor edx, edx
mov rbp, rcx
lea r15, [rsp + 0x30]
mov word [rsp + 0x30], dx
test al, al
je 0x14002641d
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14009a23e
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x1400263fe
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x1400263f0
test rsi, rsi
je 0x14009a23e
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x1400263b0
mov rdx, qword [rsp + 0xd8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x14003d120
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, qword [0x1400be0d0]
mov rsi, rcx
test rbx, rbx
je 0x14003d1a0
mov rax, qword [0x1400acdc0]
mov rcx, qword [rax + 0x48]
cmp rbx, rcx
je 0x14003d190
mov rdx, qword [0x1400be308]
test rdx, rdx
je 0x14003d298
mov rcx, rbx
mov rbx, qword [sym.imp.python310.dll_PyNumber_InPlaceAdd]
call rbx
mov rcx, rax
mov rdx, rsi
mov rax, rbx
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp rax
mov rbx, qword [sym.imp.python310.dll_PyNumber_InPlaceAdd]
jmp 0x14003d171
lea r15, str.NUITKA_ONEFILE_BINARY
mov rcx, r15
call fcn.140026250
test rax, rax
je 0x14003d2b8
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python310.dll_PyUnicode_FromWideChar]
xor ecx, ecx
mov r13, r14
lea r12, [r15 + 0x28]
mov word [rsp + 0x40], cx
lea rbp, [rsp + 0x3a]
lea rdi, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
mov eax, 0x4e
nop
mov rbx, r12
mov r8d, 2
mov rdx, rbp
mov rcx, rdi
sub rbx, r15
mov byte [rsp + 0x3a], al
mov byte [rsp + 0x3b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14009a2f0
cmp word [r13], 0
movzx edx, word [rsp + 0x3c]
mov rax, r13
je 0x14003d23e
nop word [rax + rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x14003d230
test rbx, rbx
je 0x14009a2f0
mov word [rax], dx
add r15, 1
xor edx, edx
add r13, 2
mov word [rax + 2], dx
movzx eax, byte [r15]
test al, al
jne 0x14003d1f0
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python310.dll__PyRuntime]
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rax + 0x1f0]
call fcn.14003d060
mov rbx, rax
mov qword [0x1400be0d0], rbx
jmp 0x14003d142
lea rcx, [0x1400a9410]
call qword [sym.imp.python310.dll_PyUnicode_FromString]
mov qword [0x1400be308], rax
mov rdx, rax
jmp 0x14003d162
mov rbx, qword [0x1400be0e8]
test rbx, rbx
jne 0x14003d286
cmp byte [0x1400be302], 0
je 0x14003d2f6
mov rdx, 0xffffffffffffffff
lea rcx, [0x1400be100]
call qword [sym.imp.python310.dll_PyUnicode_FromWideChar]
mov qword [0x1400be0e8], rax
mov rbx, rax
test rax, rax
je 0x14003d302
add qword [rax], 1
jmp 0x14003d286
mov ecx, 1
call fcn.140026e70
jmp 0x14003d2cd
call qword [sym.imp.python310.dll_PyErr_Print]
call sub.msvcrt.dll_abort
nop
nop
call sub.msvcrt.dll_abort
nop
Function at 0x14003ec40
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rsi, str.NUITKA_ONEFILE_BINARY
mov ebx, ecx
mov rcx, rsi
call fcn.140026250
test rax, rax
je 0x14003eda0
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python310.dll_PyUnicode_FromWideChar]
xor ecx, ecx
mov r15, r14
lea r12, [rsi + 0x28]
mov word [rsp + 0x40], cx
mov r13, rax
lea rbp, [rsp + 0x3a]
mov eax, 0x4e
lea rdi, [rsp + 0x3c]
nop word [rax + rax]
mov rbx, r12
mov r8d, 2
mov rdx, rbp
mov rcx, rdi
sub rbx, rsi
mov byte [rsp + 0x3a], al
mov byte [rsp + 0x3b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x14009a30e
cmp word [r15], 0
movzx edx, word [rsp + 0x3c]
mov rax, r15
je 0x14003ecf6
nop dword [rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x14003ece8
test rbx, rbx
je 0x14009a30e
mov word [rax], dx
add rsi, 1
xor edx, edx
add r15, 2
mov word [rax + 2], dx
movzx eax, byte [rsi]
test al, al
jne 0x14003eca8
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python310.dll__PyRuntime]
mov rdx, qword [0x1400bea40]
mov rsi, qword [rax + 0x1f0]
mov rax, qword [0x1400acdc0]
mov rbx, qword [rax + 0x1c0]
test rdx, rdx
je 0x14003edf0
mov r8, rbx
mov rcx, rsi
call fcn.1400292d0
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.14003a950
sub qword [rbx], 1
jne 0x14003ed84
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [rdx + 0x30]
mov rax, qword [rsp + 0x28]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x1400be0e0]
lea rsi, [0x1400be0e0]
test bl, bl
je 0x14003edc0
mov rax, qword [0x1400be0e8]
lea rsi, [0x1400be0e8]
test rax, rax
jne 0x14003ed84
cmp byte [0x1400be302], 0
je 0x14003ee1d
mov rdx, 0xffffffffffffffff
lea rcx, [0x1400be100]
call qword [sym.imp.python310.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x14003ee27
add qword [rax], 1
jmp 0x14003ed84
mov rdx, qword [0x1400be9b8]
mov rdi, qword [rax + 0x1b0]
test rdx, rdx
je 0x14003ee32
mov r8, rdi
mov rcx, rsi
call fcn.1400292d0
mov qword [0x1400bea40], rax
mov rdx, rax
jmp 0x14003ed4e
movzx ecx, bl
call fcn.140026e70
jmp 0x14003edce
call qword [sym.imp.python310.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x1400a4e1e]
call qword [sym.imp.python310.dll_PyImport_ImportModule]
mov qword [0x1400be9b8], rax
mov rdx, rax
test rax, rax
je 0x14009a30e
jmp 0x14003ee03
Function at 0x14007f6c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x1400be0c9], 0
mov rbp, rcx
mov rdi, rdx
mov r12, r8
je 0x14007f768
lea rdx, [0x1400a8b9a]
mov rcx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x14007f7d0
mov rbx, qword [0x1400bdf68]
jmp 0x14007f705
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, r12
call sub.msvcrt.dll_strcmp
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_strlen
lea rdx, [rbx + rax + 1]
mov eax, dword [rdx]
test esi, esi
jne 0x14007f700
movzx eax, word [rdx + 4]
lea r8, [rdx + 6]
test ax, ax
je 0x14007f757
lea rbx, [rdi + rax*8]
nop word cs:[rax + rax]
mov rdx, rdi
mov rcx, rbp
add rdi, 8
call fcn.14006eaf0
mov r8, rax
cmp rdi, rbx
jne 0x14007f740
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov r8d, 0xa
xor ecx, ecx
mov edx, 3
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
xor ecx, ecx
lea rdx, [rax + 4]
mov qword [0x1400bdf68], rax
mov ebx, dword [rax]
mov qword [0x1400bdf68], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x1400bdf68], rdx
call fcn.14007e7f0
cmp eax, ebx
jne 0x14007f857
mov byte [0x1400be0c9], 1
jmp 0x14007f6e0
cmp byte [0x1400be0c8], 0
jne 0x14007f6f7
mov rbx, qword [sym.imp.python310.dll_PyDict_New]
call rbx
mov qword [0x1400bec48], rax
call rbx
mov qword [0x1400bec40], rax
call rbx
mov qword [0x1400bec38], rax
call rbx
mov qword [0x1400bec30], rax
call rbx
mov qword [0x1400bec28], rax
call rbx
mov qword [0x1400bec20], rax
call rbx
mov qword [0x1400bec18], rax
call rbx
mov byte [0x1400be0c8], 1
mov qword [0x1400bec10], rax
mov rax, qword [sym.imp.python310.dll__PyRuntime]
mov rax, qword [rax + 0x1f0]
mov rax, qword [rax + 0x10]
add rax, 0xda0
mov qword [0x1400bdf60], rax
jmp 0x14007f6f7
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140088010
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 fcn.140099790
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.140099790
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x140088ce2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400bf108]
test eax, eax
je 0x140088d7a
lea rax, [0x1400bf0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400bf110]
mov qword [rbp - 8], rax
jmp 0x140088d5e
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 0x140088d52
cmp qword [rbp - 0x10], 0
je 0x140088d52
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 0x140088d18
lea rax, [0x1400bf0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140088d7b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140088e80
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 0x140088ea8
mov eax, 0
jmp 0x140088ef6
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 0x140088ed1
mov eax, 0
jmp 0x140088ef6
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 0x140088ef1
mov eax, 0
jmp 0x140088ef6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x140088efc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140088f7a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140088f71
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140088f71
mov rax, qword [rbp - 8]
jmp 0x140088f8f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140088f44
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001100
Capabilities:
Log keystrokes via application hook

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_AllocConsole]
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov rcx, rax
xor edx, edx
call qword [sym.imp.USER32.dll_ShowWindow]
xor r9d, r9d
lea rdx, [0x140001060]
xor r8d, r8d
mov ecx, 0xd
call qword [sym.imp.USER32.dll_SetWindowsHookExW]
xor r9d, r9d
lea rcx, [rsp + 0x20]
xor r8d, r8d
xor edx, edx
mov rbx, rax
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jle 0x14000118d
nop
lea rcx, [rsp + 0x20]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x20]
call qword [sym.imp.USER32.dll_DispatchMessageW]
xor r9d, r9d
lea rcx, [rsp + 0x20]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jg 0x140001160
mov rcx, rbx
call qword [sym.imp.USER32.dll_UnhookWindowsHookEx]
xor eax, eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400011c0
add rsp, 0x60
pop rbx
ret

Function at 0x140001bd8
Capabilities:
Parse pe header

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

Function at 0x140007534
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 0x1400075a3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400075a3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400075a3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400075a3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400075a3
cmp dword [rcx + 0x84], 0xe
jbe 0x1400075a3
cmp dword [rcx + 0xf8], 0
je 0x1400075a3
mov ecx, ebx
call fcn.140007654
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.140007430
nop
cmp dword [rbp + 0x20], 0
je 0x1400075f1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1400075fc
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x140007534

Function at 0x140007738
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140007534
Function at 0x14000ce50
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 0x14000ce80
xor eax, eax
jmp 0x14000cf43
mov rbp, rbx
cmp word [rax], si
je 0x14000cea5
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000ce8c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000ce88
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.14000cd70
movsxd r14, eax
test eax, eax
jne 0x14000cee3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000ce79
mov rcx, r14
call fcn.140009690
mov rdi, rax
test rax, rax
jne 0x14000cefc
xor ecx, ecx
call fcn.14000813c
jmp 0x14000ced8
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.14000cd70
test eax, eax
jne 0x14000cf2d
mov rcx, rdi
call fcn.14000813c
jmp 0x14000cf37
xor ecx, ecx
call fcn.14000813c
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 0x1400113ac
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400113c2
mov al, 1
jmp 0x140011422
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400113d3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140011420
mov ecx, dword [rcx + 0x18]
nop
call fcn.14000d528
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140011420
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140011420
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140011420
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140011422
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x1400134cc
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, [0x140023410]
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 0x140013523
cmp word [rdx], r13w
jne 0x140013523
or byte [rax + rdi*8 + 0x38], cl
jmp 0x140013528
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14001364d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14001366e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140013561
mov rdx, r9
mov word [rbx], cx
jmp 0x140013588
cmp r9, r8
jae 0x140013598
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 0x140013542
jmp 0x14001364d
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 0x140013642
cmp dword [rsp + 0x80], esi
je 0x140013642
lea r8, [0x140023410]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001361a
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400135ea
mov word [rbx], r13w
jmp 0x14001364a
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 0x1400135f7
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001364a
cmp word [rsp + 0x70], r13w
jne 0x140013627
cmp rbx, r14
je 0x1400135e4
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400133ec
cmp word [rsp + 0x70], r13w
je 0x14001364d
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, [0x140023410]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x140013647
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14001364d