joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14007a5ac
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.14006e304
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14006e304
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14007a6fc
cmp rax, 0xffffffffffffffff
je 0x14007a6fc
xor edi, edi
test rbp, rbp
jle 0x14007a6a7
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14006c008
mov rbx, rax
test rax, rax
jne 0x14007a634
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14007a69d
mov edx, 0x8000
mov ecx, r14d
call fcn.14006b824
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.140070090
cmp eax, 0xffffffff
je 0x14007a67d
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14007a644
mov edx, r15d
mov ecx, r14d
call fcn.14006b824
jmp 0x14007a69d
cmp byte [rsi + 0x38], dil
je 0x14007a694
cmp dword [rsi + 0x34], 5
jne 0x14007a694
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14007a69d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14006c080
jmp 0x14007a710
jns 0x14007a710
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14006e304
cmp rax, 0xffffffffffffffff
jne 0x14007a6c8
cmp byte [rsi + 0x30], dil
je 0x14007a710
mov edi, dword [rsi + 0x2c]
jmp 0x14007a710
mov ecx, r14d
call fcn.1400759a8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14007a710
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 0x14007a710
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14007a709
mov eax, dword [rsi + 0x2c]
jmp 0x14007a70e
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14006e304
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 0x14007bcd0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14007bcf8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14007bcf8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14014d668
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14014d494
Function at 0x140c08b18
Capabilities:
Encode data using xor

Disassembly:
jmp 0x140c08b22
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x140c08b4b
pop rbp
sub rbp, 0x33
sub rbp, 0xc08b18
sub rsp, 0x20
jmp 0x140c08b6a
mov rax, 0xc08b18
add rax, rbp
add rax, 0x84
mov rcx, 0x647
mov rdx, 0xffffffff866be889
xor byte [rax], dl
inc rax
dec rcx
jne 0x140c08b89
jmp 0x140c08ba0
rol dword [rax], 0x60
add al, byte [rax]
mov ch, 0x89
mov dword [rcx - 0x7eb7f73f], ecx
mov byte [rcx + 0x6088c189], cl
ror dword [rsi + 0x49], 0x80
mov dword [rcx + 0x4b4ec189], ecx
movabs eax, dword [0x88c16b7ec1898989]
add cl, byte [rax]
test dword [rcx - 0x773e7677], ecx
invalid
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14032fa20]
mov dword [rax], 1
mov rax, qword [0x14032fa30]
mov dword [rax], 1
mov rax, qword [0x14032fa40]
mov dword [rax], 1
mov rax, qword [0x14032f9a0]
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 0x1402a5940
Capabilities:
Query environment variable

Disassembly:
push r14
mov eax, 0x10080
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.140307f20
sub rsp, rax
xor eax, eax
xor edx, edx
xor esi, esi
mov r14d, 0x28
movzx edi, byte [rcx]
mov word [rsp + 0x80], ax
mov r12, rcx
lea rbp, [rsp + 0x30]
lea r13, [rsp + 0x2e]
mov word [rsp + 0x30], dx
test dil, dil
je 0x1402a59e9
nop dword [rax]
mov rax, r14
lea rbx, [rbp + rsi*2]
sub rax, rsi
cmp word [rbp + rsi*2], 0
je 0x1402a59ae
nop dword [rax + rax]
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x1402a59a0
test rax, rax
je 0x140318e2e
mov rcx, rbx
add rsi, 1
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, r13
mov byte [rsp + 0x2e], dil
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x2f], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [r12 + rsi]
test dil, dil
jne 0x1402a5988
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, rbp
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x1402a5a18
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10080
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret

Function at 0x1402a5a30
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
xor eax, eax
xor esi, esi
mov r13d, 0x28
movzx edi, byte [rcx]
mov word [rsp + 0x30], ax
mov rbp, rcx
mov r14, rdx
lea r15, [rsp + 0x30]
lea r12, [rsp + 0x2e]
test dil, dil
je 0x1402a5ad1
nop word [rax + rax]
mov rax, r13
lea rbx, [r15 + rsi*2]
sub rax, rsi
cmp word [r15 + rsi*2], 0
je 0x1402a5a96
nop word [rax + rax]
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x1402a5a88
test rax, rax
je 0x140318e34
mov rcx, rbx
add rsi, 1
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, r12
mov byte [rsp + 0x2e], dil
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x2f], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [rbp + rsi]
test dil, dil
jne 0x1402a5a70
mov rdx, r14
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 0x1402bceb0
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.1402a5940
test rax, rax
je 0x1402bcff0
mov rdx, 0xffffffffffffffff
mov rcx, rax
lea r14, [rsp + 0x40]
mov r15d, 0x4e
call qword [sym.imp.python39.dll_PyUnicode_FromWideChar]
mov rdi, r14
lea r12, [rsi + 0x28]
lea rbp, [rsp + 0x3e]
mov r13, rax
xor eax, eax
mov word [rsp + 0x40], ax
nop
mov rax, r12
mov rbx, rdi
sub rax, rsi
cmp word [rdi], 0
je 0x1402bcf2e
nop
add rbx, 2
sub rax, 1
cmp word [rbx], 0
jne 0x1402bcf20
test rax, rax
je 0x140318ed6
mov rcx, rbx
add rsi, 1
add rdi, 2
call sub.msvcrt.dll_wcslen
mov r8d, 2
mov rdx, rbp
mov byte [rsp + 0x3e], r15b
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x3f], 0
call sub.msvcrt.dll_mbstowcs
movzx r15d, byte [rsi]
test r15b, r15b
jne 0x1402bcf10
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python39.dll__PyRuntime]
mov rdx, qword [0x14035adb8]
mov rsi, qword [rax + 0x1f0]
mov rax, qword [0x14032fb70]
mov rbx, qword [rax + 0x1b8]
test rdx, rdx
je 0x1402bd048
mov r8, rbx
mov rcx, rsi
call fcn.1402a91b0
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.1402b8b70
sub qword [rbx], 1
jne 0x1402bcfd9
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 [0x14035a680]
lea rsi, [0x14035a680]
test bl, bl
je 0x1402bd010
mov rax, qword [0x14035a688]
lea rsi, [0x14035a688]
test rax, rax
jne 0x1402bcfd9
cmp byte [0x14035a8a2], 0
jne 0x1402bd026
movzx ecx, bl
call fcn.140287d70
mov rdx, 0xffffffffffffffff
lea rcx, [0x14035a6a0]
call qword [sym.imp.python39.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x1402bd075
add qword [rax], 1
jmp 0x1402bcfd9
mov rdx, qword [0x14035ad30]
mov rdi, qword [rax + 0x1a8]
test rdx, rdx
je 0x1402bd080
mov r8, rdi
mov rcx, rsi
call fcn.1402a91b0
mov qword [0x14035adb8], rax
mov rdx, rax
jmp 0x1402bcfa3
call qword [sym.imp.python39.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x1403283c6]
call qword [sym.imp.python39.dll_PyImport_ImportModule]
mov qword [0x14035ad30], rax
mov rdx, rax
test rax, rax
je 0x140318ed6
jmp 0x1402bd05b
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
call qword [sym.imp.python39.dll_PyErr_NoMemory]
call sub.msvcrt.dll_abort
nop
Function at 0x1402fd020
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x14035a669], 0
mov rbp, rcx
mov r12, rdx
mov rdi, r8
je 0x1402fd0a8
lea rdx, [0x14032b9c2]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1402fd110
mov rbx, qword [0x14035a528]
jmp 0x1402fd065
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, rdi
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 0x1402fd060
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, rbp
mov rdx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1402ec310
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 [0x14035a528], rax
mov ebx, dword [rax]
mov qword [0x14035a528], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x14035a528], rdx
call fcn.1402fc150
cmp eax, ebx
jne 0x1402fd197
mov byte [0x14035a669], 1
jmp 0x1402fd03c
cmp byte [0x14035a668], 0
jne 0x1402fd053
mov rbx, qword [sym.imp.python39.dll_PyDict_New]
call rbx
mov qword [0x14035afa8], rax
call rbx
mov qword [0x14035afa0], rax
call rbx
mov qword [0x14035af98], rax
call rbx
mov qword [0x14035af90], rax
call rbx
mov qword [0x14035af88], rax
call rbx
mov qword [0x14035af80], rax
call rbx
mov qword [0x14035af78], rax
call rbx
mov byte [0x14035a668], 1
mov qword [0x14035af70], rax
mov rax, qword [sym.imp.python39.dll__PyRuntime]
mov rax, qword [rax + 0x1f0]
mov rax, qword [rax + 0x10]
add rax, 0xdc0
mov qword [0x14035a520], rax
jmp 0x1402fd053
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140306c00
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.140318390
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.140318390
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 0x1403078d2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x14035b408]
test eax, eax
je 0x14030796a
lea rax, [0x14035b3e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x14035b410]
mov qword [rbp - 8], rax
jmp 0x14030794e
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 0x140307942
cmp qword [rbp - 0x10], 0
je 0x140307942
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 0x140307908
lea rax, [0x14035b3e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14030796b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140307a70
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 0x140307a98
mov eax, 0
jmp 0x140307ae6
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 0x140307ac1
mov eax, 0
jmp 0x140307ae6
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 0x140307ae1
mov eax, 0
jmp 0x140307ae6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x140307aec
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 0x140307b6a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140307b61
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 0x140307b61
mov rax, qword [rbp - 8]
jmp 0x140307b7f
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 0x140307b34
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004bdac0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004bdad0]
mov dword [rax], 1
mov rax, qword [0x004bdae0]
mov dword [rax], 1
mov rax, qword [0x004bdab0]
mov dword [rax], 1
mov rax, qword [0x004bd980]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004bdaa0]
mov dword [0x004e500c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x004bda60]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004bcdd0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067
Function at 0x40c4c0
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]

Function at 0x40c530
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004e5634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40c6d8
mov rax, qword [0x004e5638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40c57c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40c607
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40c560
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40c712
mov rax, qword [0x004e5638]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004e5638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c721
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40c600
sub eax, 4
and eax, 0xfffffffb
jne 0x40c690
add dword [0x004e5634], 1
cmp ebx, 8
jae 0x40c638
test bl, 4
jne 0x40c6e0
test ebx, ebx
je 0x40c629
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40c700
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x40c629
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x40c66a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x004e5638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40c600
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor edi, edi
jmp 0x40c587
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40c629
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40c629
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004e5638]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x40cf00
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004e5920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004e5900]
test rbx, rbx
je 0x40cf54
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 0x40cf4b
test r12, r12
je 0x40cf4b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40cf30
lea rcx, [0x004e5920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x40d180
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x40d190
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x40d1a0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d1e5
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x40d1dc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40d1e7
add rax, 0x28
cmp rax, r9
jne 0x40d1c8
xor eax, eax
ret

Function at 0x40d290
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004bd980]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x40d309
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d309
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x40d306
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x40d2fd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x40d309
add r8, 0x28
cmp r8, r9
jne 0x40d2e8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x40d3f0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004bd980]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40d45f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d45f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x40d45d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x40d454
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d468
add rax, 0x28
cmp rax, r9
jne 0x40d440
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x40d480
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004bd980]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x40d4f8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d4f8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x40d4f8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d4f8
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x40d4ec
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x40d500
add rdx, 0x28
cmp rdx, r10
jne 0x40d4d8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x40d510
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40d51e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40d4f5
test r8d, r8d
jg 0x40d508
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret