joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1403070b0
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov r14, qword [rbp + 0x77]
mov r12, r9
and qword [rbp - 0x21], 0
mov r15d, r8d
and dword [rbp + 0x67], 0
mov rdi, rdx
and dword [rbp - 0x39], 0
mov rsi, rcx
cmp dword [r14], r8d
jae 0x1403070fa
mov edi, 0x80049e19
jmp 0x140307270
mov rax, qword [rdx]
and qword [rbp - 0x31], 0
and qword [rbp - 0x29], 0
and qword [rbp - 0x19], 0
mov rbx, qword [rax]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea r8, [rbp - 0x29]
lea rdx, [0x140421e48]
mov rcx, rdi
call rax
test eax, eax
je 0x14030713c
mov edi, 0x80049e2f
jmp 0x1403071ca
mov rdi, qword [rbp - 0x29]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x30]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x31]
mov rcx, rdi
call rax
mov edi, eax
test eax, eax
js 0x1403071ca
mov rdx, qword [rbp - 0x31]
lea r8, [rbp - 0x19]
mov rcx, rsi
call fcn.14030681c
mov edi, eax
test eax, eax
js 0x1403071ca
lea rax, [0x14000e99c]
mov qword [rbp - 0x11], 3
mov qword [rbp - 9], rax
lea rdx, [rbp - 0x11]
lea rax, [rbp + 0x77]
mov qword [rbp + 7], rsi
mov qword [rbp - 1], rax
xor r9d, r9d
mov rax, qword [rbp - 0x29]
mov ecx, 0xb9
mov qword [rbp + 0xf], rax
mov rax, qword [rbp - 0x19]
mov qword [rbp + 0x17], rax
lea r8d, [r9 + 0x38]
lea rax, [rbp - 0x21]
mov qword [rbp + 0x1f], rax
call sub.ntdll.dll_NtQuerySystemInformation
mov edi, dword [rbp + 0x77]
mov rsi, qword [rbp - 0x31]
test rsi, rsi
je 0x1403071f3
mov rax, qword [rsi]
mov rbx, qword [rax + 0x10]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
mov rcx, rsi
call rax
and qword [rbp - 0x31], 0
mov rsi, qword [rbp - 0x29]
test rsi, rsi
je 0x140307217
mov rax, qword [rsi]
mov rbx, qword [rax + 0x10]
mov rax, qword [0x1403cf6d0]
mov rcx, rbx
call rax
mov rax, rbx
mov rcx, rsi
call rax
test edi, edi
js 0x140307270
mov eax, dword [r14]
mov r8d, r15d
mov r9, qword [rbp + 0x7f]
mov rdx, r12
mov rcx, qword [rbp - 0x21]
mov dword [rbp + 0x67], eax
lea rax, [rbp + 0x67]
mov qword [rsp + 0x28], rax
call fcn.140170c7c
mov edi, eax
test eax, eax
js 0x140307270
mov eax, dword [r14]
lea r9, [rbp - 0x39]
mov r8d, dword [rbp + 0x67]
sub eax, r8d
mov rdx, qword [rbp + 0x7f]
mov rcx, qword [rbp - 0x21]
mov dword [rbp - 0x39], eax
call fcn.140171010
mov edi, eax
test eax, eax
js 0x140307270
mov ecx, dword [rbp + 0x67]
add ecx, dword [rbp - 0x39]
mov dword [r14], ecx
mov rcx, qword [rbp - 0x21]
call fcn.140170004
lea r11, [rsp + 0x90]
mov eax, edi
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140386c58
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov rsi, r8
mov ebp, edx
mov rdi, rcx
test r8, r8
je 0x140386df3
cmp edx, 0x14
jbe 0x140386df3
mov rbx, qword [rcx + 0x20]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x20], 0
mov rbx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x10], 0
lea r15, [rdi + 0x30]
mov rcx, qword [r15]
and dword [rdi + 0x18], 0
test rcx, rcx
je 0x140386cde
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [r15], 0
mov ecx, dword [rsi + 0xc]
shr ecx, 3
mov dword [rdi + 0x28], ecx
mov eax, dword [rsi + 0x10]
mov dword [rdi + 0x2c], eax
mov eax, ecx
shr eax, 1
add eax, 4
lea eax, [rax + rax*4]
lea ecx, [rax + rcx*2]
cmp ebp, ecx
jne 0x140386df3
mov rbx, qword [rdi + 0x20]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x20], 0
mov ebx, dword [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi + 0x20], rax
test rax, rax
jne 0x140386d49
mov ebx, 0x8007000e
jmp 0x140386df8
mov r8d, dword [rdi + 0x28]
lea rdx, [rsi + 0x14]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov r8d, 4
lea rdx, [rdi + 0x2c]
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x140386df8
mov r8d, dword [rdi + 0x28]
mov rdx, qword [rdi + 0x20]
call fcn.140387c38
mov ebx, eax
test eax, eax
jne 0x140386df8
lea r14, [rdi + 0x38]
cmp qword [r14], 0
jne 0x140386dc7
lea r9d, [rax + 0x18]
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x140386dc7
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140386df8
mov rcx, qword [r14]
xor r9d, r9d
mov qword [rsp + 0x28], r15
mov r8d, ebp
mov rdx, rsi
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140386db1
mov dword [rdi + 0xc], 4
jmp 0x140386df8
mov ebx, 0x80070057
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x140388184
Capabilities:
Encrypt or decrypt via wincrypt
Generate random numbers via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov r12, r9
mov dword [rax + 0x10], r15d
mov ebp, r8d
mov rsi, rdx
mov rbx, rcx
mov edi, r15d
test rdx, rdx
je 0x14038839f
test r9, r9
je 0x14038839f
mov r14, qword [rsp + 0xa0]
test r14, r14
je 0x14038839f
cmp qword [rcx + 0x30], r15
jne 0x1403881e7
mov ebx, 0x80049e51
jmp 0x1403883a4
mov r13d, dword [r14]
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes128_cbc
mov rcx, rsi
mov dword [r14], r15d
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140388213
cmp dword [rbx + 0xc], 1
lea esi, [rax + 0x10]
je 0x14038824f
mov ebx, 0x80049e2e
jmp 0x1403883a4
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rsi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x14038822f
cmp dword [rbx + 0xc], 2
lea esi, [rax + 0x18]
jmp 0x140388207
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rsi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140388398
cmp dword [rbx + 0xc], 3
lea esi, [rax + 0x20]
jmp 0x140388207
mov rcx, qword [rbx + 0x30]
lea r15d, [rsi + rbp]
xor r9d, r9d
mov dword [rsp + 0x30], r15d
lea rax, [rsp + 0x88]
mov dword [rsp + 0x88], r15d
mov qword [rsp + 0x28], rax
xor edx, edx
and qword [rsp + 0x20], rdi
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x1403882a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1403883a4
mov ebp, dword [rsp + 0x88]
mov dword [r14], ebp
mov r14, qword [rsp + 0xa8]
test r14, r14
je 0x140388394
cmp r13d, ebp
jae 0x1403882cc
mov ebx, 0x80049e19
jmp 0x1403883a4
mov dword [rsp + 0x88], r15d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x1403882fa
mov ebx, 0x8007000e
jmp 0x1403883a4
mov r8, rbp
xor edx, edx
mov rcx, rdi
call sub.msvcrt.dll_memset
mov r8d, dword [rsp + 0x90]
mov rdx, r12
mov ecx, esi
add rcx, rdi
call sub.msvcrt.dll_memcpy
mov r15d, 2
mov r8d, esi
mov r9d, r15d
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
je 0x140388350
mov r9d, r15d
mov r8d, esi
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
mov ebx, eax
bts ebx, 0x1c
jmp 0x1403883a4
mov rcx, qword [rbx + 0x30]
lea rax, [rsp + 0x88]
xor r9d, r9d
mov dword [rsp + 0x30], ebp
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rdi
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x140388289
mov r8d, dword [rsp + 0x88]
mov rdx, rdi
mov rcx, r14
call sub.msvcrt.dll_memcpy
xor ebx, ebx
jmp 0x1403883a4
mov ebx, 0x80049e5b
jmp 0x1403883a4
mov ebx, 0x80070057
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1403883dc
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor edi, edi
mov r12d, r8d
mov dword [rax + 0x10], edi
mov r15, r9
mov rbp, rdx
mov rsi, rcx
mov ebx, edi
test rdx, rdx
je 0x14038854c
test r9, r9
je 0x14038854c
mov r14, qword [rsp + 0x80]
test r14, r14
je 0x14038854c
cmp qword [rcx + 0x30], rdi
jne 0x14038843e
mov edi, 0x80049e51
jmp 0x140388551
mov r13d, dword [r14]
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes128_cbc
mov rcx, rbp
mov dword [r14], edi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140388467
cmp dword [rsi + 0xc], 1
je 0x14038849d
mov edi, 0x80049e2e
jmp 0x140388551
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rbp
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140388480
cmp dword [rsi + 0xc], 2
jmp 0x14038845b
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rbp
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140388545
cmp dword [rsi + 0xc], 3
jmp 0x14038845b
mov dword [rsp + 0x68], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x1403884c8
mov edi, 0x8007000e
jmp 0x140388551
mov r8d, dword [rsp + 0x68]
mov rdx, r15
mov rcx, rbx
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsi + 0x30]
lea rax, [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rbx
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x140388514
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x140388551
mov eax, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x88]
add eax, 0xfffffff0
mov dword [r14], eax
test rcx, rcx
je 0x140388551
cmp r13d, eax
jae 0x140388537
mov edi, 0x80049e19
jmp 0x140388551
mov r8d, eax
lea rdx, [rbx + 0x10]
call sub.msvcrt.dll_memcpy
jmp 0x140388551
mov edi, 0x80049e5b
jmp 0x140388551
mov edi, 0x80070057
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x60]
mov eax, edi
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140389b9c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140389be8
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140389be0
cmp dword [rcx + 0x3c], edx
jl 0x140389be0
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140389be0
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x140389be8
mov rax, rdx
add rsp, 0x18
ret
Function at 0x1400022bc
Capabilities:
Allocate thread local storage

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
lea r9, str.FlsAlloc
xor ecx, ecx
lea r8, [0x14000b3a0]
lea rdx, str.FlsAlloc
call fcn.1400020e4
mov rbx, rax
test rax, rax
je 0x1400022fc
mov rcx, rax
call fcn.140001920
mov rcx, rdi
call rbx
jmp 0x140002302
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140002364
Capabilities:
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rdx
lea r9, str.FlsSetValue
mov edi, ecx
lea rdx, str.FlsSetValue
mov ecx, 3
lea r8, [0x14000b3d8]
call fcn.1400020e4
mov rsi, rax
test rax, rax
je 0x1400023b0
mov rcx, rax
call fcn.140001920
mov rdx, rbx
mov ecx, edi
call rsi
jmp 0x1400023bb
mov rdx, rbx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x401560
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call fcn.00401780
lea rcx, str.USER32.dll
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
lea rdx, str.VirtualAlloc
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x4015c2
mov eax, 1
jmp 0x4016c6
mov qword [rbp - 0x30], 0
mov qword [rbp - 8], 0
mov rax, qword [rbp - 0x28]
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x38], 0
mov rax, qword [rbp - 0x30]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 0x28]
add rax, rdx
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
add rax, 0x18
mov rdx, rax
mov rax, qword [rbp - 0x38]
movzx eax, word [rax + 0x14]
movzx eax, ax
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x28]
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
call rax
mov dword [rbp - 0x3c], 0x28
mov dword [rbp - 0x14], 0
mov rax, qword [rbp - 0x38]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0x14], eax
jge 0x401662
mov rax, qword [rbp - 0x10]
mov qword [rbp - 8], rax
mov eax, dword [rbp - 0x3c]
add qword [rbp - 0x10], rax
add dword [rbp - 0x14], 1
jmp 0x40163d
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x10]
mov eax, eax
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 0x48], rax
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x10]
mov ecx, eax
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp - 0x38]
mov rax, qword [rax + 0x30]
add rax, rdx
mov rdx, rax
mov rax, qword [rbp - 0x48]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp - 0x48]
call rax
mov eax, 0
add rsp, 0x70
pop rbp
ret

Function at 0x401b80
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 fcn.00402cf0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.00402cf0
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]
Function at 0x401bf0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00407614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x401d98
mov rax, qword [0x00407618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401c3c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401cc7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401c20
mov rcx, r12
call fcn.00402950
mov rbp, rax
test rax, rax
je 0x401dd2
mov rax, qword [0x00407618]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.00402a80
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00407618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401de1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401cc0
sub eax, 4
and eax, 0xfffffffb
jne 0x401d50
add dword [0x00407614], 1
cmp ebx, 8
jae 0x401cf8
test bl, 4
jne 0x401da0
test ebx, ebx
je 0x401ce9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x401dc0
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 0x401ce9
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 0x401d2a
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 [0x00407618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401cc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00401b80
nop dword [rax]
xor edi, edi
jmp 0x401c47
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401ce9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401ce9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00401b80
mov rax, qword [0x00407618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.00401b80
nop
nop dword [rax]
Function at 0x4025c0
Capabilities:
Get thread local storage value

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

Function at 0x402950
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004043b0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x4029c9
mov rcx, r10
call fcn.00402820
test eax, eax
je 0x4029c9
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 0x4029c6
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 0x4029bd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x4029c9
add r8, 0x28
cmp r8, r9
jne 0x4029a8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140009830]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140009840]
mov dword [rax], 1
mov rax, qword [0x140009850]
mov dword [rax], 1
mov rax, qword [0x140009820]
mov dword [rax], 1
mov rax, qword [0x1400096e0]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x140009810]
mov dword [0x14000c00c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x1400010c0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400097d0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400097b0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140009690]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067

Function at 0x1400018a0
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 0x140001910
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x14000c0a4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x140001ac0
mov rax, qword [0x14000c0a8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000195c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400019e7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x140001940
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x140001b1d
mov rax, qword [0x14000c0a8]
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 [0x14000c0a8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001b02
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400019e0
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001a70
add dword [0x14000c0a4], 1
cmp ebx, 8
jae 0x140001a18
test bl, 4
jne 0x140001ad0
test ebx, ebx
je 0x140001a09
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x140001af0
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 0x140001a09
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 0x140001a4a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x14000c0a8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400019e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor edi, edi
jmp 0x140001967
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x140001a09
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x140001a09
mov rax, qword [0x14000c0a8]
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
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop dword [rax]