joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140093190
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, r8
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rax, rdx
mov dword [rsp + 0x30], r8d
lea rdx, [rcx + 0x30]
mov qword [rsp + 0x20], r8
mov rcx, rax
mov r8d, 8
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x1400931ed
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret
mov eax, dword [rsp + 0x30]
sub dword [rbx], eax
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret

Function at 0x140093210
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov rax, rdx
mov qword [rsp + 0x20], 0
lea rdx, [rcx + 0x30]
mov r9, r8
mov rcx, rax
mov r8d, 8
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x140093245
add rsp, 0x38
jmp qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
xor eax, eax
add rsp, 0x38
ret

Function at 0x140093a20
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x40], rax
cmp dword [r8], 6
mov rbx, r8
mov rsi, rdx
mov rdi, rcx
jae 0x140093a4d
mov eax, 0x452
jmp 0x140093abf
xor eax, eax
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x30], eax
mov rcx, rsi
mov qword [rsp + 0x20], rax
lea r8d, [rax + 6]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x140093a7f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
je 0x140093a85
jmp 0x140093abf
mov eax, dword [rsp + 0x30]
sub dword [rbx], eax
mov edx, dword [rsp + 0x34]
cmp dx, 0xc
je 0x140093a96
mov eax, 0xd
jmp 0x140093abf
mov ecx, dword [rbx]
mov eax, dword [rsp + 0x36]
add rcx, 6
cmp rax, rcx
ja 0x140093a8f
movzx eax, word [rsp + 0x38]
mov r8, rbx
mov dword [rdi + 0x12], edx
mov rcx, rdi
mov rdx, rsi
mov word [rdi + 0x16], ax
call fcn.140092320
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x50
pop rdi
pop rsi
pop rbx
ret

Function at 0x140093bd0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov rax, rdx
mov qword [rsp + 0x20], 0
lea rdx, [rcx + 0x30]
mov r9, r8
mov rcx, rax
mov r8d, 8
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x140093c05
add rsp, 0x38
jmp qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
xor eax, eax
add rsp, 0x38
ret
Function at 0x140093c10
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, r8
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rax, rdx
mov dword [rsp + 0x30], r8d
lea rdx, [rcx + 0x30]
mov qword [rsp + 0x20], r8
mov rcx, rax
mov r8d, 8
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x140093c6d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret
mov eax, dword [rsp + 0x30]
sub dword [rbx], eax
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret

Function at 0x140094220
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov rax, rdx
mov qword [rsp + 0x20], 0
lea rdx, [rcx + 0x30]
mov r9, r8
mov rcx, rax
mov r8d, 0x10
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x140094255
add rsp, 0x38
jmp qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
xor eax, eax
add rsp, 0x38
ret

Function at 0x140094260
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, r8
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rax, rdx
mov dword [rsp + 0x30], r8d
lea rdx, [rcx + 0x30]
mov qword [rsp + 0x20], r8
mov rcx, rax
mov r8d, 0x10
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x1400942bd
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret
mov eax, dword [rsp + 0x30]
sub dword [rbx], eax
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret

Function at 0x140094900
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, r8
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rax, rdx
mov dword [rsp + 0x30], r8d
lea rdx, [rcx + 0x30]
mov qword [rsp + 0x20], r8
mov rcx, rax
mov r8d, 0x10
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x14009495d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret
mov eax, dword [rsp + 0x30]
sub dword [rbx], eax
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
add rsp, 0x40
pop rbx
ret

Function at 0x140094980
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov rax, rdx
mov qword [rsp + 0x20], 0
lea rdx, [rcx + 0x30]
mov r9, r8
mov rcx, rax
mov r8d, 0x10
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x1400949b5
add rsp, 0x38
jmp qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
xor eax, eax
add rsp, 0x38
ret
Function at 0x140095d30
Capabilities:
Check if file exists
Delete file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
mov rbx, rdx
mov rdi, rcx
mov rcx, qword [0x1402aebf0]
lea rsi, [0x1402aebf0]
cmp rcx, rsi
je 0x140095d79
test byte [rcx + 0x44], 2
je 0x140095d79
cmp byte [rcx + 0x41], 4
jb 0x140095d79
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x26
call fcn.14001d350
mov r8, qword [rdi + 0x10]
lea rcx, [rsp + 0x20]
mov rdx, rbx
call fcn.14002cd90
cmp qword [rax + 0x18], 8
jb 0x140095d94
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_DeleteFileW]
mov r8, qword [rsp + 0x38]
test eax, eax
sete bl
cmp r8, 8
jb 0x140095dbf
mov rdx, qword [rsp + 0x20]
lea rcx, [rsp + 0x20]
inc r8
call fcn.14000c430
test bl, bl
je 0x140095e2e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
cmp eax, 2
jne 0x140095dec
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140095e5b
test byte [rcx + 0x44], al
je 0x140095e5b
cmp byte [rcx + 0x41], 5
jb 0x140095e5b
lea edx, [rax + 0x25]
jmp 0x140095e4b
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140095e1c
test byte [rcx + 0x44], 2
je 0x140095e1c
cmp byte [rcx + 0x41], 5
jb 0x140095e1c
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x28
mov r9d, ebx
call fcn.14001f1d0
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140095e5b
test byte [rcx + 0x44], 2
je 0x140095e5b
cmp byte [rcx + 0x41], 5
jb 0x140095e5b
mov edx, 0x29
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
call fcn.14001d350
mov rbx, qword [rsp + 0x50]
xor eax, eax
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
Function at 0x140095e70
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rdi, rdx
mov rcx, qword [0x1402aebf0]
lea rsi, [0x1402aebf0]
cmp rcx, rsi
je 0x140095ec5
test byte [rcx + 0x44], 2
je 0x140095ec5
cmp byte [rcx + 0x41], 4
jb 0x140095ec5
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x3d
call fcn.14001d350
lea rax, [rsp + 0x30]
mov r9d, 0x1000b
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesiaStorAfsService
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
je 0x140095f29
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140095f22
test byte [rcx + 0x44], 2
je 0x140095f22
cmp byte [rcx + 0x41], 2
jb 0x140095f22
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x3e
mov r9d, eax
call fcn.14001f1d0
mov eax, ebx
jmp 0x140096081
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov qword [rsp + 0x20], 0
lea rdx, str.BootMigrationPhase
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
je 0x140095f9e
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140095f8c
test byte [rcx + 0x44], 2
je 0x140095f8c
cmp byte [rcx + 0x41], 2
jb 0x140095f8c
mov edx, 0x3f
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov r9d, ebx
call fcn.14001f1d0
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, ebx
jmp 0x140096081
cmp dword [rsp + 0x3c], 4
jne 0x140096044
cmp dword [rsp + 0x38], 4
jne 0x140096044
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.BootMigrationPhase
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
je 0x140096005
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140095f8c
test byte [rcx + 0x44], 2
je 0x140095f8c
cmp byte [rcx + 0x41], 2
jb 0x140095f8c
mov edx, 0x41
jmp 0x140095f79
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140096040
test byte [rcx + 0x44], 2
je 0x140096040
cmp byte [rcx + 0x41], 5
jb 0x140096040
mov r9d, dword [rdi]
lea r8, [0x140226098]
mov rcx, qword [rcx + 0x38]
mov edx, 0x42
call fcn.14001f1d0
xor eax, eax
jmp 0x140096081
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140096071
test byte [rcx + 0x44], 2
je 0x140096071
cmp byte [rcx + 0x41], 2
jb 0x140096071
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x40
call fcn.14001d350
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, 0x70c
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1401a8cb0
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x140097740
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], edx
mov rcx, qword [0x1402aebf0]
lea rdi, [0x1402aebf0]
cmp rcx, rdi
je 0x140097791
test byte [rcx + 0x44], 2
je 0x140097791
cmp byte [rcx + 0x41], 4
jb 0x140097791
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x47
call fcn.14001d350
lea rax, [rsp + 0x30]
mov r9d, 0x1000b
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesiaStorAfsService
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
je 0x1400977f2
mov rcx, qword [0x1402aebf0]
cmp rcx, rdi
je 0x1400977ee
test byte [rcx + 0x44], 2
je 0x1400977ee
cmp byte [rcx + 0x41], 2
jb 0x1400977ee
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x48
mov r9d, eax
call fcn.14001f1d0
mov eax, ebx
jmp 0x140097871
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov dword [rsp + 0x28], 4
lea rdx, str.DumpMemoryLevel
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
je 0x140097864
mov rcx, qword [0x1402aebf0]
cmp rcx, rdi
je 0x140097855
test byte [rcx + 0x44], 2
je 0x140097855
cmp byte [rcx + 0x41], 2
jb 0x140097855
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x49
mov r9d, eax
call fcn.14001f1d0
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, ebx
jmp 0x140097871
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1401a8cb0
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret
Function at 0x140097fe0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rdi, rdx
mov rcx, qword [0x1402aebf0]
lea rsi, [0x1402aebf0]
cmp rcx, rsi
je 0x140098065
test byte [rcx + 0x44], 2
je 0x14009803c
cmp byte [rcx + 0x41], 4
jb 0x14009803c
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x43
call fcn.14001d350
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140098065
test byte [rcx + 0x44], 2
je 0x140098065
cmp byte [rcx + 0x41], 5
jb 0x140098065
mov r9d, dword [rdi]
lea r8, [0x140226098]
mov rcx, qword [rcx + 0x38]
mov edx, 0x44
call fcn.14001f1d0
lea rax, [rsp + 0x30]
mov r9d, 0x1000b
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesiaStorAfsService
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
je 0x1400980c6
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x1400980c2
test byte [rcx + 0x44], 2
je 0x1400980c2
cmp byte [rcx + 0x41], 2
jb 0x1400980c2
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x45
mov r9d, eax
call fcn.14001f1d0
mov eax, ebx
jmp 0x140098140
mov rcx, qword [rsp + 0x30]
lea rdx, str.BootMigrationPhase
mov dword [rsp + 0x28], 4
mov r9d, 4
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
je 0x140098133
mov rcx, qword [0x1402aebf0]
cmp rcx, rsi
je 0x140098124
test byte [rcx + 0x44], 2
je 0x140098124
cmp byte [rcx + 0x41], 2
jb 0x140098124
mov rcx, qword [rcx + 0x38]
lea r8, [0x140226098]
mov edx, 0x46
mov r9d, eax
call fcn.14001f1d0
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, ebx
jmp 0x140098140
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
Function at 0x140098b20
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rax, qword [rcx]
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
call qword [rax]
xor ebp, ebp
lea rdx, [rbx + 0x12]
mov r9, rsi
mov dword [rbx + 0x14], eax
mov rcx, rdi
mov qword [rsp + 0x20], rbp
lea r8d, [rbp + 6]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x140098b75
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x140098be5
mov rax, qword [rbx]
lea r8, [rsp + 0x30]
mov rdx, rdi
mov dword [rsp + 0x30], ebp
mov rcx, rbx
call qword [rax + 0x20]
mov ecx, dword [rsp + 0x30]
add dword [rsi], ecx
test eax, eax
jne 0x140098be5
mov rbx, qword [rbx + 0x20]
mov eax, ebp
mov dword [rsp + 0x30], eax
test rbx, rbx
je 0x140098bdf
nop dword [rax]
nop word [rax + rax]
lea r8, [rsp + 0x34]
mov dword [rsp + 0x34], ebp
mov rdx, rdi
mov rcx, rbx
call fcn.140098b20
mov ecx, eax
mov eax, dword [rsp + 0x30]
add eax, dword [rsp + 0x34]
mov dword [rsp + 0x30], eax
test ecx, ecx
jne 0x140098be1
mov rbx, qword [rbx + 0x18]
test rbx, rbx
jne 0x140098bb0
mov ecx, ebp
add dword [rsi], eax
mov eax, ecx
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401a8cb0
mov rbx, qword [rsp + 0x78]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret

Function at 0x14009be10
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov eax, dword [rcx + 0xc]
xor edi, edi
mov rbx, rcx
cmp eax, 1
jne 0x14009be5f
mov rcx, qword [rcx + 0x28]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ResetEvent]
mov eax, edi
lea rcx, [0x1400ba810]
xchg dword [rbx + 0x10], eax
mov r8, rbx
xor edx, edx
call fcn.1401d0d30
mov qword [rbx + 0x18], rax
cmp rax, 0xffffffffffffffff
jne 0x14009be5f
lea eax, [rdi + 0x6e]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov eax, dword [rbx + 0xc]
cmp eax, 1
je 0x14009be79
mov edi, 0x139f
mov eax, edi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov dword [rbx + 0xc], 2
mov eax, edi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1400a6a70
Capabilities:
Reference sql statements

Disassembly:
mov rax, rsp
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rdi
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rbp - 8], rax
mov rbx, rdx
xor edx, edx
mov qword [rbp - 0x48], rdx
xor eax, eax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x10], rax
lea rdi, vtable.SqliteStatement.0
mov qword [rbp - 0x40], rdi
mov dword [rbp - 0x38], edx
lea rax, [rcx + 0x10]
test rcx, rcx
cmove rax, rdx
mov qword [rbp - 0x30], rax
lea rdx, str.SELECT_FILE_STATE_FROM_FILES_WHERE_FILE_ID___id
mov qword [rbp - 0x28], rdx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x20], xmm0
mov byte [rbp - 0x10], 0
mov r8d, 6
lea rcx, str.SELECT
call fcn.1401b6ee0
movzx ecx, byte [rbp - 0x10]
mov edx, 1
test eax, eax
cmove ecx, edx
mov byte [rbp - 0x10], cl
lea rax, vtable.TransactionSafeStatement.0
mov qword [rbp - 0x40], rax
mov r8, rbx
lea rcx, [rbp - 0x40]
call fcn.140023760
test eax, eax
jne 0x1400a6b27
lea rcx, [rbp - 0x40]
call fcn.140023bb0
cmp eax, 0x64
jne 0x1400a6b79
lea r8, [rbp - 0x48]
xor edx, edx
lea rcx, [rbp - 0x40]
call fcn.140023aa0
test eax, eax
je 0x1400a6b79
lea rdx, [0x1402aebf0]
mov rcx, qword [0x1402aebf0]
cmp rcx, rdx
je 0x1400a6b79
test dword [rcx + 0x44], 0x20000
je 0x1400a6b79
cmp byte [rcx + 0x41], 2
jb 0x1400a6b79
mov edx, 0x13
mov r9d, eax
lea r8, [0x1402272d8]
mov rcx, qword [rcx + 0x38]
call fcn.140030ff0
movzx ebx, byte [rbp - 0x48]
and bl, 1
mov qword [rbp - 0x40], rdi
lea rcx, [rbp - 0x40]
call fcn.140023c60
nop
movzx eax, bl
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1401a8cb0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
Function at 0x1400b1e20
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rdi, rcx
cmp qword [rcx + 0x68], 0
je 0x1400b1fca
cmp byte [rcx + 0x72], 0
je 0x1400b1fca
mov rax, qword [rcx]
mov ebx, 0xffff
mov edx, ebx
call qword [rax + 0x18]
cmp bx, ax
jne 0x1400b1e7e
xor al, al
jmp 0x1400b1fcc
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0xf
mov byte [rbp - 0x30], 0
xor r8d, r8d
lea edx, [r8 + 8]
lea rcx, [rbp - 0x30]
call fcn.140009560
nop
mov rcx, qword [rbp - 0x30]
mov r9, qword [rbp - 0x18]
nop dword [rax + rax]
lea rdx, [rbp - 0x30]
cmp r9, 0x10
cmovae rdx, rcx
lea r8, [rbp - 0x30]
cmovae r8, rcx
mov rcx, qword [rdi + 0x68]
mov r10, qword [rcx]
mov r9, qword [rbp - 0x20]
add r9, rdx
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 0x74]
call qword [r10 + 0x40]
test eax, eax
je 0x1400b1eee
sub eax, 1
jne 0x1400b1f62
jmp 0x1400b1ef2
mov byte [rdi + 0x72], 0
lea rax, [rbp - 0x30]
mov rcx, qword [rbp - 0x30]
mov r9, qword [rbp - 0x18]
cmp r9, 0x10
cmovae rax, rcx
mov rbx, qword [rbp - 0x38]
sub rbx, rax
je 0x1400b1f3f
lea rax, [rbp - 0x30]
cmp r9, 0x10
cmovae rax, rcx
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, rax
call fcn.1401db324
mov r9, qword [rbp - 0x18]
mov rcx, qword [rbp - 0x30]
cmp rbx, rax
jne 0x1400b1f6f
cmp byte [rdi + 0x72], 0
je 0x1400b1f73
test rbx, rbx
jne 0x1400b1eb0
xor r8d, r8d
lea edx, [rbx + 8]
lea rcx, [rbp - 0x30]
call fcn.14000ca50
jmp 0x1400b1ea3
sub eax, 2
mov r9, qword [rbp - 0x18]
mov rcx, qword [rbp - 0x30]
je 0x1400b1f73
xor bl, bl
jmp 0x1400b1f75
mov bl, 1
cmp r9, 0x10
jb 0x1400b1fc5
lea rax, [r9 + 1]
cmp rax, 0x1000
jb 0x1400b1fc0
test byte [rbp - 0x30], 0x1f
je 0x1400b1f93
call fcn.1401b6c28
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x1400b1fa2
call fcn.1401b6c28
int3
sub rcx, rax
cmp rcx, 8
jae 0x1400b1fb1
call fcn.1401b6c28
int3
cmp rcx, 0x27
jbe 0x1400b1fbd
call fcn.1401b6c28
int3
mov rcx, rax
call fcn.1401a8b54
movzx eax, bl
jmp 0x1400b1fcc
mov al, 1
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1401a8cb0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x1400b23b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
sub rsp, 0x20
cmp qword [rdx + 0x18], 8
jb 0x1400b23c0
mov rdx, qword [rdx]
mov rcx, rdx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
mov ebx, eax
cmp eax, 0xffffffff
je 0x1400b24b1
mov qword [rsp + 0x30], rdi
test bl, 0x10
je 0x1400b246a
test bl, 2
je 0x1400b245a
mov rcx, qword [0x1402aebf0]
lea rdi, [0x1402aebf0]
cmp rcx, rdi
je 0x1400b2422
test byte [rcx + 0x44], 0x40
je 0x1400b2422
cmp byte [rcx + 0x41], 4
jb 0x1400b2422
mov rcx, qword [rcx + 0x38]
lea r8, [0x140228e60]
mov edx, 0x12
call fcn.14001d350
mov rcx, qword [0x1402aebf0]
test bl, 4
je 0x1400b245a
cmp rcx, rdi
je 0x1400b244d
test byte [rcx + 0x44], 0x40
je 0x1400b244d
cmp byte [rcx + 0x41], 4
jb 0x1400b244d
mov rcx, qword [rcx + 0x38]
lea r8, [0x140228e60]
mov edx, 0x13
call fcn.14001d350
xor eax, eax
mov rdi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
mov eax, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
mov rdi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
mov rcx, qword [0x1402aebf0]
lea rdi, [0x1402aebf0]
cmp rcx, rdi
je 0x1400b24a1
test byte [rcx + 0x44], 0x40
je 0x1400b24a1
cmp byte [rcx + 0x41], 2
jb 0x1400b24a1
mov rcx, qword [rcx + 0x38]
lea r8, [0x140228e60]
mov edx, 0x14
mov r9d, ebx
call fcn.14001f1d0
mov eax, 0x50
mov rdi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
mov eax, 2
add rsp, 0x20
pop rbx
ret

Function at 0x1400b2590
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x1402adcf8]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor edi, edi
mov dword [rsp + 0x30], 0x18
mov rbx, rdx
mov dword [rsp + 0x40], edi
xor r9d, r9d
lea r8, [rsp + 0x38]
lea rcx, str.D:_A_OI_FA___SY__A_OI_FA___BA_
lea edx, [rdi + 1]
call sub.api_ms_win_security_sddl_l1_1_0.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
jne 0x1400b2616
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1402aebf0]
lea rdx, [0x1402aebf0]
cmp rcx, rdx
je 0x1400b2612
test byte [rcx + 0x44], 0x40
je 0x1400b2612
cmp byte [rcx + 0x41], 2
jb 0x1400b2612
mov rcx, qword [rcx + 0x38]
lea edx, [rdi + 0x15]
mov r9d, eax
lea r8, [0x140228e60]
call fcn.14001ef30
mov eax, ebx
jmp 0x1400b268e
cmp qword [rbx + 0x18], 8
jb 0x1400b2622
mov rcx, qword [rbx]
jmp 0x1400b2625
mov rcx, rbx
lea rdx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateDirectoryW]
test eax, eax
jne 0x1400b2681
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1402aebf0]
lea rdx, [0x1402aebf0]
cmp rcx, rdx
je 0x1400b2681
test byte [rcx + 0x44], 0x40
je 0x1400b2681
cmp byte [rcx + 0x41], 2
jb 0x1400b2681
cmp qword [rbx + 0x18], 8
jb 0x1400b2665
mov rbx, qword [rbx]
mov rcx, qword [rcx + 0x38]
lea r8, [0x140228e60]
mov edx, 0x16
mov dword [rsp + 0x20], eax
mov r9, rbx
call fcn.14002ca10
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
mov eax, edi
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401a8cb0
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret