joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b4c78
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x1400e1700]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x1400b4cc2
call fcn.140099e68
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.140099e88
mov dword [rax], reloc.WS2_32.dll_listen
call fcn.140096ff0
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14008e890
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x1400b4ccd
lea eax, [rbx + 1]
jmp 0x1400b4caf
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x1400b4cad
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x1400b4caf
Function at 0x1400b6114
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140099ea8
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400b619e
cmp byte [rbp - 0x21], r15b
je 0x1400b6199
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400b61d4
call fcn.1400a9370
test eax, eax
jne 0x1400b61c0
cmp byte [rbp - 0x21], r15b
je 0x1400b61b8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400b61d4
cmp byte [rbp - 0x21], r15b
je 0x1400b61d1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400a26f8
test eax, eax
jne 0x1400b6274
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140099ea8
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400b6213
cmp byte [rbp - 0x21], r15b
je 0x1400b6248
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400b6248
call fcn.1400a9370
test eax, eax
jne 0x1400b6234
cmp byte [rbp - 0x21], r15b
je 0x1400b622d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400b6248
cmp byte [rbp - 0x21], r15b
je 0x1400b6245
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400a26f8
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400b6274
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400b6277
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400b6285
mov rcx, rdi
call fcn.1400a90c8
cmp byte [rbp + 0x3f], r15b
je 0x1400b6294
mov rcx, qword [rbp + 0x27]
call fcn.1400a90c8
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x404c40
Capabilities:
Get disk information

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x460
mov rdi, rdx
mov edx, 0x104
lea rax, [rsp + 0x250]
mov dword [rsp + 0x38], edx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x4a0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r9
mov r9, r8
mov r8d, edx
xor esi, esi
lea rdx, [rsp + 0x40]
mov word [rsp + 0x40], si
mov word [rsp + 0x250], si
call qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
lea rdx, [rsp + 0x40]
mov rcx, rdi
mov ebx, eax
call fcn.00402a44
mov rcx, qword [rsp + 0x4a8]
lea rdx, [rsp + 0x250]
call fcn.00402a44
cmp ebx, esi
setne al
add rsp, 0x460
pop rdi
pop rsi
pop rbx
ret

Function at 0x404cd4
Capabilities:
Get disk size

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x60
mov r12, rcx
lea rcx, [0x00498ba8]
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 0x404d3a
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 0x404d8c
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x34]
imul rcx, rax
test bpl, bpl
mov qword [rbx], rcx
jne 0x404d8a
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 0x404f08
Capabilities:
Connect network resource

Disassembly:
sub rsp, 0x58
mov r11, rdx
lea rdx, [rsp + 0x20]
mov r10, r8
call fcn.00404e70
lea rcx, [rsp + 0x20]
mov r8, r10
mov rdx, r11
call sub.MPR.dll_WNetAddConnection2W
add rsp, 0x58
ret
Function at 0x4051fc
Capabilities:
Get user security identifier

Disassembly:
push rbx
push rbp
push rsi
push rdi
mov r11, rsp
sub rsp, 0x48
lea rax, [r11 + 0x40]
mov rsi, rcx
mov rdx, rcx
mov qword [r11 - 0x18], rax
lea rax, [r11 + 0x30]
lea r9, [r11 + 0x38]
mov qword [r11 - 0x20], rax
xor r8d, r8d
xor ecx, ecx
mov dword [r11 + 0x38], 0
mov dword [rsp + 0x78], 0
mov qword [r11 - 0x28], 0
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x4052f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4052f0
mov ebx, dword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edi, 8
mov r8, rbx
mov edx, edi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, dword [rsp + 0x78]
inc ebx
mov rbp, rax
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
mov edx, edi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
lea r9, [rsp + 0x80]
mov r8, rbp
mov rdi, rax
lea rax, [rsp + 0x88]
mov rdx, rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x78]
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x4052f0
mov rax, rbp
jmp 0x4052f2
xor eax, eax
add rsp, 0x48
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x4052fc
Capabilities:
Get session user name
Manipulate user privileges

Disassembly:
push rbx
push rbp
push rsi
push rdi
mov rax, rsp
sub rsp, 0x378
xor ebp, ebp
lea r9, [rax + 0x30]
lea rdx, [rsp + 0x30]
mov r8d, 0xf0fff
xor ecx, ecx
mov dword [rsp + 0x30], 0x30
mov qword [rax + 0x30], rbp
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], rbp
mov dword [rsp + 0x48], ebp
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rbp
call sub.ADVAPI32.dll_LsaOpenPolicy
cmp eax, ebp
je 0x405358
mov rcx, qword [rsp + 0x3a8]
jmp 0x4053f0
lea rcx, [rsp + 0x60]
lea rdx, [0x00498c28]
mov r8d, 0x2c
call sub.msvcrt.dll_memcpy
lea rcx, [rsp + 0x8c]
xor edx, edx
mov r8d, 0xd4
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x60]
call qword [sym.imp.msvcrt.dll_wcslen]
lea rdx, [rsp + 0x3a0]
lea rcx, [rsp + 0x160]
add ax, ax
mov dword [rsp + 0x3a0], 0x100
mov word [rsp + 0x20], ax
add ax, 2
mov word [rsp + 0x22], ax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
cmp eax, ebp
je 0x40534b
lea rcx, [rsp + 0x160]
call fcn.004051fc
mov rcx, qword [rsp + 0x3a8]
cmp rax, rbp
mov rbx, rax
jne 0x4053fe
cmp rcx, rbp
je 0x4053fa
call sub.ADVAPI32.dll_LsaClose
xor al, al
jmp 0x405445
mov esi, 1
lea r8, [rsp + 0x20]
mov rdx, rax
mov r9d, esi
call sub.ADVAPI32.dll_LsaAddAccountRights
movzx edi, bpl
cmp eax, ebp
cmove edi, esi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x3a8]
cmp rcx, rbp
je 0x405442
call sub.ADVAPI32.dll_LsaClose
mov al, dil
add rsp, 0x378
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x4054a8
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x28
mov rdi, rdx
call qword [sym.imp.USER32.dll_OpenClipboard]
xor ebx, ebx
cmp eax, ebx
setne al
cmp al, bl
mov byte [rsp + 0x60], al
je 0x40555f
call qword [sym.imp.USER32.dll_EmptyClipboard]
cmp eax, ebx
je 0x40555f
mov esi, dword [rdi + 8]
mov rbp, qword [rdi]
lea rcx, [rsp + 0x68]
inc esi
mov edx, 0x2002
mov qword [rsp + 0x68], rbx
add rsi, rsi
mov r8, rsi
call fcn.0040ae08
cmp al, bl
jne 0x405508
lea rcx, [rsp + 0x68]
jmp 0x40554c
mov rdi, qword [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalLock]
cmp rax, rbx
je 0x405501
mov r8, rsi
mov rdx, rbp
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rdx, qword [rsp + 0x68]
mov ecx, InitCommonControls
call qword [sym.imp.USER32.dll_SetClipboardData]
lea rcx, [rsp + 0x68]
cmp rax, rbx
jne 0x405553
call fcn.0040ae30
jmp 0x40555f
mov qword [rsp + 0x68], rbx
call fcn.0040ae30
mov bl, 1
lea rcx, [rsp + 0x60]
call fcn.00405478
mov al, bl
add rsp, 0x28
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x405ae4
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x250
mov rbx, rcx
lea rcx, [rsp + 0x20]
xor edi, edi
mov edx, 0x114
mov word [rsp + 0x20], di
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, [rsp + 0x20]
mov rcx, rbx
mov esi, eax
call fcn.00402a44
cmp esi, edi
je 0x405b29
cmp esi, 0x114
jae 0x405b29
mov edi, 1
mov al, dil
add rsp, 0x250
pop rdi
pop rsi
pop rbx
ret

Function at 0x405d08
Capabilities:
Set file attributes

Disassembly:
test edx, 0xf0000000
je 0x405d16
and edx, 0x3fff
jmp fcn.00405c60

Function at 0x405d1c
Capabilities:
Delete directory

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a3a4
mov ebx, eax
cmp eax, 1
je 0x405d4c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x405d4c
mov al, 1
jmp 0x405d9d
test ebx, ebx
je 0x405d9b
lea rcx, [rsp + 0x28]
call fcn.00402830
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040aa70
test al, al
je 0x405d91
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 0x405d9d
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret
Function at 0x405dc4
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.0040a3a4
mov esi, eax
mov rcx, rbp
call fcn.0040a3a4
mov edi, eax
mov ebx, 1
cmp esi, ebx
je 0x405e13
cmp eax, ebx
je 0x405e13
mov rdx, rbp
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x405e13
mov al, bl
jmp 0x405ea1
test esi, esi
jne 0x405e1f
test edi, edi
je 0x405e9f
lea rcx, [rsp + 0x48]
call fcn.00402830
nop
lea rcx, [rsp + 0x38]
call fcn.00402830
nop
cmp esi, ebx
je 0x405e3d
cmp edi, ebx
jne 0x405e3f
xor bl, bl
mov byte [rsp + 0x20], bl
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x48]
mov rdx, rbp
mov rcx, r12
call fcn.0040aab8
test al, al
je 0x405e8a
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 0x405ea1
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 0x406044
Capabilities:
Create directory

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a3a4
mov ebx, eax
cmp eax, 1
je 0x406083
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406076
mov al, 1
jmp 0x4060d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4060d4
test ebx, ebx
je 0x4060d4
lea rcx, [rsp + 0x28]
call fcn.00402830
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040aa70
test al, al
je 0x4060ca
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 0x4060d6
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x406108
Capabilities:
Delete file

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rbx, rcx
call fcn.0040745c
cmp eax, 0xffffffff
je 0x40613e
test al, 0x10
jne 0x40613e
test al, 1
je 0x40613e
and eax, 0xfffffffe
mov edx, eax
mov rcx, rbx
call fcn.00405c60
test al, al
je 0x4061af
mov rcx, rbx
call fcn.0040a3a4
mov edi, eax
cmp eax, 1
je 0x40615e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40615e
mov al, 1
jmp 0x4061af
test edi, edi
je 0x4061ad
lea rcx, [rsp + 0x28]
call fcn.00402830
nop
cmp edi, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rbx
call fcn.0040aa70
test al, al
je 0x4061a3
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 0x4061af
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret
Function at 0x4061e0
Capabilities:
Get common file path

Disassembly:
push rbx
push rdi
sub rsp, 0x278
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rdi, rcx
mov dword [rcx + 8], 0
mov rax, qword [rcx]
mov word [rax], 0
mov word [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
mov ecx, 0x114
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ebx, eax
test eax, eax
je 0x4062e2
cmp ebx, 0x114
jae 0x40624c
mov word [rsp + 0x268], 0
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.00402a44
mov al, 1
jmp 0x4062e2
lea rcx, [rsp + 0x20]
call fcn.00402830
nop
cmp ebx, dword [rsp + 0x2c]
jbe 0x406269
mov edx, ebx
lea rcx, [rsp + 0x20]
call fcn.004024bc
mov rdx, qword [rsp + 0x20]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov r11d, eax
test eax, eax
jne 0x40628b
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
xor al, al
jmp 0x4062e2
mov rcx, qword [rsp + 0x20]
mov word [rcx + rbx*2], 0
xor eax, eax
cmp word [rcx], ax
je 0x4062a9
inc eax
add rcx, 2
cmp word [rcx], 0
jne 0x40629d
mov dword [rsp + 0x28], eax
cmp eax, r11d
jne 0x4062d6
lea eax, [rbx - 1]
cmp eax, r11d
jne 0x4062d6
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.00402aac
nop
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
mov al, 1
jmp 0x4062e2
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x278
pop rdi
pop rbx
ret

Function at 0x4063d4
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x250
mov rbx, rcx
lea rdx, [rsp + 0x20]
xor edi, edi
mov ecx, 0x114
mov word [rsp + 0x20], di
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rdx, [rsp + 0x20]
mov rcx, rbx
mov esi, eax
call fcn.00402a44
mov rcx, rbx
call fcn.00409c04
cmp esi, edi
je 0x406421
cmp esi, 0x114
jae 0x406421
mov edi, 1
mov al, dil
add rsp, 0x250
pop rdi
pop rsi
pop rbx
ret
Function at 0x406430
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, 0x58
mov qword [rsp + 0x20], 0xfffffffffffffffe
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
mov ebx, edi
lea r15d, [rdi + 1]
mov dword [rsi + 8], edi
mov rcx, qword [rsi]
mov byte [rcx], dil
cmp r12b, dil
je 0x4064f8
mov r10d, r13d
mov r9, rdi
mov r11d, 8
mov r8d, r10d
and r8d, 0xf
shr r10d, 4
lea edx, [r8 + 0x30]
lea eax, [r8 + 0x37]
movzx ecx, al
movzx eax, dl
cmp r8d, 0xa
cmovb ecx, eax
mov byte [rsp + r9 + 0x38], cl
add r9, r15
sub r11, r15
jne 0x40649c
mov byte [rsp + r9 + 0x38], dil
cmp rbp, rdi
je 0x4064db
mov rcx, rsi
call fcn.00403088
lea rdx, [rsp + 0x38]
mov rcx, rsi
call fcn.0040230c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 2
cmove eax, r15d
add r13d, eax
mov r12b, r15b
cmp rbp, rdi
je 0x40650f
lea rdx, str..tmp
mov rcx, rsi
call fcn.0040230c
mov rdx, r14
lea rcx, [rsp + 0x28]
call fcn.004028cc
nop
mov rdx, qword [rsi]
lea rcx, [rsp + 0x28]
call fcn.00402d04
mov rcx, qword [rsp + 0x28]
call fcn.00408160
cmp al, dil
je 0x406551
mov ecx, 0xb7
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
jmp 0x406598
cmp rbp, rdi
je 0x40656d
xor r8d, r8d
mov rdx, qword [rsp + 0x28]
mov rcx, rbp
call fcn.00408f2c
cmp al, dil
jne 0x4065a6
jmp 0x40657c
mov rcx, qword [rsp + 0x28]
call fcn.00406044
cmp al, dil
jne 0x4065b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x40658e
cmp eax, 0xb7
jne 0x4065c4
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
add ebx, r15d
cmp ebx, 0x64
jb 0x406482
jmp 0x4065ce
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, r15b
jmp 0x4065d9
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, r15b
jmp 0x4065d9
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov dword [rsi + 8], edi
mov rax, qword [rsi]
mov byte [rax], dil
xor al, al
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x40745c
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.0040a3a4
mov ebx, eax
cmp eax, 1
je 0x407489
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4074da
test ebx, ebx
je 0x4074d5
lea rcx, [rsp + 0x28]
call fcn.00402830
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040aa70
test al, al
je 0x4074cb
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 0x4074da
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov eax, 0xffffffff
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x4082a0
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 rbp, rcx
movsxd rbx, dword [rcx + 8]
mov rdi, rbx
test ebx, ebx
je 0x4082f0
shl rdi, 3
add ebx, 0xffffffff
sub rdi, 8
mov rax, qword [rbp]
mov rsi, qword [rdi + rax]
test rsi, rsi
je 0x4082ec
mov rcx, qword [rsi]
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_free
test ebx, ebx
jne 0x4082c8
mov dword [rbp + 8], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov edi, eax
test eax, eax
je 0x4083f5
mov rcx, rdi
xor ebx, ebx
mov qword [rsp + 0x80], rbx
test eax, eax
je 0x40832f
add rcx, rcx
call fcn.00403660
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 0x4083eb
cmp eax, edi
ja 0x4083eb
lea rcx, [rsp + 0x28]
call fcn.00402830
nop
xor r13d, r13d
xor edi, edi
test esi, esi
je 0x4083cc
mov r12, rbx
cmp word [r12], 0
jne 0x4083c2
lea rdx, [rbx + r13*2]
lea rcx, [rsp + 0x28]
call fcn.00402a44
lea r13d, [rdi + 1]
mov rcx, rbp
call fcn.00431370
mov ecx, InitCommonControls
call fcn.00403660
mov qword [rsp + 0x88], rax
test rax, rax
je 0x4083ae
lea rdx, [rsp + 0x28]
mov rcx, rax
call fcn.004029bc
mov r11, rax
jmp 0x4083b1
xor r11d, r11d
mov ecx, dword [rbp + 8]
lea eax, [rcx + 1]
mov dword [rbp + 8], eax
mov rax, qword [rbp]
mov qword [rax + rcx*8], r11
inc edi
add r12, 2
cmp edi, esi
jb 0x408363
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 0x4083f5
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 0x4084c4
Capabilities:
Get file size

Disassembly:
push rbx
push rdi
sub rsp, 0x28
cmp byte [rcx + 9], 0
mov rbx, rdx
je 0x4084e3
cmp byte [rcx + 0xa], 0
je 0x4084e3
mov rax, qword [rcx + 0x10]
mov qword [rdx], rax
jmp 0x40851f
mov rcx, qword [rcx]
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov edi, eax
jne 0x40850e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40850e
xor al, al
jmp 0x408521
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 0x408644
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 0x408680
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x400000
cmp r8d, eax
cmova r8d, eax
jmp fcn.00408644

Function at 0x4087b4
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov rcx, qword [rcx]
mov eax, 0x400000
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 0x4088c8
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.00408584
xor ebx, ebx
cmp al, bl
je 0x4088f0
cmp qword [rsp + 0x50], rdi
je 0x4088f4
xor al, al
jmp 0x408902
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