joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004540
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000456d
xor eax, eax
jmp 0x1400046d9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400045a7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x1400045a7
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x1400046d9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400046cc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400045ea
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140004615
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400046d1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140004684
sub eax, 1
je 0x140004684
cmp eax, 2
jne 0x1400046cc
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400046d1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400046b2
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x1400046cc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400046d1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140005df0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140004b40
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140004c13
cmp byte [rcx + 0x71], 0
je 0x140004c13
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140004c0f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140004bd4
sub eax, 1
je 0x140004bd8
cmp eax, 2
jne 0x140004c0f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140005df0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140004c06
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140004c0f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140004bbc
xor al, al
jmp 0x140004bbc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140005df0
add rsp, 0x60
pop rbx
ret

Function at 0x140006778
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400067c2
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400067c2
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400067c2
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400067c2
cmp dword [rcx + 0x84], 0xe
jbe 0x1400067c2
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400067c4
xor al, al
add rsp, 0x28
ret

Function at 0x140006b90
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x140006bca
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x140006bcf
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x140006c18
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140008670]
cmp byte [rcx + rax], 0
je 0x140006c18
dec r8
sub rdx, 1
jne 0x140006bfe
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x140002670
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r10, rcx
mov r9d, 0x270
mov ecx, dword [rcx]
cmp ecx, r9d
jne 0x1400026d1
lea r8, [r10 + 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 r9, 1
jne 0x140002690
mov ecx, dword [r10]
jmp 0x1400027ba
cmp ecx, 0x4e0
jb 0x1400027ba
lea r11, [r10 + 0x9c4]
mov qword [rsp], rbx
mov eax, dword [r11]
mov ebx, 0xe3
mov edx, dword [r11 + 4]
lea r8, [r11 + 4]
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 + 0x634]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x1400026f0
lea r11, [r10 + 0xd50]
mov ebx, 0x18c
mov eax, dword [r11]
nop dword [rax + rax]
mov edx, eax
lea r8, [r11 + 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 - 0xd4c]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x140002740
mov edx, dword [r10 + 0x1380]
xor edx, dword [r10 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, dword [r10 + 0x1380]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r10 + 0x634]
xor ecx, edx
mov dword [r10 + 0x9c0], ecx
xor ecx, ecx
mov dword [r10], ecx
mov eax, ecx
mov edx, dword [r10 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r10], eax
mov ecx, edx
mov eax, dword [r10 + 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 0x140003118
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140003162
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140003162
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003162
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140003162
cmp dword [rcx + 0x84], 0xe
jbe 0x140003162
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140003164
xor al, al
add rsp, 0x28
ret
Function at 0x1400023c0
Capabilities:
Allocate or change rwx memory
Create thread
Spawn thread to rwx shellcode

Disassembly:
sub rsp, 0x168
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0xa8], rdx
mov qword [rsp + 0x138], 0
mov qword [rsp + 0x140], 0
mov qword [rsp + 0x150], 0
mov rax, qword [rsp + 0x150]
mov qword [rsp + 0x148], rax
mov rcx, qword [rsp + 0x148]
mov r8d, 0x1000
mov r9d, 0x40
call sub.kernel32.dll_VirtualAlloc
mov qword [rsp + 0x40], rax
mov qword [rsp + 0xb0], rax
call sub.kernel32.dll_GetLastError
cmp eax, 0
jne 0x140002565
mov rdx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x158], rcx
mov qword [rsp + 0x160], rax
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0xc8], rdx
mov qword [rsp + 0xd0], rax
mov r8d, 1
call fcn.140003470
mov rdx, qword [rsp + 0x38]
mov r8, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x40]
call sub.VCRUNTIME140.dll_memmove
mov rax, qword [rsp + 0x40]
mov dword [rsp + 0x4c], 0
mov qword [rsp + 0xf8], 0
mov qword [rsp + 0x100], 0
mov qword [rsp + 0x110], 0
mov rcx, qword [rsp + 0x110]
mov qword [rsp + 0x108], rcx
mov rcx, qword [rsp + 0x108]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x118], 0
mov qword [rsp + 0x120], 0
mov qword [rsp + 0x130], 0
mov rax, qword [rsp + 0x130]
mov qword [rsp + 0x128], rax
mov r9, qword [rsp + 0x128]
mov r8, qword [rsp + 0x50]
xor eax, eax
mov edx, eax
xor eax, eax
lea rax, [rsp + 0x4c]
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x28], rax
call sub.kernel32.dll_CreateThread
mov rcx, rax
mov qword [rsp + 0xb8], rcx
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
jmp 0x1400025f2
call sub.kernel32.dll_GetLastError
mov dword [rsp + 0x9c], eax
lea rcx, [rsp + 0x9c]
mov qword [rsp + 0xe8], rcx
lea rax, [0x140040bb0]
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0xd8], rcx
mov qword [rsp + 0xe0], rax
mov rcx, qword [rsp + 0xd8]
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x58]
lea rdx, str._n_J
mov r8d, 2
lea r9, [rsp + 0x88]
mov qword [rsp + 0x20], 1
call fcn.14000d630
lea rcx, [rsp + 0x58]
call fcn.14002d690
nop
add rsp, 0x168
ret
Function at 0x14002c480
Capabilities:
Get common file path

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x498
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x410], 0xfffffffffffffffe
mov qword [rbp + 0x3f0], rcx
mov qword [rbp + 0x3f8], 0
mov qword [rbp + 0x400], 2
mov qword [rbp + 0x408], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x3e8], rax
xor esi, esi
xor edi, edi
xor ebx, ebx
cmp r8, 0x201
jae 0x14002c520
jmp 0x14002c50f
jae 0x14002c5df
cmp r8, 0x201
jae 0x14002c520
mov r14d, 0x200
lea r15, [rbp - 0x60]
mov r12, r8
jmp 0x14002c577
sub r8, rbx
sub rdi, rbx
cmp rdi, r8
jae 0x14002c54f
lea rcx, [rbp + 0x3f8]
mov rdx, rbx
call fcn.140041ee0
mov rsi, qword [rbp + 0x3f8]
mov rax, qword [rbp + 0x400]
mov qword [rbp + 0x3e8], rax
mov eax, 0xffffffff
cmp rsi, rax
mov ebx, 0xffffffff
cmovb rbx, rsi
mov qword [rbp + 0x408], rbx
mov rdi, rsi
mov r14, rbx
mov r15, qword [rbp + 0x3e8]
mov r12, rbx
xor ecx, ecx
call qword [sym.imp.kernel32.dll_SetLastError]
mov ecx, r12d
mov rdx, r15
call qword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov r13d, eax
test eax, eax
jne 0x14002c5a0
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x14002c659
mov r8d, r13d
cmp r12, r8
jne 0x14002c500
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14002c68d
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov r8, r12
cmp r8, 0x201
jb 0x14002c50f
jmp 0x14002c520
cmp r14, r8
jb 0x14002c6a7
lea rcx, [rbp + 0x3c8]
mov rdx, r15
call fcn.14002e200
movups xmm0, xmmword [rbp + 0x3c8]
movups xmm1, xmmword [rbp + 0x3d8]
movaps xmmword [rbp + 0x3b0], xmm1
movaps xmmword [rbp + 0x3a0], xmm0
mov rsi, qword [rbp + 0x3f0]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
mov rdx, qword [rbp + 0x3f8]
test rdx, rdx
je 0x14002c642
mov rcx, qword [rbp + 0x400]
add rdx, rdx
mov r8d, 2
call fcn.14000da30
mov rax, rsi
add rsp, 0x498
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov rsi, qword [rbp + 0x3f0]
mov qword [rsi + 8], rax
movabs rax, 0x8000000000000000
mov qword [rsi], rax
mov rdx, qword [rbp + 0x3f8]
test rdx, rdx
jne 0x14002c62d
jmp 0x14002c642
lea rcx, str.internal_error:_entered_unreachable_code_rustc_9b00956e56009bab2aa15d7bff10916599e3d6d6library_alloc_src_vecmod.rs
lea r8, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.140042cb0
jmp 0x14002c6bc
lea rax, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, r14
mov r8, rax
call fcn.140043190
ud2
Function at 0x1400327c0
Capabilities:
Write file on windows

Disassembly:
push rsi
sub rsp, 0xb0
mov rsi, rcx
movups xmm0, xmmword [0x14004d728]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r8, rax
cmovb rax, r8
test r9, r9
je 0x1400327f8
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0x88], rcx
test r9, r9
mov qword [rsp + 0x80], r9
lea rcx, [rsp + 0x88]
cmove rcx, r9
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rdx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], 0
mov rcx, rsi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x140032861
mov rcx, rsi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x140032895
test eax, eax
js 0x140032875
mov rdx, qword [rsp + 0x68]
xor eax, eax
add rsp, 0xb0
pop rsi
ret
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov eax, 1
add rsp, 0xb0
pop rsi
ret
mov dword [rsp + 0x58], 0
mov byte [rsp + 0x5c], 0
lea rax, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x90], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x98], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x80]
call fcn.14002df40
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0x78]
call fcn.14002aaa0
mov ecx, 7
int 0x29
ud2
Function at 0x140040110
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
test r8, r8
je 0x14004018a
mov rax, rdx
mov rdx, qword [rsp + 0x70]
mov esi, ecx
shr esi, 8
lea r8, [rax + r8*2]
xor r11d, r11d
mov rbx, rax
movzx edi, byte [rax + 1]
add rax, 2
lea r10, [r11 + rdi]
cmp byte [rbx], sil
jne 0x140040180
cmp r11, r10
ja 0x140040215
cmp r10, rdx
ja 0x140040227
add r11, r9
xor ebx, ebx
nop dword [rax]
cmp rdi, rbx
je 0x140040182
lea r14, [rbx + 1]
cmp byte [r11 + rbx], cl
mov rbx, r14
jne 0x140040160
jmp 0x1400401f7
ja 0x14004018a
mov r11, r10
cmp rax, r8
jne 0x140040132
mov rdx, qword [rsp + 0x80]
test rdx, rdx
je 0x1400401fb
mov r8, qword [rsp + 0x78]
add rdx, r8
movzx ecx, cx
mov al, 1
nop word cs:[rax + rax]
lea r10, [r8 + 1]
movzx r9d, byte [r8]
test r9b, r9b
js 0x1400401d0
mov r8, r10
sub ecx, r9d
jns 0x1400401ee
jmp 0x1400401fd
cmp r10, rdx
je 0x140040209
movzx r10d, byte [r8 + 1]
add r8, 2
and r9d, 0x7f
shl r9d, 8
or r9d, r10d
sub ecx, r9d
js 0x1400401fd
xor al, 1
cmp r8, rdx
jne 0x1400401b0
jmp 0x1400401fd
xor eax, eax
jmp 0x1400401fd
mov al, 1
and al, 1
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
lea rcx, str.librarycore_srcunicodeprintable.rs
call fcn.140042ba0
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r11
mov rdx, r10
call fcn.1400431a0
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r10
call fcn.140043190
int3

Function at 0x1400417cc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.kernel32.dll_GetModuleHandleW]
test rax, rax
je 0x140041816
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140041816
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140041816
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140041816
cmp dword [rcx + 0x84], 0xe
jbe 0x140041816
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140041818
xor al, al
add rsp, 0x28
ret
Function at 0x180003c40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x180003c73
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rcx, rax
mov qword [rsp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x180003cb6
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rbx
and edi, 0xf
jbe 0x180003cb1
cmp rbx, r11
jae 0x180003cb6
dec edi
movzx eax, word [rbx]
lea rbx, [rbx + rax*2 + 2]
jne 0x180003ca0
cmp rbx, r11
jb 0x180003cba
xor eax, eax
jmp 0x180003cc6
xor eax, eax
cmp word [rbx], ax
cmove rbx, rax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x180005310
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x90
mov rax, qword [0x1800b3020]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rsi, qword [rdx + 8]
xor edx, edx
mov r12, r8
lea rcx, [rsp + 0x40]
lea r8d, [rdx + 0x2c]
mov rbp, r9
call sub.MSVCR100.dll_memset
lea rax, [rsp + 0x40]
xor r13d, r13d
mov dword [rsp + 0x30], r13d
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
mov rcx, rsi
mov qword [rsp + 0x20], r13
mov dword [rsp + 0x40], 0x28
call qword [sym.imp.GDI32.dll_GetDIBits]
mov eax, dword [rsp + 0x54]
mov edi, dword [rsp + 0x48]
test eax, eax
jne 0x1800053b2
mov eax, edi
cdq
mov ecx, eax
movzx eax, word [rsp + 0x4e]
add eax, 7
xor ecx, edx
sub ecx, edx
imul eax, ecx
imul eax, dword [rsp + 0x44]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [rsp + 0x54], eax
mov ecx, eax
call qword [sym.imp.MSVCR100.dll_malloc]
xor r8d, r8d
mov rbx, rax
test rax, rax
jne 0x1800053d9
lea rcx, str.Unable_to_Allocate_Bitmap_Memory
xor edx, edx
call qword [sym.imp.mfc100u.dll_AfxInitExtensionModule]
jmp 0x1800054b6
lea rax, [rsp + 0x40]
mov dword [rsp + 0x30], r13d
mov r9d, edi
mov qword [rsp + 0x28], rax
mov rdx, rbp
mov rcx, rsi
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x50], r13d
call qword [sym.imp.GDI32.dll_GetDIBits]
mov eax, dword [rsp + 0x54]
mov rcx, qword [r12]
lea rdx, [0x180086754]
add eax, 0x36
mov dword [rsp + 0x76], r13d
mov dword [rsp + 0x7a], 0x36
mov dword [rsp + 0x72], eax
mov eax, 0x4d42
mov word [rsp + 0x70], ax
call qword [sym.imp.MSVCR100.dll__wfopen]
mov rdi, rax
test rax, rax
jne 0x180005450
lea rcx, str.Unable_to_Create_Bitmap_File
xor r8d, r8d
xor edx, edx
call qword [sym.imp.mfc100u.dll_AfxInitExtensionModule]
jmp 0x1800054b6
mov edx, 0xe
lea rcx, [rsp + 0x70]
mov r9, rax
lea r8d, [rdx - 0xd]
call qword [sym.imp.MSVCR100.dll_fwrite]
mov edx, 0x28
lea rcx, [rsp + 0x40]
lea r8d, [rdx - 0x27]
mov r9, rdi
call qword [sym.imp.MSVCR100.dll_fwrite]
mov edx, dword [rsp + 0x54]
mov r9, rdi
mov r8d, 1
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_fwrite]
test rsi, rsi
je 0x1800054a4
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.USER32.dll_ReleaseDC]
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_free]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_fclose]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.180021350
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x180021a47
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x1800b3020]
jne 0x18002136a
rol rcx, 0x10
test cx, 0xffff
jne 0x180021366
repz ret
ror rcx, 0x10
jmp 0x1800219a0
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x1800b4150]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x1800b4248]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180021a25
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x1800b4150]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x180021a47
mov rax, qword [rsp + 0x88]
mov qword [0x1800b4248], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x1800b41e8], rax
mov rax, qword [0x1800b4248]
mov qword [0x1800b40c0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x1800b41d0], rax
mov dword [0x1800b40b0], 0xc0000409
mov dword [0x1800b40b4], 1
mov rax, qword [0x1800b3020]
mov qword [rsp + 0x68], rax
mov rax, qword [0x1800b3028]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x1800b4148], eax
mov ecx, 1
call sub.MSVCR100.dll___crt_debugger_hook
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x1800802c8]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x1800b4148], 0
jne 0x180021ace
mov ecx, 1
call sub.MSVCR100.dll___crt_debugger_hook
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
Function at 0x18005c260
Capabilities:
Check if file exists
Create directory

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x250
mov rax, qword [0x1800b3020]
xor rax, rsp
mov qword [rsp + 0x248], rax
xor eax, eax
mov word [rsp + 0x30], ax
lea rax, [rsp + 0x32]
mov rdi, rax
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x260]
call fcn.180025b40
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x260], 0
je 0x18005c2bc
cmp qword [rsp + 0x20], 4
jae 0x18005c2c3
xor al, al
jmp 0x18005c386
mov qword [rsp + 0x240], 0
jmp 0x18005c2e4
mov rax, qword [rsp + 0x240]
inc rax
mov qword [rsp + 0x240], rax
mov rax, qword [rsp + 0x20]
cmp qword [rsp + 0x240], rax
jae 0x18005c384
mov rax, qword [rsp + 0x240]
add rax, rax
mov rcx, qword [rsp + 0x240]
mov rdx, qword [rsp + 0x260]
movzx eax, word [rdx + rax*2]
mov word [rsp + rcx*2 + 0x30], ax
mov rax, qword [rsp + 0x240]
movzx eax, word [rsp + rax*2 + 0x30]
cmp eax, 0x5c
je 0x18005c33f
mov rax, qword [rsp + 0x240]
movzx eax, word [rsp + rax*2 + 0x30]
cmp eax, 0x2f
jne 0x18005c37f
xor eax, eax
mov rcx, qword [rsp + 0x240]
mov word [rsp + rcx*2 + 0x32], ax
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x18005c37f
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x18005c37f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x18005c37f
xor al, al
jmp 0x18005c386
jmp 0x18005c2d1
mov al, 1
mov rcx, qword [rsp + 0x248]
xor rcx, rsp
call fcn.180021350
add rsp, 0x250
pop rdi
ret