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

Disassembly:
jmp 0x14001f470
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x1e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x188]
mov rax, qword [0x14003a2c8]
xor rax, rbp
mov qword [rbp + 0x120], rax
lea rcx, [0x140043226]
call fcn.140011c58
mov edx, 8
lea rcx, [rbp + 8]
call fcn.1400113ca
mov rdx, qword [rbp + 0x158]
lea rcx, [rbp + 0x108]
call fcn.14001164a
mov qword [rbp + 0x118], rax
mov rdx, qword [rbp + 0x118]
lea rcx, [rbp + 8]
call fcn.1400112df
nop
lea rcx, [rbp + 0x108]
call fcn.14001152d
lea rax, [0x140011870]
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x150]
add rax, 8
mov qword [rbp + 0x118], rax
lea rcx, [rbp + 8]
call fcn.1400118a7
mov rcx, qword [rbp + 0x118]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0
mov r9, rax
mov r8, qword [rbp + 0x28]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__beginthreadex]
mov rcx, qword [rbp + 0x150]
mov qword [rcx], rax
mov rax, qword [rbp + 0x150]
cmp qword [rax], 0
je 0x14001f570
lea rcx, [rbp + 8]
call fcn.14001155f
jmp 0x14001f589
mov rax, qword [rbp + 0x150]
mov dword [rax + 8], 0
mov ecx, 6
call fcn.140011302
nop
lea rcx, [rbp + 8]
call fcn.14001152d
lea rcx, [rbp - 0x30]
lea rdx, [0x1400332e0]
call fcn.140011a50
mov rcx, qword [rbp + 0x120]
xor rcx, rbp
call fcn.140011622
lea rsp, [rbp + 0x138]
pop rdi
pop rbp
ret

Function at 0x14001173a
Capabilities:
Terminate process

Disassembly:
jmp 0x140028360
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x1400118cf
Capabilities:
Parse pe header

Disassembly:
jmp 0x140029040
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140029060
xor al, al
jmp 0x1400290e1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140029073
xor al, al
jmp 0x1400290e1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14002909d
xor al, al
jmp 0x1400290e1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400290b1
xor al, al
jmp 0x1400290e1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x1400290c3
xor al, al
jmp 0x1400290e1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x1400290df
xor al, al
jmp 0x1400290e1
mov al, 1
add rsp, 0x38
ret
Function at 0x140011c2b
Capabilities:
Write file on windows

Disassembly:
jmp 0x140018bb0
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x1e8
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x3e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x208]
mov rax, qword [0x14003a2c8]
xor rax, rbp
mov qword [rbp + 0x1a0], rax
lea rcx, [0x1400430f6]
call fcn.140011c58
mov rax, qword [rbp + 0x1d0]
cmp qword [rax + 0x68], 0
je 0x140018c16
mov rax, qword [rbp + 0x1d0]
movzx eax, byte [rax + 0x71]
test eax, eax
jne 0x140018c1d
mov al, 1
jmp 0x140018d77
call fcn.140011389
mov rcx, qword [rbp + 0x1d0]
mov rcx, qword [rcx]
mov qword [rbp + 0x198], rcx
mov edx, eax
mov rcx, qword [rbp + 0x1d0]
mov rax, qword [rbp + 0x198]
call qword [rax + 0x18]
mov dword [rbp + 0x164], eax
call fcn.140011389
mov dword [rbp + 0x184], eax
lea rdx, [rbp + 0x164]
lea rcx, [rbp + 0x184]
call fcn.140011a6e
movzx eax, al
test eax, eax
je 0x140018c78
xor al, al
jmp 0x140018d77
mov qword [rbp + 8], 0x20
lea rax, [rbp + 0x48]
mov rcx, qword [rbp + 0x1d0]
add rcx, 0x74
lea rdx, [rbp + 0x68]
mov qword [rsp + 0x20], rdx
mov r9, rax
lea r8, [rbp + 0x28]
mov rdx, rcx
mov rax, qword [rbp + 0x1d0]
mov rcx, qword [rax + 0x68]
call qword [sym.imp.MSVCP140D.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
mov dword [rbp + 0x194], eax
cmp dword [rbp + 0x194], 0
je 0x140018cdd
cmp dword [rbp + 0x194], 1
je 0x140018ce8
cmp dword [rbp + 0x194], 3
je 0x140018d66
jmp 0x140018d75
mov rax, qword [rbp + 0x1d0]
mov byte [rax + 0x71], 0
lea rax, [rbp + 0x28]
mov rcx, qword [rbp + 0x68]
sub rcx, rax
mov rax, rcx
mov qword [rbp + 0x88], rax
cmp qword [rbp + 0x88], 0
jbe 0x140018d38
mov rax, qword [rbp + 0x1d0]
mov r9, qword [rax + 0x80]
mov r8, qword [rbp + 0x88]
mov edx, 1
lea rcx, [rbp + 0x28]
call qword [sym.imp.ucrtbased.dll_fwrite]
cmp qword [rbp + 0x88], rax
je 0x140018d38
xor al, al
jmp 0x140018d77
mov rax, qword [rbp + 0x1d0]
movzx eax, byte [rax + 0x71]
test eax, eax
jne 0x140018d53
mov dword [rbp + 0x194], 1
jmp 0x140018d5d
mov dword [rbp + 0x194], 0
movzx eax, byte [rbp + 0x194]
jmp 0x140018d77
mov rax, qword [rbp + 0x1d0]
mov byte [rax + 0x71], 0
mov al, 1
jmp 0x140018d77
xor al, al
mov rdi, rax
lea rcx, [rbp - 0x30]
lea rdx, [0x140031800]
call fcn.140011a50
mov rax, rdi
mov rcx, qword [rbp + 0x1a0]
xor rcx, rbp
call fcn.140011622
lea rsp, [rbp + 0x1b8]
pop rdi
pop rbp
ret
Function at 0x3978a1402
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
lea rax, str.C:WindowsTasksgo_muksgievimage02.png
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
lea rdx, [0x3978a4029]
mov rcx, rax
call sub.msvcrt.dll_fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x3978a143d
mov eax, 1
jmp 0x3978a15bd
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_ftell
mov dword [rbp - 0x14], eax
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_fclose
mov rax, qword [rbp - 8]
lea rdx, [0x3978a4029]
mov rcx, rax
call sub.msvcrt.dll_fopen
mov qword [rbp - 0x10], rax
mov eax, dword [rbp - 0x14]
cdqe
mov rcx, rax
call sub.msvcrt.dll_malloc
mov qword [rbp - 0x20], rax
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sub.msvcrt.dll_fread
mov dword [rbp - 0x24], eax
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_fclose
mov dword [rbp - 0x3e], 0x6c6c6568
mov word [rbp - 0x3a], 0x6f
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
lea rcx, [rbp - 0x3e]
mov rax, qword [rbp - 0x20]
mov r9d, 6
mov r8, rcx
mov rcx, rax
call fcn.3978a1370
mov eax, dword [rbp - 0x14]
cdqe
mov r9d, 4
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 0x30], rax
mov ecx, 0xfffffff6
mov rax, qword [sym.imp.KERNEL32.dll_GetStdHandle]
call rax
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x44], 0
lea rdx, [rbp - 0x44]
mov rax, qword [rbp - 0x38]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetConsoleMode]
call rax
mov eax, dword [rbp - 0x14]
movsxd rcx, eax
mov rdx, qword [rbp - 0x20]
mov rax, qword [rbp - 0x30]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov eax, dword [rbp - 0x44]
and eax, 0xfffffffb
mov edx, eax
mov rax, qword [rbp - 0x38]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetConsoleMode]
call rax
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
lea rcx, [rbp - 0x48]
mov rax, qword [rbp - 0x30]
mov r9, rcx
mov r8d, 0x20
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
mov eax, dword [rbp - 0x44]
and eax, 0xfffffffb
mov edx, eax
mov rax, qword [rbp - 0x38]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetConsoleMode]
call rax
mov rax, qword [rbp - 0x30]
call rax
mov eax, 0
add rsp, 0x70
pop rbp
ret
Function at 0x3978a15dd
Capabilities:
Check mutex on windows
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
lea r8, str.GlobalMyUniqueMutexName
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateMutexA]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x3978a1636
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
je 0x3978a1626
call fcn.3978a1402
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
lea rax, str.C:WindowsSystem32CRYPTBASE.dll
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
mov rcx, rax
lea rax, str.SystemFunction036
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp - 0x10], rax
mov edx, dword [rbp + 0x18]
mov rax, qword [rbp + 0x10]
mov r8, qword [rbp - 0x10]
mov rcx, rax
call r8
mov dword [rbp - 0x14], eax
mov eax, dword [rbp - 0x14]
add rsp, 0x40
pop rbp
ret

Function at 0x3978a1820
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 fcn.3978a2430
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 fcn.3978a2430
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x3978a1890
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x3978a7064]
mov rbx, rcx
test esi, esi
jle 0x3978a19c0
mov rax, qword [0x3978a7068]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x3978a18db
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x3978a1965
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x3978a18c0
mov rcx, rbx
call fcn.3978a20f0
mov rdi, rax
test rax, rax
je 0x3978a19e2
mov rax, qword [0x3978a7068]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.3978a2230
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x3978a7068]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x3978a19c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x3978a195e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x3978a1970
add dword [0x3978a7064], 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 [0x3978a7068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x3978a195e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.3978a1820
nop dword [rax]
xor esi, esi
jmp 0x3978a18e8
mov rax, qword [0x3978a7068]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.3978a1820
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.3978a1820
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x3978a1d60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x3978a70a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x3978a7080]
test rbx, rbx
je 0x3978a1dbc
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 eax, eax
jne 0x3978a1db3
test rsi, rsi
je 0x3978a1db3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x3978a1d98
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x3978a20f0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x3978a4290]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x3978a2110
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x3978a2118
ret
cmp word [r8 + 0x18], 0x20b
jne 0x3978a2110
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x3978a216d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x3978a2164
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x3978a2110
add rax, 0x28
cmp rax, r9
jne 0x3978a2150
xor eax, eax
ret

Function at 0x3978a2170
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3978a4290]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x3978a218f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x3978a2198
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x3978a218f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x3978a2230
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3978a4290]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x3978a224f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x3978a2258
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x406e08
Capabilities:
Set current directory

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor ecx, ecx
cmp eax, ecx
setne al
add rsp, 0x28
ret

Function at 0x406ee8
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x230
mov rax, qword [rcx]
xor esi, esi
mov rdi, rcx
mov dword [rcx + 8], esi
lea rdx, [rsp + 0x20]
mov ecx, 0x105
mov word [rax], si
mov word [rsp + 0x20], si
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rdx, [rsp + 0x20]
mov rcx, rdi
mov ebx, eax
call fcn.00403418
lea r11d, [rbx - 1]
cmp r11d, 0x103
setbe al
add rsp, 0x230
pop rdi
pop rsi
pop rbx
ret

Function at 0x406f40
Capabilities:
Check for time delay via gettickcount

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov rbp, r9
mov rsi, r8
mov r12b, dl
mov r14, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
shl ebx, 2
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
xor edi, ebx
shl edi, 0xc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r13d, eax
xor r13d, edi
xor edi, edi
lea r15d, [rdi + 1]
mov ebx, edi
mov rdx, r14
mov rcx, rsi
call fcn.00403418
cmp r12b, dil
je 0x407023
mov r10d, r13d
mov r9, rdi
mov r11d, 8
mov r8d, r10d
shr r10d, 4
and r8d, 0xf
cmp r8d, 0xa
lea eax, [r8 + 0x37]
lea edx, [r8 + 0x30]
movzx ecx, al
movzx eax, dl
cmovb ecx, eax
mov byte [rsp + r9 + 0x20], cl
add r9, r15
sub r11, r15
jne 0x406fa9
cmp rbp, rdi
mov byte [rsp + r9 + 0x20], dil
je 0x407006
mov eax, dword [rsi + 8]
cmp dword [rsi + 0xc], eax
jne 0x406ff0
mov rcx, rsi
call fcn.00403068
mov edx, dword [rsi + 8]
mov rcx, qword [rsi]
mov word [rcx + rdx*2], 0x2e
add edx, r15d
mov word [rcx + rdx*2], di
mov dword [rsi + 8], edx
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.004036ec
call qword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 2
cmove eax, r15d
add r13d, eax
cmp rbp, rdi
mov r12b, r15b
je 0x40703a
lea rdx, str..tmp
mov rcx, rsi
call fcn.004036ec
mov rcx, qword [rsi]
int3
Function at 0x40880c
Capabilities:
Get disk information

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov r12, rcx
movsxd rbx, dword [rcx + 8]
mov rdi, rbx
test ebx, ebx
je 0x40885c
shl rdi, 3
add ebx, 0xffffffff
sub rdi, 8
mov rax, qword [r12]
mov rsi, qword [rdi + rax]
test rsi, rsi
je 0x408858
mov rcx, qword [rsi]
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_free
test ebx, ebx
jne 0x408834
mov dword [r12 + 8], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov edi, eax
test eax, eax
je 0x408950
mov rcx, rdi
xor ebx, ebx
mov qword [rsp + 0x80], rbx
test eax, eax
je 0x40889d
add rcx, rcx
call fcn.004021ac
mov rbx, rax
mov qword [rsp + 0x80], rax
mov rdx, rbx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov esi, eax
test eax, eax
je 0x408946
cmp eax, edi
ja 0x408946
lea rcx, [rsp + 0x28]
call fcn.00403284
nop
xor r13d, r13d
xor edi, edi
test esi, esi
je 0x408927
mov rbp, rbx
cmp word [rbp], 0
jne 0x40891d
lea rdx, [rbx + r13*2]
lea rcx, [rsp + 0x28]
call fcn.00403418
lea r13d, [rdi + 1]
mov ecx, 0x10
call fcn.004021ac
mov qword [rsp + 0x88], rax
test rax, rax
je 0x408910
lea rdx, [rsp + 0x28]
mov rcx, rax
call fcn.00403390
jmp 0x408912
xor eax, eax
mov rdx, rax
mov rcx, r12
int3
inc edi
add rbp, 2
cmp edi, esi
jb 0x4088d1
cmp r13d, esi
sete dil
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
nop
mov rcx, rbx
call sub.msvcrt.dll_free
mov al, dil
jmp 0x408950
mov rcx, rbx
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x4089f4
Capabilities:
Get file size

Disassembly:
push rbx
push rdi
sub rsp, 0x28
cmp byte [rcx + 8], 0
mov rbx, rdx
je 0x408a13
cmp byte [rcx + 9], 0
je 0x408a13
mov rax, qword [rcx + 0x10]
mov qword [rdx], rax
jmp 0x408a47
mov rcx, qword [rcx]
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov edi, eax
jne 0x408a36
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x408a36
xor al, al
jmp 0x408a49
mov ecx, dword [rsp + 0x40]
mov rax, rdi
shl rcx, 0x20
add rcx, rdi
mov qword [rbx], rcx
mov al, 1
add rsp, 0x28
pop rdi
pop rbx
ret

Function at 0x408ae4
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov rcx, qword [rcx]
mov rbx, r9
lea r9, [rsp + 0x58]
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x58]
test eax, eax
setne al
mov dword [rbx], ecx
add rsp, 0x30
pop rbx
ret

Function at 0x408b20
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x0046c070]
cmp r8d, eax
cmova r8d, eax
jmp fcn.00408ae4

Function at 0x408be0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x0046c070]
mov rcx, qword [rcx]
mov rbx, r9
cmp r8d, eax
lea r9, [rsp + 0x50]
mov dword [rsp + 0x50], 0
cmova r8d, eax
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [rsp + 0x50]
test eax, eax
mov dword [rbx], ecx
setne al
add rsp, 0x30
pop rbx
ret
Function at 0x408c88
Capabilities:
Clear file content

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x20
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdi, rdx
mov rsi, rcx
call fcn.00408a50
xor ebx, ebx
cmp al, bl
je 0x408cb0
cmp qword [rsp + 0x50], rdi
je 0x408cb4
xor al, al
jmp 0x408cc2
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, ebx
setne al
add rsp, 0x20
pop rdi
pop rsi
pop rbx
ret

Function at 0x409f78
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x230
mov rax, qword [rcx]
xor esi, esi
mov rdi, rcx
mov dword [rcx + 8], esi
lea rdx, [rsp + 0x20]
mov ecx, 0x105
mov word [rax], si
mov word [rsp + 0x20], si
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rdx, [rsp + 0x20]
mov rcx, rdi
mov ebx, eax
call fcn.00403418
lea r11d, [rbx - 1]
cmp r11d, 0x103
setbe al
add rsp, 0x230
pop rdi
pop rsi
pop rbx
ret

Function at 0x40b448
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rsi
push rdi
mov r11, rsp
sub rsp, 0x40
mov rax, qword [r8]
mov dword [r8 + 8], 0
mov rsi, rcx
mov word [rax], 0
mov rcx, qword [rcx]
lea rax, [r11 + 0x30]
mov rbx, r8
mov qword [r11 - 0x18], rax
lea r9, [r11 - 0x10]
xor r8d, r8d
mov qword [r11 - 0x20], 0
mov rdi, rdx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x70], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40b4a7
cmp eax, 0xea
jne 0x40b51d
mov edx, dword [rsp + 0x70]
cmp edx, dword [rbx + 0xc]
mov dword [rsp + 0x78], edx
jbe 0x40b4bc
mov rcx, rbx
call fcn.00402fe0
mov rax, qword [rbx]
lea rcx, [rsp + 0x78]
lea r9, [rsp + 0x34]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsi]
xor r8d, r8d
mov rdx, rdi
mov dword [rsp + 0x34], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [rsp + 0x70]
mov rdx, qword [rbx]
cmp ecx, dword [rsp + 0x78]
cmova ecx, dword [rsp + 0x78]
mov dword [rsp + 0x70], ecx
shr rcx, 1
mov word [rdx + rcx*2], 0
xor ecx, ecx
cmp word [rdx], cx
je 0x40b51a
add rdx, 2
inc ecx
cmp word [rdx], 0
jne 0x40b50e
mov dword [rbx + 8], ecx
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret

Function at 0x40b5cc
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x68
lea rcx, [rsp + 0x20]
call fcn.0040b5a4
xor r8d, r8d
cmp eax, r8d
je 0x40b60b
cmp qword [rsp + 0x20], r8
je 0x40b60b
mov rcx, r8
lea eax, [r8 + 0x40]
mov rdx, qword [rsp + 0x20]
shr rdx, cl
inc rcx
and edx, 1
add r8d, edx
dec rax
jne 0x40b5f0
mov eax, r8d
jmp 0x40b61a
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x50]
add rsp, 0x68
ret

Function at 0x40b620
Capabilities:
Get memory capacity

Disassembly:
push rbx
sub rsp, 0x60
movabs rax, 0x100000000
mov rbx, rcx
mov dword [rsp + 0x20], 0x40
mov qword [rcx], rax
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x40b662
mov rax, qword [rsp + 0x28]
cmp qword [rsp + 0x48], rax
cmovb rax, qword [rsp + 0x48]
mov qword [rbx], rax
mov al, 1
add rsp, 0x60
pop rbx
ret