joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180006530
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov eax, dword [rcx + 4]
lea rbx, [rcx + 8]
mov r9d, dword [rcx]
mov rdi, rcx
mov rcx, rbx
mov dword [rsp + 0x20], eax
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x18000658d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x180006587
mov r9d, dword [rdi]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 8
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x18000658d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rax, qword [rbx]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x18000659c
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x20], r9d
push rdi
sub rsp, 0x40
and qword [rax - 0x10], 0
mov rbx, rcx
lea rcx, [rax - 0x18]
mov dword [rax - 0x18], 0x18
mov rdi, rdx
mov dword [rax - 0x14], 0xf0000000
call fcn.180006530
test rax, rax
je 0x180006621
mov rax, qword [rsp + 0x38]
test rax, rax
jne 0x1800065e7
lea rcx, [rsp + 0x30]
call fcn.180006530
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov edx, 0x800c
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x18000661b
mov rcx, qword [rbx]
xor r9d, r9d
mov rdx, rdi
lea r8d, [r9 + 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x180006643
call qword [sym.imp.KERNEL32.dll_GetLastError]
or ebx, 0xffffffff
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180006636
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
mov rcx, qword [rsp + 0x70]
mov r8d, 0x20
xor edx, edx
mov dword [rsp + 0x68], r8d
call sub.msvcrt.dll_memset
mov r8, qword [rsp + 0x70]
lea r9, [rsp + 0x68]
mov rcx, qword [rbx]
mov edx, 2
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x18000661b
xor ebx, ebx
jmp 0x180006624

Function at 0x180006680
Capabilities:
Encrypt data using aes via winapi

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x180014008]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rax, r8
mov dword [rsp + 0x30], 0x208
mov rbx, rdx
mov r8d, r9d
mov rdi, rcx
mov dword [rsp + 0x34], 0x660e
xorps xmm0, xmm0
mov dword [rsp + 0x38], r9d
xorps xmm1, xmm1
lea rcx, [rsp + 0x3c]
mov rdx, rax
xor esi, esi
movdqu xmmword [rsp + 0x3c], xmm0
movdqu xmmword [rsp + 0x4c], xmm1
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx + 8]
test rax, rax
jne 0x1800066ea
mov rcx, rbx
call fcn.180006530
xor r9d, r9d
mov qword [rsp + 0x28], rdi
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x20], esi
mov rcx, rax
lea r8d, [r9 + 0x2c]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x180006717
call qword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0xffffffff
jmp 0x180006719
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.18000dd60
add rsp, 0x70
pop rdi
pop rsi
pop rbx
ret
Function at 0x180006964
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
and dword [rbp - 0x14], 0
mov rsi, rcx
and qword [rbp - 0x10], 0
lea rcx, [rbp - 0x18]
mov ebx, 1
mov r15, r9
mov dword [rbp - 0x18], ebx
mov r12, r8
mov rdi, rdx
call fcn.180006530
test rax, rax
jne 0x1800069bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x180006ae0
and qword [rbp - 0x28], 0
mov rax, qword [rbp - 0x10]
mov r14d, dword [rsi + 8]
mov rsi, qword [rsi]
test rax, rax
jne 0x1800069de
lea rcx, [rbp - 0x18]
call fcn.180006530
test rax, rax
je 0x180006a5d
lea rax, [rbp - 0x2c]
mov dword [rbp - 0x2c], 0x30
mov qword [rsp + 0x38], rax
mov r9d, r14d
lea rax, [rbp - 0x20]
mov r8, rsi
mov qword [rsp + 0x30], rax
mov edx, 8
and qword [rsp + 0x28], 0
mov ecx, ebx
mov dword [rsp + 0x20], 0x8000
call qword [sym.imp.CRYPT32.dll_CryptDecodeObjectEx]
test eax, eax
jne 0x180006a24
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x180006a5d
mov rax, qword [rbp - 0x10]
test rax, rax
jne 0x180006a36
lea rcx, [rbp - 0x18]
call fcn.180006530
mov r8, qword [rbp - 0x20]
lea r9, [rbp - 0x28]
mov edx, ebx
mov rcx, rax
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
jne 0x180006a53
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x180006ac4
lea rax, [rbp - 0x30]
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov r8d, ebx
mov qword [rsp + 0x20], rdi
xor edx, edx
mov dword [rbp - 0x30], r15d
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x180006ac4
mov eax, dword [rbp - 0x30]
mov rcx, qword [rbp + 0x40]
mov qword [rcx], rax
sub eax, ebx
movsxd rdx, eax
test eax, eax
jle 0x180006acc
mov r8, rdi
mov al, byte [rdx + rdi]
mov cl, byte [r8]
mov byte [r8], al
add r8, rbx
mov rax, r8
mov byte [rdx + rdi], cl
sub rax, rdi
sub rdx, rbx
cmp rax, rdx
jl 0x180006aa5
jmp 0x180006acc
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x180006ae0
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [rbp - 0x28], 0
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x180006af1
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x70]
mov al, bl
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x180006b14
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x68
mov r13, qword [rbp + 0x68]
mov rdi, rcx
and qword [rbp - 0x10], 0
lea rcx, [rbp - 0x18]
mov r12, r9
mov dword [rbp - 0x18], 0x18
mov r15, r8
mov dword [rbp - 0x14], 0xf0000000
mov r14, rdx
call fcn.180006530
test rax, rax
jne 0x180006b66
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180006c4b
and qword [rbp - 0x28], 0
mov rax, qword [rbp - 0x10]
mov ebx, dword [rdi + 8]
mov rsi, qword [rdi]
test rax, rax
jne 0x180006b8c
lea rcx, [rbp - 0x18]
call fcn.180006530
test rax, rax
je 0x180006c2f
mov r9d, ebx
lea rdx, [rbp - 0x18]
mov r8, rsi
lea rcx, [rbp - 0x28]
call fcn.180006680
test eax, eax
jne 0x180006c2f
mov rcx, qword [rbp - 0x28]
lea esi, [rax + 1]
xor ebx, ebx
mov dword [rbp - 0x1c], esi
test rcx, rcx
je 0x180006bca
xor r9d, r9d
lea r8, [rbp - 0x1c]
lea edx, [rax + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, esi
jne 0x180006c2f
mov rcx, qword [rbp - 0x28]
xor ebx, ebx
test rcx, rcx
je 0x180006bf0
mov r8, qword [rdi + 0x10]
xor r9d, r9d
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, esi
jne 0x180006c2f
mov rcx, qword [rbp - 0x28]
test rcx, rcx
je 0x180006c2f
lea rax, [rbp - 0x20]
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r14
xor edx, edx
mov dword [rbp - 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov eax, dword [rbp - 0x20]
mov qword [r13], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x28]
mov ebx, eax
test rcx, rcx
je 0x180006c4b
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [rbp - 0x28], 0
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x180006c5c
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, ebx
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
Function at 0x180006c70
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
and qword [rbp - 8], 0
mov rdi, rcx
lea rcx, [rbp - 0x10]
mov dword [rbp - 0x10], 0x18
mov r15, r9
mov dword [rbp - 0xc], 0xf0000000
mov r14, rdx
call fcn.180006530
test rax, rax
jne 0x180006cba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180006d8f
and qword [rbp - 0x20], 0
mov rax, qword [rbp - 8]
mov ebx, dword [rdi + 8]
mov rsi, qword [rdi]
test rax, rax
jne 0x180006ce0
lea rcx, [rbp - 0x10]
call fcn.180006530
test rax, rax
je 0x180006d73
mov r9d, ebx
lea rdx, [rbp - 0x10]
mov r8, rsi
lea rcx, [rbp - 0x20]
call fcn.180006680
test eax, eax
jne 0x180006d73
mov rcx, qword [rbp - 0x20]
lea esi, [rax + 1]
xor ebx, ebx
mov dword [rbp - 0x18], esi
test rcx, rcx
je 0x180006d1a
xor r9d, r9d
lea r8, [rbp - 0x18]
lea edx, [rax + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, esi
jne 0x180006d73
mov rcx, qword [rbp - 0x20]
xor ebx, ebx
test rcx, rcx
je 0x180006d40
mov r8, qword [rdi + 0x10]
xor r9d, r9d
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, esi
jne 0x180006d73
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x180006d73
lea rax, [rbp - 0x14]
mov dword [rbp - 0x14], r15d
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r14
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x20]
mov ebx, eax
test rcx, rcx
je 0x180006d8f
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [rbp - 0x20], 0
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x180006da0
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, ebx
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret

Function at 0x180006df0
Capabilities:
Generate random numbers via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rdi
sub rsp, 0x30
and dword [rax - 0x14], 0
mov rdi, rcx
and qword [rax - 0x10], 0
lea rcx, [rax - 0x18]
mov ebx, edx
mov dword [rax - 0x18], 1
call fcn.180006530
test rax, rax
je 0x180006e35
mov r8, rdi
mov edx, ebx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x180006e35
xor ebx, ebx
jmp 0x180006e38
or ebx, 0xffffffff
mov rcx, qword [rsp + 0x28]
test rcx, rcx
je 0x180006e4a
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x180009de0
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
xor eax, eax
mov ebx, ecx
xor ecx, ecx
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x68], eax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x180009e3c
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x180009e3c
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x180009e3c
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x180009e3c
cmp dword [rcx + 0x84], 0xe
jbe 0x180009e3c
cmp dword [rcx + 0xf8], 0
je 0x180009e3c
mov ecx, ebx
call fcn.180009d70
lea rax, [rsp + 0x68]
mov byte [rsp + 0x58], 0
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x20]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rcx, [0x1800161a0]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
call fcn.180009bf0
cmp dword [rsp + 0x60], 0
jne 0x180009e7f
mov ecx, ebx
call fcn.180009d20
int3
add rsp, 0x40
pop rbx
ret

Function at 0x180009f70
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x4f0]
sub rsp, 0x5f0
mov rax, qword [0x180014008]
xor rax, rsp
mov qword [rbp + 0x4e0], rax
mov ecx, 0x17
call qword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x180009fac
mov ecx, 5
int 0x29
mov ecx, 2
call fcn.18000dfec
xorps xmm0, xmm0
lea rcx, [rbp + 0x10]
xor eax, eax
xor edx, edx
mov r8d, 0x4d0
mov qword [rbp], rax
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
call sub.msvcrt.dll_memset
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rcx, [rbp + 0x10]
lea rax, [rbp + 0x10]
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rbx, qword [rbp + 0x108]
lea rdx, [rsp + 0x40]
mov rcx, rbx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_RtlLookupFunctionEntry]
test rax, rax
je 0x18000a068
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x38], 0
mov r9, rax
mov qword [rsp + 0x30], rcx
mov r8, rbx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
lea rcx, [rbp + 0x10]
mov qword [rsp + 0x20], rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_RtlVirtualUnwind]
mov rax, qword [rbp + 0x4f8]
mov qword [rbp + 0x108], rax
lea rax, [rbp + 0x4f8]
add rax, 8
mov dword [rsp + 0x70], 0xc0000417
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0x4f8]
mov qword [rbp - 0x80], rax
mov dword [rsp + 0x74], 1
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
xor ecx, ecx
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
test eax, eax
jne 0x18000a0ce
test ebx, ebx
jne 0x18000a0ce
lea ecx, [rax + 2]
call fcn.18000dfec
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000417
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [rbp + 0x4e0]
xor rcx, rsp
call fcn.18000dd60
mov rbx, qword [rsp + 0x600]
add rsp, 0x5f0
pop rbp
ret
Function at 0x18000dbf0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x20
cmp dword [rcx], 0xe06d7363
mov rdi, r9
mov rbp, r8
mov r14, rdx
mov rsi, rcx
jne 0x18000dcac
mov rax, qword [r9 + 0x38]
mov qword [rsp + 0x48], rbx
mov ebx, dword [rax]
add rbx, qword [r9 + 8]
mov eax, dword [rbx]
and eax, 0x1fffffff
sub eax, 0x19930521
cmp eax, 1
ja 0x18000dca7
mov eax, 1
xchg dword [0x181776210], eax
cmp eax, 1
jne 0x18000dc60
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 1
xchg dword [0x181776210], eax
cmp eax, 1
je 0x18000dc45
mov edx, 4
lea r9, [rsp + 0x40]
mov rcx, rbx
lea r8d, [rdx + 0x3c]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x18000dc9f
and dword [rbx], 0xf9930520
lea r9, [rsp + 0x40]
or dword [rbx], 0x19930520
mov edx, 4
mov r8d, dword [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor eax, eax
xchg dword [0x181776210], eax
mov rbx, qword [rsp + 0x48]
mov r9, rdi
mov r8, rbp
mov rdx, r14
mov rcx, rsi
mov rbp, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rsi
jmp qword [sym.imp.msvcrt.dll___CxxFrameHandler]
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0144b510]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x0144b520]
mov dword [rax], 1
mov rax, qword [0x0144b530]
mov dword [rax], 1
mov rax, qword [0x0144b500]
mov dword [rax], 1
mov rax, qword [0x0144b3f0]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x0144b4f0]
mov dword [0x0144e00c], 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 [0x0144b4b0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x0144b3a0]
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 0x402090
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 0x402100
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x0144e614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x4022a8
mov rax, qword [0x0144e618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40214c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x4021d7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x402130
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x4022e2
mov rax, qword [0x0144e618]
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 [0x0144e618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4022f1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x4021d0
sub eax, 4
and eax, 0xfffffffb
jne 0x402260
add dword [0x0144e614], 1
cmp ebx, 8
jae 0x402208
test bl, 4
jne 0x4022b0
test ebx, ebx
je 0x4021f9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x4022d0
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 0x4021f9
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 0x40223a
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 [0x0144e618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4021d0
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 0x402157
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x4021f9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x4021f9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x0144e618]
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 0x402ad0
Capabilities:
Get thread local storage value

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

Function at 0x402d50
Capabilities:
Parse pe header

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

Function at 0x402d70
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 0x402db5
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 0x402dac
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402db7
add rax, 0x28
cmp rax, r9
jne 0x402d98
xor eax, eax
ret

Function at 0x402e60
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x0144b3f0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x402ed9
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402ed9
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 0x402ed6
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 0x402ecd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x402ed9
add r8, 0x28
cmp r8, r9
jne 0x402eb8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x402fc0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x0144b3f0]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40302f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40302f
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 0x40302d
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 0x403024
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403038
add rax, 0x28
cmp rax, r9
jne 0x403010
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x403050
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x0144b3f0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x4030c8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4030c8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x4030c8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4030c8
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 0x4030bc
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x4030d0
add rdx, 0x28
cmp rdx, r10
jne 0x4030a8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x4030e0
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x4030ee
mov edx, dword [rax + 0xc]
test edx, edx
je 0x4030c5
test r8d, r8d
jg 0x4030d8
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret