joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140151460]
mov dword [rax], 1
mov rax, qword [0x140151470]
mov dword [rax], 1
mov rax, qword [0x140151480]
mov dword [rax], 1
mov rax, qword [0x1401513e0]
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 0x1400c0cc0
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.14012b9e0
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 0x1400c0d85
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 0x14013c8f2
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x1400c0d66
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x1400c0d58
test rsi, rsi
je 0x14013c8f2
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x1400c0d18
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 0x1400c0db4
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 0x1400c0dd0
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 0x1400c0e8d
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 0x14013c8f8
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x1400c0e6e
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x1400c0e60
test rsi, rsi
je 0x14013c8f8
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x1400c0e20
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 0x1400ea920
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 [0x140167ea8]
mov rsi, rcx
test rbx, rbx
je 0x1400ea9a0
mov rax, qword [0x1401515b0]
mov rcx, qword [rax + 0x48]
cmp rbx, rcx
je 0x1400ea990
mov rdx, qword [0x1401680e8]
test rdx, rdx
je 0x1400eaa98
mov rcx, rbx
mov rbx, qword [sym.imp.python311.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.python311.dll_PyNumber_InPlaceAdd]
jmp 0x1400ea971
lea r15, str.NUITKA_ONEFILE_BINARY
mov rcx, r15
call fcn.1400c0cc0
test rax, rax
je 0x1400eaab8
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python311.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 0x14013c998
cmp word [r13], 0
movzx edx, word [rsp + 0x3c]
mov rax, r13
je 0x1400eaa3e
nop word [rax + rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x1400eaa30
test rbx, rbx
je 0x14013c998
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 0x1400ea9f0
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python311.dll__PyRuntime]
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rax + 0x1f8]
call fcn.1400ea7d0
mov rbx, rax
mov qword [0x140167ea8], rbx
jmp 0x1400ea942
lea rcx, [0x14014dac8]
call qword [sym.imp.python311.dll_PyUnicode_FromString]
mov qword [0x1401680e8], rax
mov rdx, rax
jmp 0x1400ea962
mov rbx, qword [0x140167ec0]
test rbx, rbx
jne 0x1400eaa86
cmp byte [0x1401680e2], 0
je 0x1400eaaf6
mov rdx, 0xffffffffffffffff
lea rcx, [0x140167ee0]
call qword [sym.imp.python311.dll_PyUnicode_FromWideChar]
mov qword [0x140167ec0], rax
mov rbx, rax
test rax, rax
je 0x1400eab02
add qword [rax], 1
jmp 0x1400eaa86
mov ecx, 1
call fcn.1400c18e0
jmp 0x1400eaacd
call qword [sym.imp.python311.dll_PyErr_Print]
call sub.msvcrt.dll_abort
nop
nop
call sub.msvcrt.dll_abort
nop
Function at 0x1400ec250
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.1400c0cc0
test rax, rax
je 0x1400ec3a8
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python311.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 0x14013c9b6
cmp word [r15], 0
movzx edx, word [rsp + 0x3c]
mov rax, r15
je 0x1400ec306
nop dword [rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x1400ec2f8
test rbx, rbx
je 0x14013c9b6
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 0x1400ec2b8
mov rcx, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python311.dll__PyRuntime]
mov rcx, qword [0x140168820]
mov rsi, qword [rax + 0x1f8]
mov rax, qword [0x1401515b0]
mov rbx, qword [rax + 0x1c0]
test rcx, rcx
je 0x1400ec3f8
mov rdx, rbx
call fcn.1400a7460
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.1400de3b0
sub qword [rbx], 1
jne 0x1400ec391
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 [0x140167eb8]
lea rsi, [0x140167eb8]
test bl, bl
je 0x1400ec3c8
mov rax, qword [0x140167ec0]
lea rsi, [0x140167ec0]
test rax, rax
jne 0x1400ec391
cmp byte [0x1401680e2], 0
je 0x1400ec422
mov rdx, 0xffffffffffffffff
lea rcx, [0x140167ee0]
call qword [sym.imp.python311.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x1400ec42c
add qword [rax], 1
jmp 0x1400ec391
mov rcx, qword [0x140168798]
mov rdi, qword [rax + 0x1b0]
test rcx, rcx
je 0x1400ec437
mov rdx, rdi
call fcn.1400a7460
mov qword [0x140168820], rax
mov rcx, rax
jmp 0x1400ec35e
movzx ecx, bl
call fcn.1400c18e0
jmp 0x1400ec3d6
call qword [sym.imp.python311.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x140148e1b]
call qword [sym.imp.python311.dll_PyImport_ImportModule]
mov qword [0x140168798], rax
mov rcx, rax
test rax, rax
je 0x14013c9b6
jmp 0x1400ec40b
Function at 0x140121c60
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x140167ea1], 0
mov rbp, rcx
mov rdi, rdx
mov r12, r8
je 0x140121d08
lea rdx, [0x14014d1f2]
mov rcx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x140121d70
mov rbx, qword [0x140167d40]
jmp 0x140121ca5
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 0x140121ca0
movzx eax, word [rdx + 4]
lea r8, [rdx + 6]
test ax, ax
je 0x140121cf7
lea rbx, [rdi + rax*8]
nop word cs:[rax + rax]
mov rdx, rdi
mov rcx, rbp
add rdi, 8
call fcn.140111040
mov r8, rax
cmp rdi, rbx
jne 0x140121ce0
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 [0x140167d40], rax
mov ebx, dword [rax]
mov qword [0x140167d40], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x140167d40], rdx
call fcn.140120d90
cmp eax, ebx
jne 0x140121dd8
mov byte [0x140167ea1], 1
jmp 0x140121c80
cmp byte [0x140167ea0], 0
jne 0x140121c97
mov rbx, qword [sym.imp.python311.dll_PyDict_New]
call rbx
mov qword [0x140168a48], rax
call rbx
mov qword [0x140168a40], rax
call rbx
mov qword [0x140168a38], rax
call rbx
mov qword [0x140168a30], rax
call rbx
mov qword [0x140168a28], rax
call rbx
mov qword [0x140168a20], rax
call rbx
mov qword [0x140168a18], rax
call rbx
mov byte [0x140167ea0], 1
mov qword [0x140168a10], rax
jmp 0x140121c97
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x14012a6c0
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.14013be50
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.14013be50
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 0x14012b392
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140168f08]
test eax, eax
je 0x14012b42a
lea rax, [0x140168ee0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140168f10]
mov qword [rbp - 8], rax
jmp 0x14012b40e
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 0x14012b402
cmp qword [rbp - 0x10], 0
je 0x14012b402
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 0x14012b3c8
lea rax, [0x140168ee0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14012b42b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14012b530
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 0x14012b558
mov eax, 0
jmp 0x14012b5a6
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 0x14012b581
mov eax, 0
jmp 0x14012b5a6
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 0x14012b5a1
mov eax, 0
jmp 0x14012b5a6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x14012b5ac
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 0x14012b62a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14012b621
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 0x14012b621
mov rax, qword [rbp - 8]
jmp 0x14012b63f
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 0x14012b5f4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001cb0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
movsxd rax, dword [rcx + 0x3c]
xor ebx, ebx
mov r15d, edx
mov rbp, rcx
mov esi, dword [rax + rcx + 0x88]
add rsi, rcx
mov r12d, dword [rsi + 0x1c]
mov r14d, dword [rsi + 0x20]
add r12, rcx
mov r13d, dword [rsi + 0x24]
add r14, rcx
add r13, rcx
cmp dword [rsi + 0x18], ebx
jbe 0x140001d1f
nop dword [rax]
movzx edi, bx
mov ecx, dword [r14 + rdi*4]
add rcx, rbp
call fcn.140001d50
cmp eax, r15d
je 0x140001d3e
inc bx
movzx eax, bx
cmp eax, dword [rsi + 0x18]
jb 0x140001d00
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
movzx eax, word [r13 + rdi*2]
mov eax, dword [r12 + rax*4]
add rax, rbp
jmp 0x140001d21

Function at 0x140001d50
Capabilities:
Hash data using djb2

Disassembly:
movsx r9d, byte [rcx]
lea r10, [rcx + 1]
mov eax, 0x1505
test r9d, r9d
je 0x140001d93
nop dword [rax]
nop word [rax + rax]
lea edx, [r9 - 0x41]
cmp edx, 0x19
lea r8d, [r9 + 0x20]
lea r10, [r10 + 1]
cmova r8d, r9d
movsx r9d, byte [r10 - 1]
imul eax, eax, 0x21
add eax, r8d
test r9d, r9d
jne 0x140001d70
ret

Function at 0x140001da0
Capabilities:
Hash data using djb2

Disassembly:
movzx r9d, word [rcx]
lea r10, [rcx + 2]
mov eax, 0x1505
test r9d, r9d
je 0x140001de3
nop dword [rax]
nop word [rax + rax]
lea edx, [r9 - 0x41]
cmp edx, 0x19
lea r8d, [r9 + 0x20]
lea r10, [r10 + 2]
cmova r8d, r9d
movzx r9d, word [r10 - 2]
imul eax, eax, 0x21
add eax, r8d
test r9d, r9d
jne 0x140001dc0
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00405790]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004057a0]
mov dword [rax], 1
mov rax, qword [0x004057b0]
mov dword [rax], 1
mov rax, qword [0x00405780]
mov dword [rax], 1
mov rax, qword [0x00405670]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x00405770]
mov dword [0x0040800c], 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 [0x00405730]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x00405620]
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 0x401f70
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 0x401fe0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00408614]
mov r12, rcx
mov rdi, rdx
mov rbx, r8
test esi, esi
jle 0x402160
mov rax, qword [0x00408618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40202c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x4020b1
inc ecx
add rax, 0x28
cmp ecx, esi
jne 0x402010
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x4021a2
mov rax, qword [0x00408618]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
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 [0x00408618]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4021b1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x4020ab
sub eax, 4
and eax, 0xfffffffb
jne 0x402118
inc dword [0x00408614]
cmp ebx, 8
jae 0x4020e0
test bl, 4
jne 0x402170
test ebx, ebx
je 0x4020d3
movzx eax, byte [rdi]
mov byte [r12], al
test bl, 2
jne 0x402190
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, ebx
dec ebx
mov rdx, qword [rdi + rax - 8]
mov qword [r12 + rax - 8], rdx
cmp ebx, 8
jb 0x4020d3
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rdi + rdx]
mov qword [r12 + rdx], rcx
cmp eax, ebx
jb 0x4020f8
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 rsi, qword [0x00408618]
mov qword [rsi + 8], rcx
mov r9, rsi
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4020ab
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 esi, esi
jmp 0x402036
mov eax, dword [rdi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rdi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x4020d3
mov ebx, ebx
movzx eax, word [rdi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x4020d3
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x00408618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rsi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x402990
Capabilities:
Get thread local storage value

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

Function at 0x402c10
Capabilities:
Parse pe header

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

Function at 0x402c30
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 0x402c75
dec ecx
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x402c6c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402c77
add rax, 0x28
cmp rax, r9
jne 0x402c58
xor eax, eax
ret

Function at 0x402d20
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00405670]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x402d91
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402d91
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 0x402d8e
dec eax
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x402d85
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x402d91
add r8, 0x28
cmp r8, r9
jne 0x402d70
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x402e70
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00405670]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x402edf
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402edf
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 0x402edd
dec edx
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x402ed4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402ee8
add rax, 0x28
cmp rax, r9
jne 0x402ec0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x402f00
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00405670]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x402f78
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402f78
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x402f78
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402f78
dec ecx
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop word [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x402f6c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x402f80
add rdx, 0x28
cmp rdx, r10
jne 0x402f58
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x402f8f
dec r8d
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x402f9d
mov edx, dword [rax + 0xc]
test edx, edx
je 0x402f75
test r8d, r8d
jg 0x402f88
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret