joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140005100
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000f010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000512d
xor eax, eax
jmp 0x140005299
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140005167
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140005167
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140005299
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000528c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400051aa
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1400051d5
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140005291
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140005244
sub eax, 1
je 0x140005244
cmp eax, 2
jne 0x14000528c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140005291
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140005272
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x14000528c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140005291
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140009a70
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x1400054a0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14000f010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140005573
cmp byte [rcx + 0x71], 0
je 0x140005573
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000556f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140005534
sub eax, 1
je 0x140005538
cmp eax, 2
jne 0x14000556f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140009a70
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140005566
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000556f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000551c
xor al, al
jmp 0x14000551c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140009a70
add rsp, 0x60
pop rbx
ret

Function at 0x1400059f0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x30
mov rax, qword [0x14000f010]
xor rax, rsp
mov qword [rsp + 0x28], rax
xor ebx, ebx
lea r8, [0x14000b7fc]
lea rdx, [0x1400a1860]
mov qword [rsp + 0x20], rbx
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rsi, qword [rsp + 0x20]
test rsi, rsi
jne 0x140005a3b
lea eax, [rbx - 3]
jmp 0x140005aed
xor edx, edx
mov rcx, rsi
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
je 0x140005a58
mov ebx, 0xfffffffd
jmp 0x140005ae0
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
test eax, eax
js 0x140005a4e
je 0x140005ae0
movsxd rbx, eax
lea rdx, [0x14000b550]
mov qword [rsp + 0x40], rdi
lea rcx, [rbx + 1]
call fcn.14000a0ac
mov rdi, rax
test rax, rax
jne 0x140005a8c
lea ebx, [rax - 2]
jmp 0x140005adb
xor r8d, r8d
mov byte [rbx + rax], 0
xor edx, edx
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov r9, rsi
mov r8, rbx
mov edx, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, rbx
je 0x140005ac6
mov rcx, rdi
call fcn.140009a90
mov ebx, 0xfffffffd
jmp 0x140005adb
mov r8, rax
mov rdx, rdi
call fcn.140007490
mov rcx, rdi
mov ebx, eax
call fcn.140009a90
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, ebx
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140009a70
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rsi
ret
Function at 0x14000a6c0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000a70a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000a70a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000a70a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000a70a
cmp dword [rcx + 0x84], 0xe
jbe 0x14000a70a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14000a70c
xor al, al
add rsp, 0x28
ret
Function at 0x140007e80
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x70
mov rax, qword [0x140039008]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor ebx, ebx
cmp qword [0x14003ab20], rbx
jne 0x14000803b
xor edx, edx
lea rcx, str.CABINET
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
test rax, rax
jne 0x140007f07
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x140007f07
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.AddDllDirectory
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x140007f07
xor r8d, r8d
lea rcx, str.CABINET
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
mov qword [0x14003ab20], rdi
test rdi, rdi
jne 0x140007f34
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140008021
jmp 0x14000801c
lea rdx, str.FDICreate
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14003ab40], rax
test rax, rax
je 0x140007f13
mov rcx, qword [0x14003ab20]
lea rdx, str.FDICopy
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14003ab30], rax
test rax, rax
je 0x140007f13
mov rcx, qword [0x14003ab20]
lea rdx, str.FDIIsCabinet
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14003ab28], rax
test rax, rax
je 0x140007f13
mov rcx, qword [0x14003ab20]
lea rdx, str.FDIDestroy
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14003ab48], rax
test rax, rax
je 0x140007f13
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rax
lea r9, [0x140007950]
or dword [rsp + 0x38], 0xffffffff
lea rax, [0x140007a10]
mov qword [rsp + 0x30], rax
lea r8, [0x1400078e0]
lea rax, [0x1400079e0]
mov qword [rsp + 0x28], rax
lea rdx, [0x1400078b0]
lea rax, [0x1400079a0]
mov qword [rsp + 0x20], rax
lea rcx, [0x140007880]
mov rax, qword [0x14003ab40]
call qword [0x14002a558]
mov qword [0x14003ab38], rax
test rax, rax
jne 0x14000803b
mov ebx, 0x80004005
mov rcx, qword [0x14003ab20]
test rcx, rcx
je 0x14000803b
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
and qword [0x14003ab20], 0
mov eax, ebx
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140015ba0
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
ret
Function at 0x14000c900
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r14
mov rbp, rsp
sub rsp, 0x40
xor sil, sil
mov rax, rdx
mov rdi, rcx
mov r14d, 0x80070000
test rdx, rdx
jne 0x14000c98f
mov rcx, qword [rcx + 0x18]
lea rdx, [rbp - 0x10]
mov rax, qword [rcx]
mov rax, qword [rax + 0x80]
call qword [0x14002a558]
mov ebx, eax
test eax, eax
js 0x14000cab1
mov rdx, qword [rdi + 0x28]
lea rax, [rbp + 0x38]
mov rcx, qword [rbp - 0x10]
mov esi, 1
mov r9d, esi
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
lea eax, [rbx + 0x7ff8fffe]
cmp eax, esi
jbe 0x14000cabe
test ebx, ebx
js 0x14000cab1
mov rax, qword [rbp + 0x38]
lea rcx, [rbp + 0x40]
mov dword [rbp + 0x40], 4
mov qword [rsp + 0x28], rcx
lea rdx, str.Size
lea rcx, [rbp + 0x48]
xor r9d, r9d
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14000caa2
mov eax, dword [rbp + 0x48]
lea rdx, str.Progress
mov rcx, qword [rbp + 0x38]
xor r9d, r9d
mov qword [rdi + 0x68], rax
xor r8d, r8d
lea rax, [rbp + 0x40]
mov dword [rbp + 0x40], 4
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14000caa2
mov eax, dword [rbp + 0x48]
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x28], rcx
lea rdx, str.LastAttemptHigh
mov rcx, qword [rbp + 0x38]
xor r9d, r9d
mov qword [rdi + 0x70], rax
xor r8d, r8d
lea rax, [rdi + 0x94]
mov dword [rbp + 0x40], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14000caa2
lea rcx, [rbp + 0x40]
mov dword [rbp + 0x40], 4
mov qword [rsp + 0x28], rcx
lea rax, [rdi + 0x90]
mov rcx, qword [rbp + 0x38]
lea rdx, str.LastAttemptLow
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
test sil, sil
je 0x14000cab1
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
add rsp, 0x40
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
and qword [rdi + 0x68], 0
mov ebx, esi
and qword [rdi + 0x70], 0
xor eax, eax
mov qword [rdi + 0x90], rax
jmp 0x14000cab1
Function at 0x14000f680
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x50
and qword [r11 + 0x20], 0
lea rdx, [r11 + 0x20]
and qword [r11 + 0x18], 0
mov rsi, rcx
mov rcx, qword [rcx + 0x18]
mov rax, qword [rcx]
mov rax, qword [rax + 0xc0]
call qword [0x14002a558]
mov ebx, eax
test eax, eax
js 0x14000f7dc
mov rcx, qword [rsp + 0x98]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x40], rax
lea rdx, [rsi + 0x28]
lea rax, [rsp + 0x90]
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2001f
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14000f7dc
lea rbp, [rsi + 0x1170]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rdi, [rsi + 0x128]
mov ebx, eax
mov rcx, rdi
lea r14d, [rax*2 + 2]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [rsp + 0x28], ebx
mov r8, rdi
mov ebx, 1
mov qword [rsp + 0x20], rbp
mov r9d, eax
mov edx, ebx
lea ecx, [rbx + 0x7e]
call qword [sym.imp.KERNEL32.dll_CompareStringW]
mov rcx, qword [rsp + 0x90]
lea rdx, str.Path
xor r8d, r8d
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], rbp
lea r9d, [rbx + 1]
test eax, eax
jne 0x14000f787
mov r9d, ebx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14000f7dc
mov rcx, qword [rsp + 0x90]
lea rax, [rsi + 0x21bc]
mov r9d, 4
lea rdx, str.Priority
mov dword [rsp + 0x28], r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x14000f7ef
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
add rsp, 0x50
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14000f9a0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x10c0]
mov eax, 0x11c0
call fcn.1400289f0
sub rsp, rax
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x1208], rbx
mov rax, qword [0x140039008]
xor rax, rsp
mov qword [rbp + 0x10b0], rax
mov rsi, r9
mov r14, r8
mov r15, rdx
mov rbx, rcx
mov rdi, qword [rbp + 0x1110]
and qword [rsp + 0x38], 0
and qword [rdi], 0
xor edx, edx
mov r8d, 0x1154
lea rcx, [rsp + 0x50]
call fcn.140017700
mov dword [rsp + 0x50], 0x1154
mov dword [rsp + 0x54], 7
or r9, 0xffffffffffffffff
mov r8, rbx
mov edx, 0x80
lea rcx, [rsp + 0x58]
call fcn.1400196e0
mov dword [rsp + 0x30], 0x1048
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Path
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14000fb11
mov dword [rsp + 0x30], 4
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x10a0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Priority
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14000fb11
lea r9, [rsp + 0x38]
mov r8, rsi
lea rdx, [rsp + 0x50]
mov rcx, r14
call fcn.14000f840
mov ebx, eax
test eax, eax
js 0x14000faea
mov rax, qword [rsp + 0x38]
mov qword [rdi], rax
xor edx, edx
xor ebx, ebx
jmp 0x14000faef
mov rdx, qword [rsp + 0x38]
test rdx, rdx
je 0x14000fb11
mov rax, qword [rdx + 8]
movsxd rcx, dword [rax + 4]
add rdx, 8
add rcx, rdx
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x14002a558]
nop
mov eax, ebx
mov rcx, qword [rbp + 0x10b0]
xor rcx, rsp
call fcn.140015ba0
mov rbx, qword [rsp + 0x1208]
add rsp, 0x11c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140010c78
Capabilities:
Clear file content

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
mov rdi, rcx
xor ebx, ebx
mov rcx, qword [rcx + 0x258]
mov esi, edx
cmp rcx, 0xffffffffffffffff
jne 0x140010ca3
lea ebx, [rcx + 2]
jmp 0x140010d83
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rdi + 0x258], 0xffffffffffffffff
test esi, esi
je 0x140010d83
cmp dword [rdi + 0x18], ebx
jne 0x140010d83
and qword [rsp + 0x30], rbx
lea rcx, [rdi + 0x34]
and dword [rsp + 0x28], ebx
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rdi + 0x258], rax
mov esi, 0x80070000
cmp rax, 0xffffffffffffffff
jne 0x140010d0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, esi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140010d83
mov rdx, qword [rdi + 0x248]
xor r9d, r9d
mov rcx, qword [rdi + 0x258]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x140010d40
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, esi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140010d83
mov rcx, qword [rdi + 0x258]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140010d65
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, esi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140010d83
mov rcx, qword [rdi + 0x28]
mov rdx, qword [rdi + 0x248]
mov r8, rdx
mov rax, qword [rcx]
mov rax, qword [rax + 0xa0]
call qword [0x14002a558]
mov rcx, qword [rdi + 0x258]
cmp rcx, 0xffffffffffffffff
je 0x140010d9e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rdi + 0x258], 0xffffffffffffffff
mov rsi, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x140012170
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
mov eax, 0x10058
call fcn.1400289f0
sub rsp, rax
mov rax, qword [0x140039008]
xor rax, rsp
mov qword [rsp + 0x10040], rax
and qword [rsp + 0x38], 0
xor ebx, ebx
and dword [rsp + 0x30], 0
mov r14, r9
cmp qword [0x14003ab60], rbx
mov rbp, r8
mov edi, edx
mov rsi, rcx
mov r12d, 0x80070000
jne 0x1400121f4
mov eax, dword [0x14003ab68]
lea r9d, [rbx + 1]
xor r8d, r8d
mov dword [rsp + 0x20], eax
xor edx, edx
lea rcx, [0x14003ab60]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1400121f4
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, r12d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400122b9
mov rcx, qword [0x14003ab60]
lea rax, [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x140012238
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, r12d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400122b9
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x30]
mov r8d, 0x10000
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140012270
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, r12d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400122b9
mov r8d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
test r8d, r8d
je 0x14001228f
xor r9d, r9d
lea rdx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
jmp 0x14001221b
xor ebx, ebx
mov r9, r14
and dword [rsp + 0x20], ebx
mov r8, rbp
lea edx, [rbx + 2]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x1400122b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, r12d
test eax, eax
cmovle ebx, eax
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400122c9
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, ebx
mov rcx, qword [rsp + 0x10040]
xor rcx, rsp
call fcn.140015ba0
add rsp, 0x10058
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x1400128ec
Capabilities:
Get file version info

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x30
xor ebx, ebx
mov r15, rdx
and dword [rax + 0x20], ebx
lea rdx, [rax + 0x20]
and qword [rax - 0x20], rbx
mov r14, r8
and dword [rax - 0x28], ebx
mov rbp, rcx
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov esi, eax
test eax, eax
jne 0x140012945
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400129e6
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, rax
test rax, rax
jne 0x140012962
mov ebx, 0x8007000e
jmp 0x1400129e6
cmp dword [rsp + 0x68], 0
jne 0x140012996
mov r9, rdi
mov r8d, esi
xor edx, edx
mov rcx, rbp
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x140012996
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400129dd
lea r9, [rsp + 0x20]
mov rcx, rdi
lea r8, [rsp + 0x28]
lea rdx, [0x140032ec8]
call qword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x1400129cc
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400129dd
mov rdx, qword [rsp + 0x28]
mov ecx, dword [rdx + 8]
mov dword [r15], ecx
mov ecx, dword [rdx + 0xc]
mov dword [r14], ecx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret

Function at 0x140012a04
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140012a97
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x140012a89
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140012a3d
mov ebx, 0x80070005
jmp 0x140012a97
test al, 0x10
je 0x140012a48
mov ebx, 0x8000ffff
jmp 0x140012a97
test al, 7
je 0x140012a97
mov edx, 0x80
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140012a76
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012a97
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140012a97
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140012aa4
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
push rsi
push rdi
push r13
sub rsp, 0x40
and qword [rax + 0x20], 0
lea rcx, [rax + 0x20]
mov ebp, 0x104
xor edi, edi
mov edx, ebp
mov qword [rax + 0x18], rdi
or rsi, 0xffffffffffffffff
call fcn.140011c38
mov ebx, eax
test eax, eax
js 0x140012be7
mov rdx, qword [rsp + 0x78]
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
xor ebp, ebp
mov r13d, 0x80000000
cmp rsi, 0xffffffffffffffff
jne 0x140012baa
mov r8, qword [rsp + 0x78]
lea rax, [0x140033268]
mov qword [rsp + 0x28], rax
lea r9, [0x140032fb0]
lea rdx, [0x140033730]
mov dword [rsp + 0x20], ebp
lea rcx, [rsp + 0x70]
call fcn.140011ec8
mov rdi, qword [rsp + 0x70]
mov ebx, eax
test eax, eax
js 0x140012bce
and qword [rsp + 0x30], 0
lea r8d, [rsi + 2]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov edx, 0x40000000
mov dword [rsp + 0x20], 1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140012b9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
lea eax, [rbx + r13]
test r13d, eax
jne 0x140012b9c
cmp ebx, 0x80070050
jne 0x140012bce
inc ebp
cmp ebp, 0x3e8
jl 0x140012afd
mov rdx, rdi
call fcn.140011d5c
mov ebx, eax
mov qword [0x1400398c0], rsi
test eax, eax
jns 0x140012bce
cmp rsi, 0xffffffffffffffff
je 0x140012bce
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x140012be7
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0x78], 0
je 0x140012c05
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x78]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbp, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r13
pop rdi
pop rsi
ret