joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180017280
Capabilities:
Check if file exists
Create directory

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0xe8
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov rax, qword [0x18002f0d0]
xor rax, rsp
mov qword [rsp + 0xd8], rax
mov rdx, qword [rsp + 0xf0]
lea rcx, [rsp + 0x70]
call fcn.180001710
nop
mov r8, qword [0x180026ad8]
lea rdx, [0x180028724]
lea rcx, [rsp + 0x70]
call fcn.180017470
mov qword [rsp + 0xa8], rax
lea rdx, [0x180028734]
lea rcx, [rsp + 0x98]
call fcn.180001530
nop
mov qword [rsp + 0xa0], 0xffffffffffffffff
mov rax, qword [0x180026ad8]
cmp qword [rsp + 0xa8], rax
je 0x18001741f
mov r9, qword [rsp + 0xa8]
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x70]
call fcn.180012b70
mov qword [rsp + 0xc8], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0xd0], rax
mov rcx, qword [rsp + 0xd0]
call fcn.1800106b0
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.1800015e0
nop
lea rcx, [rsp + 0x48]
call fcn.180001760
lea rcx, [rsp + 0x98]
call fcn.180001700
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1800173e2
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0xb0]
call fcn.180001500
nop
mov r8, qword [rsp + 0xb0]
lea rdx, [0x180028870]
lea rcx, [rsp + 0x98]
call fcn.180002600
lea rcx, [rsp + 0x98]
call fcn.180001700
xor r8d, r8d
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
nop
lea rcx, [rsp + 0xb0]
call fcn.1800019a0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov r8d, 5
mov edx, 0xc0000000
mov rcx, qword [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xb8], rax
lea rcx, [rsp + 0x98]
call fcn.1800019a0
nop
lea rcx, [rsp + 0x70]
call fcn.180001760
mov rax, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0xd8]
xor rcx, rsp
call fcn.180004800
add rsp, 0xe8
ret

Function at 0x180017ff4
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, edx
test rcx, rcx
jne 0x18001801e
call fcn.180005d58
and dword [rax], 0
call fcn.180005d38
mov ebx, 0x16
mov dword [rax], ebx
call fcn.180005cd0
mov eax, ebx
jmp 0x18001806e
test edx, 0xfffffff9
jne 0x180018001
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x180018047
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.180005d78
call fcn.180005d38
mov eax, dword [rax]
jmp 0x18001806e
test al, 0x10
jne 0x18001806c
test al, 1
je 0x18001806c
test bl, 2
je 0x18001806c
call fcn.180005d58
mov dword [rax], 5
call fcn.180005d38
mov dword [rax], 0xd
jmp 0x18001803e
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x14000ab90
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x14000abb8
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x14000abde
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x14000abe0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x14000ac39
test ecx, ecx
jle 0x14000ac19
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x14000ac39
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x14000ac39
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x14000ac60
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x14000ac82
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x14000ac98
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x14000acb4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x14000acb6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x14000acf2
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14000ad8e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000ad2d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x14000ad6e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14000ad8e
cmp rbx, rax
ja 0x14000ad40
test rbx, rbx
je 0x14000ad8e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
Function at 0x14000b1f0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140025040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000b21d
xor eax, eax
jmp 0x14000b389
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x14000b257
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x14000b257
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 0x14000b389
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000b37c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14000b29a
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 0x14000b2c5
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 0x14000b381
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 0x14000b334
sub eax, 1
je 0x14000b334
cmp eax, 2
jne 0x14000b37c
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 0x14000b381
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x14000b362
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 0x14000b37c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x14000b381
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140017360
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x14000b570
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140025040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x14000b643
cmp byte [rcx + 0x71], 0
je 0x14000b643
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000b63f
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 0x14000b604
sub eax, 1
je 0x14000b608
cmp eax, 2
jne 0x14000b63f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140017360
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x14000b636
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 0x14000b63f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000b5ec
xor al, al
jmp 0x14000b5ec
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140017360
add rsp, 0x60
pop rbx
ret

Function at 0x14000bf80
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x20
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rbx, rax
test rax, rax
je 0x14000c00e
lea rdx, str.NtOpenKey
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.NtDeleteKey
mov rcx, rbx
mov qword [0x140026028], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.RtlInitUnicodeString
mov rcx, rbx
mov qword [0x140026030], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.NtClose
mov rcx, rbx
mov qword [0x140026018], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.NtSetInformationProcess
mov rcx, rbx
mov qword [0x140026020], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140026008], rax
add rsp, 0x20
pop rbx
ret
Function at 0x140015710
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x3a0
mov rax, qword [0x140025040]
xor rax, rsp
mov qword [rsp + 0x390], rax
mov rbx, rcx
xor edx, edx
mov ecx, 2
xor sil, sil
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14001577a
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_process_snapshot.
call fcn.1400071d0
lea rdx, [0x1400073b0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor al, al
jmp 0x140015844
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x3b8], rbp
mov rcx, rdi
mov dword [rsp + 0x40], 0x238
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x14001580c
xor ebp, ebp
nop
mov qword [rsp + 0x38], rbp
lea rax, [rsp + 0x280]
mov qword [rsp + 0x30], rbp
lea r8, [rsp + 0x6c]
mov dword [rsp + 0x28], 0x104
mov r9d, 0xffffffff
xor edx, edx
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp qword [rbx + 0x18], 0xf
mov rdx, rbx
jbe 0x1400157e1
mov rdx, qword [rbx]
lea rcx, [rsp + 0x280]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x140015807
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x1400157a0
jmp 0x14001582f
mov sil, 1
jmp 0x14001582f
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_iterate_through_processes.
call fcn.1400071d0
lea rdx, [0x1400073b0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x3b8]
movzx eax, sil
mov rcx, qword [rsp + 0x390]
xor rcx, rsp
call fcn.140017360
lea r11, [rsp + 0x3a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x140015af0
Capabilities:
Enumerate processes
Terminate process

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x3a0
mov rax, qword [0x140025040]
xor rax, rsp
mov qword [rsp + 0x390], rax
mov rdi, rcx
xor edx, edx
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140015b52
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_process_snapshot.
call fcn.1400071d0
lea rdx, [0x1400073b0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor al, al
jmp 0x140015c59
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x238
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x140015c2b
mov qword [rsp + 0x3c0], rbp
xor ebp, ebp
mov qword [rsp + 0x3b8], rbx
mov qword [rsp + 0x38], rbp
lea rax, [rsp + 0x280]
mov qword [rsp + 0x30], rbp
lea r8, [rsp + 0x6c]
mov dword [rsp + 0x28], 0x104
mov r9d, 0xffffffff
xor edx, edx
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp qword [rdi + 0x18], 0xf
mov rdx, rdi
jbe 0x140015bc3
mov rdx, qword [rdi]
lea rcx, [rsp + 0x280]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x140015c03
mov r8d, dword [rsp + 0x48]
xor edx, edx
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
je 0x140015c03
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140015b82
mov rbp, qword [rsp + 0x3c0]
mov rbx, qword [rsp + 0x3b8]
jmp 0x140015c4e
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_iterate_through_processes.
call fcn.1400071d0
lea rdx, [0x1400073b0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov rcx, qword [rsp + 0x390]
xor rcx, rsp
call fcn.140017360
mov rsi, qword [rsp + 0x3c8]
add rsp, 0x3a0
pop rdi
ret
Function at 0x1400168dc
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 0x140016916
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x14001691b
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 0x140016964
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x14001b830]
cmp byte [rcx + rax], 0
je 0x140016964
dec r8
sub rdx, 1
jne 0x14001694a
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x140017ff0
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140271890]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1402718a0]
mov dword [rax], 1
mov rax, qword [0x1402718b0]
mov dword [rax], 1
mov rax, qword [0x1402717e0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140271880]
mov dword [0x14029900c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140271980]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140271960]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140270e30]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x14002fac0
Capabilities:
Parse pe header

Disassembly:
push rsi
sub rsp, 0x30
mov rax, qword [rcx + 0x18]
movzx edx, byte [rax]
cmp dl, 0x4c
je 0x14002fb30
jg 0x14002faf0
sub edx, 0x49
cmp dl, 1
ja 0x14002fb40
add rax, 1
mov qword [rcx + 0x18], rax
add rsp, 0x30
pop rsi
jmp sym.d_template_args_1
cmp dl, 0x58
jne 0x14002fb40
add rax, 1
mov esi, dword [rcx + 0x4c]
mov dword [rcx + 0x4c], 1
mov qword [rcx + 0x18], rax
mov qword [rsp + 0x28], rcx
call sym.d_expression_1
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rcx + 0x18]
mov dword [rcx + 0x4c], esi
cmp byte [rdx], 0x45
jne 0x14002fb50
add rdx, 1
mov qword [rcx + 0x18], rdx
add rsp, 0x30
pop rsi
ret
add rsp, 0x30
pop rsi
jmp sym.d_expr_primary
add rsp, 0x30
pop rsi
jmp sym.d_type
xor eax, eax
jmp 0x14002fb2a
Function at 0x140038fa0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140039010
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1402990d4]
mov rbx, rcx
test esi, esi
jle 0x140039140
mov rax, qword [0x1402990d8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14003905b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400390e5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140039040
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140039162
mov rax, qword [0x1402990d8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1402990d8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140039147
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400390de
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x1400390f0
add dword [0x1402990d4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1402990d8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400390de
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 esi, esi
jmp 0x140039068
mov rax, qword [0x1402990d8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140039700
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140299140]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140299120]
test rbx, rbx
je 0x14003975c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140039753
test eax, eax
jne 0x140039753
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140039738
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]