joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14007351c
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push rbp
lea rbp, [rax - 0x1e8]
sub rsp, 0x2e0
mov rbx, rcx
lea rcx, [rsp + 0x30]
xor edi, edi
mov r14b, dil
call fcn.14001e640
lea rcx, [rsp + 0x70]
call fcn.14001e640
lea rcx, [rsp + 0x50]
call fcn.14001e640
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14001a41c
mov rcx, qword [rsp + 0x30]
call fcn.14007492c
test al, al
je 0x140073590
lea rdx, [0x1400ce8d8]
lea rcx, [rsp + 0x30]
call fcn.14001ef20
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
call fcn.14001a1cc
mov rcx, qword [rsp + 0x30]
lea rdx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov sil, 1
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140073633
cmp sil, 1
jne 0x140073633
test byte [rbp - 0x70], 0x10
jne 0x140073612
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x30]
mov r14b, sil
call fcn.14001f350
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.14001ec60
lea rdx, [rbp - 0x44]
lea rcx, [rsp + 0x30]
call fcn.14001ef20
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, 1
jne 0x140073628
lea rdx, [rbp - 0x70]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400735c7
mov sil, dil
jmp 0x1400735c7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x14007363f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
mov dil, r14b
lea rcx, [rsp + 0x50]
call fcn.14001c29c
lea rcx, [rsp + 0x70]
call fcn.14001c29c
lea rcx, [rsp + 0x30]
call fcn.14001c29c
lea r11, [rsp + 0x2e0]
mov al, dil
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x14007b324
Capabilities:
Create directory
Delete directory

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 8], rcx
push rbp
push rdi
push r14
lea rbp, [rax - 0x4ff68]
mov eax, 0x50050
call fcn.140038b30
sub rsp, rax
mov sil, r9b
mov rdi, r8
mov rcx, rdx
lea r9, [rsp + 0x40]
lea r8, [rbp + 0xff50]
mov edx, 0x7fff
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
xor r14d, r14d
test eax, eax
jne 0x14007b379
xor eax, eax
jmp 0x14007b4b9
lea r8, [rbp + 0xff50]
lea rdx, [0x1400cee90]
lea rcx, [rsp + 0x50]
call fcn.1400278d0
lea rcx, [rsp + 0x50]
call fcn.140026b28
mov rbx, rax
cmp word [rsp + rax*2 + 0x4e], 0x5c
jne 0x14007b3b4
cmp word [rsp + rax*2 + 0x4c], 0x3a
je 0x14007b3b4
mov word [rsp + rax*2 + 0x4e], r14w
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14007b3c8
test sil, sil
je 0x14007b372
mov qword [rsp + 0x30], r14
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rdi
mov dword [rsp + 0x28], 0x2200000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14007b408
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x14007b372
lea rcx, [rbp + 0x1ff50]
xor edx, edx
mov r8d, 0x2fffa
call fcn.140026d50
add bx, bx
lea rdx, [rsp + 0x50]
mov word [rbp + 0x1ff5a], bx
lea rcx, [rbp + 0x1ff60]
add bx, 2
mov r8d, 0x7fff
mov dword [rbp + 0x1ff50], 0xa0000003
mov word [rbp + 0x1ff5c], bx
call fcn.140028360
movzx eax, word [rbp + 0x1ff5a]
mov qword [rsp + 0x38], r14
add ax, 0xc
lea r8, [rbp + 0x1ff50]
mov edx, 0x900a4
movzx r9d, ax
mov word [rbp + 0x1ff54], ax
lea rax, [rbp + 0x4ff70]
mov qword [rsp + 0x30], rax
add r9d, 8
mov rcx, rsi
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, rsi
test eax, eax
jne 0x14007b4ae
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14007b3fa
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
lea r11, [rsp + 0x50050]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x1401d2310
Capabilities:
Terminate process

Disassembly:
stosd dword [rdi], eax
hlt
cmp ch, dh
loop 0x1400e31a7
sub eax, 0xc1810c4d
mov edi, 0x2e144d7b
add al, 0xbe
mov eax, 0x7527dcf7
or al, al
test byte [rsi + 0x7426dd91], bl
div byte [rcx + 0x1a]
invalid
cld
pop r11
jmp 0x1401d231d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x1401d232d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x1401d2315
lea eax, [rcx + 1]
jmp 0x1401d233b
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x1401d234e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x1401d2334
sub eax, 3
jb 0x1401d236e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x1401d23bd
sar eax, 1
movsxd rbp, eax
jb 0x1401d23a4
jmp 0x1401d237c
add ebx, ebx
jne 0x1401d237a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1401d23a4
inc ecx
add ebx, ebx
jne 0x1401d238a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1401d23a4
call r11
adc ecx, ecx
add ebx, ebx
jne 0x1401d239d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x1401d238c
add ecx, 2
jmp 0x1401d23a9
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.1401d22d2
jmp 0x1401d231d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0xf6e00
mov dl, 0x23
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x1401d2409
cmp rsi, rcx
jae 0x1401d2411
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x1401d23f0
cmp al, 0x8f
ja 0x1401d23f0
cmp byte [rsi - 2], 0xf
je 0x1401d23f6
sub al, 0xe8
cmp al, 1
ja 0x1401d23da
cmp rsi, rcx
jae 0x1401d2411
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x1401d23e0
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x1401d2411
lodsb al, byte [rsi]
jmp 0x1401d23f0
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x1ce000]
mov eax, dword [rdi]
or eax, eax
je 0x1401d246e
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x1dc3e8]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x1401d241e
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x1401d2468
mov qword [rbx], rax
add rbx, 8
jmp 0x1401d243e
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x22f]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x1401d24c6
sub rsp, 0xffffffffffffff80
jmp 0x1400e3220
Function at 0x140007a70
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 case.default.0x140007a91
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 0x140007abe
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140007ac0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140007b19
test ecx, ecx
jle 0x140007af9
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 0x140007b19
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140007b19
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 0x140007b40
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 0x140007b62
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140007b71
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 0x140007b94
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140007b96
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140007bd2
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 0x140007c6e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140007c0d
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 0x140007c4e
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 0x140007c6e
cmp rbx, rax
ja 0x140007c20
test rbx, rbx
je 0x140007c6e
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 0x1400080a0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14002d010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x1400080cd
xor eax, eax
jmp 0x14000822a
mov rdx, qword [rcx + 0x40]
mov rax, qword [rdx]
test rax, rax
je 0x1400080f8
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
add r8, rax
cmp rax, r8
jae 0x1400080f8
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov byte [rax], dil
mov eax, edi
jmp 0x14000822a
cmp qword [rcx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000821d
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x14000813b
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
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 0x140008166
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 0x140008222
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 0x1400081d5
sub eax, 1
je 0x1400081d5
cmp eax, 2
jne 0x14000821d
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 0x140008222
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140008203
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 0x14000821d
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140008222
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14001f890
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret

Function at 0x140008c50
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
movabs rax, 0xcbf29ce484222325
mov r9d, 0
sub r8, rdx
je 0x140008c84
movabs r10, 0x100000001b3
nop
movzx ecx, byte [r9 + rdx]
inc r9
xor rax, rcx
imul rax, r10
cmp r9, r8
jb 0x140008c70
ret
Function at 0x14000a270
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14002d010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x14000a343
cmp byte [rcx + 0x71], 0
je 0x14000a343
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000a33f
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 0x14000a304
sub eax, 1
je 0x14000a308
cmp eax, 2
jne 0x14000a33f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14001f890
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x14000a336
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 0x14000a33f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000a2ec
xor al, al
jmp 0x14000a2ec
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14001f890
add rsp, 0x60
pop rbx
ret
Function at 0x14001c9e0
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov dword [rcx + 0x74], 0
mov rbx, rcx
mov edi, 0x7fffffff
movsx ecx, byte [rbx + 0x78]
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x14001caac
lea r8d, [rcx - 0x30]
cmp r8d, 0xffffffff
je 0x14001caac
mov r9d, dword [rbx + 0x74]
mov ecx, 0x7fffffff
sub ecx, r8d
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp r9d, edx
jg 0x14001cac5
lea eax, [r9 + r9*4]
dec edi
lea ecx, [r8 + rax*2]
mov rax, qword [rbx]
mov dword [rbx + 0x74], ecx
mov rcx, qword [rbx + 0x10]
cmp rax, rcx
je 0x14001ca9c
cmp byte [rax], 0x5c
jne 0x14001ca96
lea rdx, [rax + 1]
cmp rdx, rcx
je 0x14001ca96
mov r8d, dword [rbx + 0x80]
test r8b, 8
jne 0x14001ca82
movzx ecx, byte [rdx]
sub cl, 0x28
cmp cl, 1
jbe 0x14001ca93
test r8b, 0x10
jne 0x14001ca96
movzx ecx, byte [rdx]
sub cl, 0x7b
test cl, 0xfd
jne 0x14001ca96
mov rax, rdx
inc rax
mov qword [rbx], rax
mov rcx, rbx
call fcn.140017c30
test edi, edi
jne 0x14001ca00
mov rbx, qword [rsp + 0x30]
cmp edi, 0x7fffffff
mov rsi, qword [rsp + 0x38]
setne al
add rsp, 0x20
pop rdi
ret
mov edx, esi
call fcn.140017c20
int3

Function at 0x14001f74c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x14001f7d0
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1400226a0]
cmp byte [rcx + rax], 0
je 0x14001f7d0
dec r8
sub rdx, 1
jne 0x14001f7b6
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x140020344
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14002038e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14002038e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14002038e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14002038e
cmp dword [rcx + 0x84], 0xe
jbe 0x14002038e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140020390
xor al, al
add rsp, 0x28
ret
Function at 0x140001070
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x250
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rbx, r8
lea rcx, [rsp + 0x130]
mov r8d, 0x104
xor edx, edx
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x20]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x140001111
lea r9, [rsp + 0x20]
mov edx, 0x104
lea r8, str._sSettings.ini
lea rcx, [rsp + 0x130]
call fcn.140001010
lea r9, [rsp + 0x130]
mov r8, rbx
lea rdx, str.Executable
lea rcx, str.Settings
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
xor ecx, ecx
test eax, eax
setne cl
mov eax, ecx
jmp 0x140001113
xor eax, eax
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1400025a0
add rsp, 0x250
pop rbx
ret
Function at 0x140001390
Capabilities:
Get file size
Read file on windows

Disassembly:
push rsi
push r14
sub rsp, 0x78
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x60], rax
cmp qword [rcx + 0x18], 0xf
mov r14, rdx
jbe 0x1400013b4
mov rcx, qword [rcx]
mov qword [rsp + 0x30], 0
xor r9d, r9d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov edx, 0x80000000
mov r8d, 1
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
test rax, rax
je 0x140001570
xor edx, edx
mov qword [rsp + 0xa8], rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp eax, 0xffffffff
jne 0x140001417
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140001568
mov qword [rsp + 0xa0], rbx
xorps xmm0, xmm0
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x50], 0
movdqu xmmword [rsp + 0x40], xmm0
test eax, eax
je 0x140001497
cmp rbp, 0x1000
jb 0x14000146f
lea rcx, [rbp + 0x27]
cmp rcx, rbp
jbe 0x140001585
call fcn.1400025c0
mov rcx, rax
test rax, rax
je 0x140001549
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140001477
mov rcx, rbp
call fcn.1400025c0
lea rbx, [rax + rbp]
mov qword [rsp + 0x40], rax
mov r8, rbp
mov qword [rsp + 0x50], rbx
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x48], rbx
mov rdx, qword [rsp + 0x40]
lea r9, [rsp + 0x58]
mov r8d, ebp
mov qword [rsp + 0x20], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000150b
cmp dword [rsp + 0x58], ebp
jne 0x14000150b
lea rax, [rsp + 0x40]
cmp r14, rax
je 0x140001502
mov rax, qword [rsp + 0x40]
mov bl, 1
mov rcx, qword [r14 + 8]
mov r8, qword [r14]
mov qword [r14], rax
mov rax, qword [rsp + 0x48]
mov qword [r14 + 8], rax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x48], rcx
mov rcx, qword [r14 + 0x10]
mov qword [r14 + 0x10], rax
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x50], rcx
jmp 0x14000151b
mov r8, qword [rsp + 0x40]
mov bl, 1
jmp 0x14000151b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, qword [rsp + 0x40]
xor bl, bl
test r8, r8
je 0x140001558
mov rdx, qword [rsp + 0x50]
mov rax, r8
sub rdx, r8
cmp rdx, 0x1000
jb 0x140001550
mov r8, qword [r8 - 8]
add rdx, 0x27
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001550
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r8
call fcn.140002604
mov rdi, qword [rsp + 0x70]
movzx eax, bl
mov rbx, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400025a0
add rsp, 0x78
pop r14
pop rsi
ret
call fcn.1400012f0
int3
Function at 0x140002f20
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002f6a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002f6a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002f6a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002f6a
cmp dword [rcx + 0x84], 0xe
jbe 0x140002f6a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002f6c
xor al, al
add rsp, 0x28
ret
Function at 0x3955d6360
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 0x3955d63d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x39560f204]
mov r12, rcx
test ebx, ebx
jle 0x3955d6500
mov rax, qword [0x39560f208]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x3955d641c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x3955d64a3
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x3955d6400
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rsi, rax
test rax, rax
je 0x3955d6522
mov rax, qword [0x39560f208]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x39560f208]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x3955d6507
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x3955d649c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x3955d64b0
add dword [0x39560f204], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x39560f208]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x3955d649c
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 ebx, ebx
jmp 0x3955d6427
mov rax, qword [0x39560f208]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x3955d67c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x39560f240]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x39560f220]
test rbx, rbx
je 0x3955d6814
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 0x3955d680b
test r12, r12
je 0x3955d680b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x3955d67f0
lea rcx, [0x39560f240]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]