joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409780
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x120
mov dword [rsp + 0x100], 0
mov qword [rsp + 0x108], 0
mov byte [rsp + 0x40], 0
lea rax, [rsp + 0x41]
mov rdi, rax
xor eax, eax
mov ecx, 0xbf
rep stosb byte [rdi], al
lea rdx, [rsp + 0x108]
mov rcx, qword [rsp + 0x130]
call qword [sym.imp.ntoskrnl.exe_PsLookupThreadByThreadId]
mov dword [rsp + 0x100], eax
cmp dword [rsp + 0x100], 0
jl 0x4097fd
mov dword [rsp + 0x110], 1
jmp 0x409833
mov eax, dword [rsp + 0x100]
mov dword [rsp + 0x20], eax
lea r9, [0x0040ca20]
mov r8d, 0x44
lea rdx, [0x0040ca10]
lea rcx, [0x0040bf10]
call sub.ntoskrnl.exe_DbgPrint
mov dword [rsp + 0x110], 0
cmp dword [rsp + 0x110], 0
je 0x409985
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0x140]
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0x148]
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0x150]
mov qword [rsp + 0xe8], rax
call fcn.004099a0
cmp rax, qword [rsp + 0x108]
je 0x40994e
xor r8d, r8d
mov edx, 1
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeInitializeEvent]
mov qword [rsp + 0x38], 0
mov byte [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
lea r9, [fcn.004096f0]
xor r8d, r8d
mov rdx, qword [rsp + 0x108]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_KeInitializeApc]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_KeInsertQueueApc]
movzx eax, al
test eax, eax
je 0x409941
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeWaitForSingleObject]
mov dword [rsp + 0x100], eax
cmp dword [rsp + 0x100], 0
jne 0x40993f
mov eax, dword [rsp + 0xf0]
mov dword [rsp + 0x100], eax
jmp 0x40994c
mov dword [rsp + 0x100], 0xc0000001
jmp 0x409977
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x40]
call fcn.004096f0
mov eax, dword [rsp + 0xf0]
mov dword [rsp + 0x100], eax
mov rcx, qword [rsp + 0x108]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, dword [rsp + 0x100]
add rsp, 0x120
pop rdi
ret
Function at 0x40d058
Capabilities:
Create device object
Print debug messages

Disassembly:
sub rsp, 0x28
mov r8, rdx
mov r9, rcx
call section.INIT
mov rdx, r8
mov rcx, r9
add rsp, 0x28
jmp fcn.004060b0
Function at 0x1400207f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rdi, rdx
mov rsi, rcx
lea rdx, str._AWLW_BY_DART_VANYA
mov r8d, 0xa
xor ecx, ecx
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x28], 0
mov byte [rsp + 0x2c], 0
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
je 0x140020901
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [rsp + 0x28], eax
test eax, eax
je 0x140020901
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140020901
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x20], rax
test rax, rax
je 0x140020901
mov ecx, 0x58
call fcn.1400cbd60
test rax, rax
je 0x14002089a
mov rcx, rax
call fcn.14001e4d0
mov rbx, rax
jmp 0x14002089c
xor ebx, ebx
mov dword [rsp + 0x50], reloc.OLEAUT32.dll_VariantTimeToDosDateTime
mov rax, qword [rbx]
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x20]
mov rcx, rbx
mov qword [rsi], rbx
mov dword [rbx + 0xc], 0
call qword [rax + VariantCopy]
test al, al
je 0x1400208d8
lea rdx, [rsp + 0x50]
mov r8d, 0xfde9
mov rcx, rbx
call fcn.1400aab90
mov rax, qword [0x14011bd50]
inc dword [0x14011a468]
mov qword [0x140118628], rax
mov eax, 3
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
lea rdx, str.Could_not_extract_script_from_EXE.
lea rcx, [0x14011b1d0]
mov r8, rdi
call fcn.140040760
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x1400012f0
Capabilities:
Access peb ldr_data
Encode data using xor
Encrypt data using rc4 prga
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
xor ebp, ebp
lea rsi, [0x1400110fc]
nop dword [rax]
nop word [rax + rax]
mov eax, dword [rsi]
xor bl, bl
mov edi, dword [rsi + 4]
xor cl, cl
cmp dword [0x1400110d0], eax
jne 0x14000133c
mov bl, 1
call qword [0x1400110d8]
movzx ecx, al
test bl, bl
je 0x14000138a
test cl, cl
je 0x14000138a
test edi, edi
jne 0x14000134c
mov al, 1
jmp 0x14000138c
xor bl, bl
xor al, al
cmp dword [0x1400110c0], edi
jne 0x140001365
mov bl, 1
call qword [0x1400110c8]
test al, al
sete al
cmp dword [0x1400110d0], edi
jne 0x14000137a
mov bl, 1
call qword [0x1400110d8]
test al, al
sete al
test bl, bl
jne 0x14000138c
lea rcx, str.ERROR:_Removed_version_value_was_invalid._n
call fcn.140001010
xor al, al
mov rcx, qword [rsi - 0x14]
mov byte [rsi + 9], al
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov r14, rax
test rax, rax
jne 0x1400013a9
mov byte [rsi + 8], al
jmp 0x140001469
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
nop word [rax + rax]
mov r10, qword [rax + 0x30]
movsxd rcx, dword [r10 + 0x3c]
mov ebx, dword [rcx + r10 + 0x88]
add rbx, r10
cmp rbx, r10
je 0x140001437
mov r9d, dword [rbx + 0x18]
test r9d, r9d
je 0x140001437
mov edi, dword [rbx + 0x20]
nop dword [rax]
nop dword [rax + rax]
dec r9d
mov r8d, 0x41e1f225
lea rcx, [rdi + r9*4]
mov ecx, dword [rcx + r10]
add rcx, r10
movzx edx, byte [rcx]
inc rcx
test dl, dl
je 0x140001432
nop
movsx edx, dl
lea rcx, [rcx + 1]
xor edx, r8d
imul r8d, edx, 0x1000193
movzx edx, byte [rcx - 1]
test dl, dl
jne 0x140001410
cmp r8d, 0x28f01dc5
je 0x14000143c
test r9d, r9d
jne 0x1400013f0
mov rax, qword [rax]
jmp 0x1400013c0
mov ecx, dword [rbx + 0x24]
add rcx, r10
movzx edx, word [rcx + r9*2]
mov ecx, dword [rbx + 0x1c]
add rcx, r10
mov eax, dword [rcx + rdx*4]
mov rcx, r14
mov rdx, qword [rsi - 0xc]
add rax, r10
call rax
test rax, rax
mov qword [rsi + 0xc], rax
setne al
mov byte [rsi + 8], al
inc ebp
add rsi, 0x30
cmp ebp, 2
jb 0x140001320
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
Function at 0x1400014a0
Capabilities:
Access peb ldr_data
Encode data using xor
Get kernel32 base address
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x140011040]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor ebp, ebp
lea rsi, [0x1400110e0]
mov eax, ebp
mov rcx, rsi
cmp dword [rcx], 1
je 0x140001589
inc eax
add rcx, 0x30
cmp eax, 2
jb 0x1400014d1
mov rsi, rbp
xor eax, eax
lea rdi, [rsp + 0x30]
mov ecx, 0x30
rep stosb byte [rdi], al
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x10]
nop word [rax + rax]
mov r9, qword [rax + 0x30]
movsxd rcx, dword [r9 + 0x3c]
mov r11d, dword [rcx + r9 + 0x88]
add r11, r9
cmp r11, r9
je 0x140001584
mov r8d, dword [r11 + 0x18]
test r8d, r8d
je 0x140001584
mov ebx, dword [r11 + 0x20]
nop word [rax + rax]
dec r8d
mov edi, 0xe7aa192f
lea rcx, [rbx + r8*4]
mov ecx, dword [rcx + r9]
add rcx, r9
movzx edx, byte [rcx]
inc rcx
test dl, dl
je 0x14000157f
nop dword [rax]
movsx edx, dl
lea rcx, [rcx + 1]
xor edx, edi
imul edi, edx, 0x1000193
movzx edx, byte [rcx - 1]
test dl, dl
jne 0x140001560
cmp edi, 0x6557603b
je 0x1400015a7
test r8d, r8d
jne 0x140001540
mov rax, qword [rax]
jmp 0x140001510
cdqe
lea rcx, [rax + rax*2]
add rcx, rcx
cmp byte [rsi + rcx*8 + 0x24], bpl
je 0x1400014e5
mov rsi, qword [rsi + rcx*8 + 0x28]
jmp 0x1400014e8
mov ecx, dword [r11 + 0x24]
add rcx, r9
movzx edx, word [rcx + r8*2]
mov ecx, dword [r11 + 0x1c]
add rcx, r9
mov eax, dword [rcx + rdx*4]
add rax, r9
call rax
mov r9d, 0x30
mov qword [rsp + 0x20], rbp
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rax
call rsi
mov ecx, dword [rsp + 0x58]
test eax, eax
cmovne ecx, ebp
mov eax, ecx
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14000c1c0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140002080
Capabilities:
Create process on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0xc0
mov rax, qword [0x140011040]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rbx, rcx
mov qword [r11 - 0x38], rcx
mov r8, qword [rcx + 0x10]
mov rcx, qword [rcx + 0x18]
mov rax, rcx
sub rax, r8
xor r15d, r15d
cmp rax, 3
jb 0x14000214f
lea rax, [r8 + 3]
mov qword [rbx + 0x10], rax
mov rdi, rbx
cmp rcx, 0xf
jbe 0x1400020e3
mov rdi, qword [rbx]
lea rax, [0x14000e5cf]
mov r14d, 3
lea rsi, [0x14000e5cc]
cmp rax, rdi
jbe 0x140002117
lea rax, [rdi + r8]
cmp rsi, rax
ja 0x140002117
cmp rdi, rsi
ja 0x14000210f
mov rbp, r15
jmp 0x14000211a
mov rbp, rdi
sub rbp, rsi
jmp 0x14000211a
mov rbp, r14
inc r8
lea rcx, [rdi + 3]
mov rdx, rdi
call sub.VCRUNTIME140.dll_memmove
mov r8, rbp
mov rdx, rsi
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
sub r14, rbp
lea rdx, [rsi + 3]
add rdx, rbp
lea rcx, [rdi + rbp]
mov r8, r14
call sub.VCRUNTIME140.dll_memcpy
jmp 0x140002171
mov r14d, 3
mov qword [rsp + 0x28], r14
lea rsi, [0x14000e5cc]
mov qword [rsp + 0x20], rsi
mov edx, r14d
mov rcx, rbx
call fcn.14000bdd0
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
mov dword [rsp + 0x30], 0x70
mov dword [rsp + 0x34], 0x40
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x40], r15
lea rax, str.cmd.exe
mov qword [rsp + 0x48], rax
mov rax, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x1400021d0
mov rax, qword [rbx]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x60], r15d
mov qword [rsp + 0x68], r15
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x140002206
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rdx, [rsp + 0xa8]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 0xf
jbe 0x140002261
inc rdx
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x14000225c
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000229d
mov rcx, r8
call fcn.14000c464
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], 0xf
mov byte [rbx], 0
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.14000c1c0
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
Function at 0x14000b670
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov dword [rcx + 4], edx
lea r9, [rcx + 8]
mov eax, 1
nop dword [rax]
mov r8d, edx
lea r9, [r9 + 4]
shr r8d, 0x1e
xor r8d, edx
imul edx, r8d, 0x6c078965
add edx, eax
inc rax
mov dword [r9 - 4], edx
cmp rax, 0x270
jb 0x14000b680
mov dword [rcx], 0x270
ret

Function at 0x14000c020
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r9, rcx
mov r10d, 0x270
mov ecx, dword [rcx]
cmp ecx, r10d
jne 0x14000c081
lea r8, [r9 + 8]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r10, 1
jne 0x14000c040
mov ecx, dword [r9]
jmp 0x14000c168
cmp ecx, 0x4e0
jb 0x14000c168
lea r10, [r9 + 0x9c4]
mov qword [rsp], rbx
mov r11d, dword [r10]
mov ebx, 0xe3
mov eax, r11d
mov r11d, dword [r10 + 4]
mov edx, r11d
lea r10, [r10 + 4]
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r10 + 0x630]
xor ecx, edx
mov dword [r10 - 0x9c4], ecx
sub rbx, 1
jne 0x14000c0a0
lea r10, [r9 + 0xd50]
mov ebx, 0x18c
mov r11d, dword [r10]
nop dword [rax + rax]
mov eax, r11d
mov r11d, dword [r10 + 4]
mov edx, r11d
lea r10, [r10 + 4]
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r10 - 0xd50]
xor ecx, edx
mov dword [r10 - 0x9c4], ecx
sub rbx, 1
jne 0x14000c0f0
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret

Function at 0x14000cbe4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000cc2e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000cc2e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000cc2e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000cc2e
cmp dword [rcx + 0x84], 0xe
jbe 0x14000cc2e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14000cc30
xor al, al
add rsp, 0x28
ret
Function at 0x140130baa
Capabilities:
Execute anti-debugging instructions
Execute syscall
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
ror r10d, 0xc5
cmp r14, rdx
call rax
cmp r9d, 0x64ea1e95
lea r8d, [rcx - 0xc34c]
pop rdx
test r13d, 0xd87dfa
rcr edi, 0xc1
popf
and r10d, 0xf4d7d09
and r14d, 0xa2facc5c
movabs rbp, 0x619be900000167e9
mul r13
lea r12d, [rcx - 0xf12c]
call fcn.140131412
mov eax, 0xffffffff
jmp 0x140133527

Function at 0x140131412
Capabilities:
Contain obfuscated stackstrings

Disassembly:
movabs byte [0x8d44fffff9db850f], al
cmpsd dword [rsi], dword [rdi]
mov edx, 0xff0000a1
ror dword [rcx - 0x46], 1
Function at 0x140133a00
Capabilities:
Execute syscall

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
jmp 0x140133a13
xchg rcx, r14
mov qword [rsp + 8], r14
xchg rcx, r14
sub rsp, 0x28
lea rax, [0x140133d30]
xchg r14, rax
je 0x140133a36
jne 0x140133a36
jmp rax
jmp 0x140133a64
xchg r8, rax
mov qword [rsp + 0x10], r8
xchg r8, rax
jmp 0x140133aeb
mov qword [rsp + 0x18], r14
xchg r14, rax
mov dword [rsp + 8], 0
mov rax, qword [rsp + 0x30]
jmp 0x140133a56
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004a7330]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004a7340]
mov dword [rax], 1
mov rax, qword [0x004a7350]
mov dword [rax], 1
mov rax, qword [0x004a7320]
mov dword [rax], 1
mov rax, qword [0x004a71e0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004a7310]
mov dword [0x004cb008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x004a72d0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004a6670]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x40b200
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004cb624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40b388
mov rax, qword [0x004cb628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40b24c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40b2d5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40b230
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40b3bd
mov rax, qword [0x004cb628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004cb628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40b3a0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40b2ce
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40b330
add dword [0x004cb624], 1
cmp edi, 8
jae 0x40b303
test dil, 4
jne 0x40b374
test edi, edi
je 0x40b2f8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40b38f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x40b2f8
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40b31c
jmp 0x40b2f8
add rsi, qword [0x004cb628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40b2ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40b2f8
xor esi, esi
jmp 0x40b257
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40b2f8
mov rax, qword [0x004cb628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x40bb10
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004cb900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004cb8e0]
test rbx, rbx
je 0x40bb64
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40bb5b
test rsi, rsi
je 0x40bb5b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40bb40
lea rcx, [0x004cb900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40bda0
Capabilities:
Parse pe header

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

Function at 0x40bdc0
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 0x40be01
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x40bdf8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40be03
add rax, 0x28
cmp rax, r9
jne 0x40bde4
xor eax, eax
ret

Function at 0x40bea0
Capabilities:
Enumerate pe sections

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

Function at 0x40c010
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004a71e0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40c030
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c028
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40c08d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40c084
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40c094
add rax, 0x28
cmp rax, r9
jne 0x40c070
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40c0b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004a71e0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40c11e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c11e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40c11e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40c11e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x40c115
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40c125
add rcx, 0x28
cmp rcx, rax
jne 0x40c100
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40c138
jmp 0x40c11e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40c146
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40c11e
test r9d, r9d
jg 0x40c130
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x40c220
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x40c250
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp sym.__mingwthr_key_dtor
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x40c280
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x40c2b0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40c2c5
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x40cc60
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [global___mutex], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x004cb968], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x40ccb0
lea rdx, [dbg.emutls_destroy]
mov ecx, eax
mov dword [0x004cb958], eax
call sym.__mingwthr_key_dtor
test eax, eax
jne 0x40ccba
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40ccab
call sym.abort
nop