joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140026e80
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0x60
mov r12, rcx
xor esi, esi
call fcn.14002e0d0
xor edi, edi
mov rbx, rax
test rax, rax
je 0x14002704f
mov rcx, rbx
call fcn.14002e3e8
and al, 3
cmp al, 2
jne 0x14002704a
lea r8, [rsp + 0x98]
mov edx, 1
mov rcx, rbx
call fcn.140034310
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x140027046
lea rdx, [rbx + 0x18]
lea rcx, [rbx + 0x10]
call fcn.1400413b0
mov esi, eax
test eax, eax
je 0x140026fe7
mov r9, qword [rbx + 0x20]
mov rcx, rbp
mov r8, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x1f0]
call fcn.140041534
mov esi, eax
test eax, eax
je 0x140026fe7
and qword [rsp + 0xa0], rdi
lea rdx, [rsp + 0xa0]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
mov rcx, rbx
call fcn.14002e3e8
mov rcx, rbx
mov r15d, eax
call fcn.14002f1cc
and qword [rsp + 0x58], rdi
add rax, 0x30
and dword [rsp + 0x50], edi
mov r9d, 2
mov rdx, qword [rsp + 0x98]
mov r8, rbp
mov qword [rsp + 0x40], rax
mov rcx, r12
and dword [rsp + 0x28], edi
and dword [rsp + 0x20], edi
call fcn.140036094
mov esi, eax
test eax, eax
je 0x140026fa0
mov rcx, rbx
call fcn.14002e3e8
test al, 2
je 0x140026fae
test r15b, 2
jne 0x140026fae
mov edx, 2
mov rcx, rbx
call fcn.14002e500
jmp 0x140026fae
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov r8, qword [0x1400bac90]
xor edx, edx
mov rcx, rbx
call fcn.14002ef44
mov rcx, rbx
mov r8, rax
call fcn.14002e568
mov rcx, rax
mov rdx, r8
call fcn.140031a84
mov rcx, rbx
call fcn.14002e568
mov rcx, rax
call fcn.140031bd4
jmp 0x140026ff5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
cmp qword [rsp + 0x98], 0
je 0x140027034
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, qword [rsp + 0x98]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
test edi, edi
je 0x140027046
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov eax, esi
jmp 0x14002704f
mov eax, 1
mov rbx, qword [rsp + 0x90]
add rsp, 0x60
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140029e3c
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rbp + 0x47], rax
xorps xmm0, xmm0
xor eax, eax
xor ebx, ebx
mov dword [rbp + 0x3f], eax
mov rdi, rcx
movups xmmword [rbp + 0xf], xmm0
movups xmmword [rbp + 0x1f], xmm0
movups xmmword [rbp + 0x2f], xmm0
movups xmmword [rbp - 0x11], xmm0
movups xmmword [rbp - 1], xmm0
test rcx, rcx
jne 0x140029e95
mov ebx, 0x80004005
jmp 0x14002a02c
mov rcx, qword [rcx + 0x20]
or esi, 0xffffffff
mov edx, esi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop dword [rax + rax]
test eax, 0xffffff7f
je 0x140029f02
cmp eax, 0x102
je 0x140029ef8
cmp eax, esi
jne 0x140029e8b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
mov esi, 0x80070000
movzx eax, ax
or eax, esi
test ecx, ecx
cmovle eax, ecx
test eax, eax
jns 0x140029e8b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, esi
test eax, eax
cmovle ebx, eax
jmp 0x14002a02c
mov ebx, 0x800705b4
jmp 0x14002a02c
mov rcx, qword [rdi + 0x10]
lea rdx, [rbp + 0xf]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
nop dword [rax + rax]
test eax, eax
je 0x140029fde
cmp dword [rbp + 0x33], ebx
je 0x140029f9c
cmp dword [rbp + 0x3b], ebx
je 0x140029f9c
mov rcx, qword [rdi + 0x10]
lea r9, [rbp - 0x15]
xor eax, eax
mov dword [rbp - 0x15], ebx
mov word [rbp - 0x19], ax
lea rdx, [rbp - 0x19]
mov byte [rbp - 0x17], al
mov r8d, 3
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
je 0x140029fde
movzx ecx, word [rbp - 0x19]
cmp word [0x1400a2954], cx
jne 0x140029f80
mov al, byte [0x1400a2956]
cmp al, byte [rbp - 0x17]
jne 0x140029f80
or dword [rdi + 0x34], 1
jmp 0x14002a01c
cmp word [0x1400a2950], cx
jne 0x140029f92
and dword [rdi + 0x34], 0xfffffffe
jmp 0x14002a01c
mov ebx, 0xc1440129
jmp 0x14002a01c
mov r8d, dword [rdi + 0x34]
lea rcx, [0x1400a2950]
and r8d, 1
mov dword [rbp - 0x15], ebx
lea rax, [rbp - 0x11]
lea rdx, [0x1400a2954]
mov qword [rsp + 0x20], rax
cmove rdx, rcx
lea r9, [rbp - 0x15]
mov rcx, qword [rdi + 0x10]
lea r8d, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x14002a01c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
mov esi, 0x80070000
movzx eax, ax
or eax, esi
test ecx, ecx
cmovle eax, ecx
test eax, eax
jns 0x14002a017
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, esi
test eax, eax
cmovle ebx, eax
jmp 0x14002a01c
mov ebx, 0x80004005
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.140096bd0
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x14002aaa0
Capabilities:
Query environment variable

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov ebx, dword [rsp + 0xd0]
xor r12d, r12d
mov r14, qword [rsp + 0xd8]
mov edi, ecx
mov ecx, dword [0x1400b8384]
mov rbp, r9
mov qword [rsp + 0x38], r12
mov rsi, r8
mov r15, rdx
cmp ecx, 0xffffffff
jne 0x14002ab5f
xorps xmm0, xmm0
lea r8d, [r12 + 0x10]
lea rdx, [rsp + 0x40]
lea rcx, str.WIM_Verbose_Logging
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
mov dword [rsp + 0x30], eax
dec eax
cmp eax, 0xf
ja 0x14002ab4c
lea r8, [rsp + 0x30]
lea rdx, [0x14009e38c]
lea rcx, [rsp + 0x40]
call qword [sym.imp.msvcrt.dll_swscanf_s]
nop dword [rax + rax]
mov ecx, dword [0x1400b8384]
test eax, eax
cmovg ecx, dword [rsp + 0x30]
jmp 0x14002ab52
mov ecx, dword [0x1400b8384]
cmp ecx, 0xffffffff
cmove ecx, r12d
mov dword [0x1400b8384], ecx
cmp edi, 4
jne 0x14002ab6d
test ecx, ecx
jne 0x14002ab7c
jmp 0x14002ac93
sub edi, 1
je 0x14002ab91
sub edi, 1
je 0x14002ab8a
sub edi, 1
je 0x14002ab83
mov edi, 0x41009477
jmp 0x14002ab96
mov edi, 0x41009484
jmp 0x14002ab96
mov edi, 0x41009485
jmp 0x14002ab96
mov edi, 0x4100947f
mov r9d, dword [rsp + 0xe0]
lea rdx, str.__s:__d______s___s
mov qword [rsp + 0x28], rsi
lea rcx, [rsp + 0x38]
mov r8, r14
mov qword [rsp + 0x20], rbp
call fcn.14000ca00
mov rbp, qword [rsp + 0x38]
mov r14d, 0x13d
mov esi, ebx
test rbp, rbp
je 0x14002ac44
mov ecx, ebx
and esi, 0x10000000
je 0x14002abfb
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ecx, ebx
cmp eax, r14d
je 0x14002ac12
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ecx, eax
jmp 0x14002ac12
mov r9d, ebx
movzx eax, bx
and r9d, 0x1fff0000
cmp r9d, 0x70000
cmove ecx, eax
mov r9d, ecx
mov r8, rbp
mov rcx, r15
mov edx, edi
call fcn.1400286f0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x14002ac4a
and esi, 0x10000000
mov ecx, ebx
test esi, esi
je 0x14002ac73
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
cmp eax, r14d
je 0x14002ac85
mov ecx, ebx
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x14002ac85
and ecx, 0x1fff0000
movzx eax, bx
cmp ecx, 0x70000
cmove ebx, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140096bd0
add rsp, 0x70
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14002f7b0
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
xor r12d, r12d
mov rbx, rdx
mov rdi, rcx
mov ebp, 1
test rcx, rcx
je 0x14002f92c
test rdx, rdx
je 0x14002f92c
mov qword [rdx], r12
lea r8d, [rbp + 3]
lea rdx, [0x1400a3050]
call qword [sym.imp.msvcrt.dll_wcsncmp]
nop dword [rax + rax]
test eax, eax
je 0x14002f928
or rax, 0xffffffffffffffff
mov rcx, rax
inc rcx
cmp word [rdi + rcx*2], r12w
jne 0x14002f80f
cmp rcx, 0xf7
jbe 0x14002f928
inc rax
cmp word [rdi + rax*2], r12w
jne 0x14002f826
lea r14d, [rax - 1]
mov ecx, 0x5c
cmp cx, word [rdi]
lea r15, [rdi + 2]
mov rcx, qword gs:[0x60]
mov edx, 8
cmovne r14d, eax
cmovne r15, rdi
mov rcx, qword [rcx + 0x30]
lea eax, [r14 + 5]
lea r8, [rax + rax]
mov edi, eax
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
jne 0x14002f88d
mov rax, qword gs:[0x30]
mov dword [rax + 0x68], 8
jmp 0x14002f91f
lea rax, [rsp + 0x70]
mov r9d, 4
mov qword [rsp + 0x28], rax
lea r8, [0x1400a3050]
lea rax, [rsp + 0x80]
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.14000c208
mov edi, eax
test eax, eax
js 0x14002f8f2
mov rdx, qword [rsp + 0x70]
mov r8, r15
mov rcx, qword [rsp + 0x80]
mov r9d, r14d
call fcn.14000107c
mov edi, eax
test eax, eax
js 0x14002f8f2
mov rax, qword gs:[0x30]
mov qword [rbx], rsi
mov dword [rax + 0x68], r12d
jmp 0x14002f928
mov rcx, qword gs:[0x60]
mov r8, rsi
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
mov rax, qword gs:[0x30]
movzx ecx, di
mov dword [rax + 0x68], ecx
mov rax, r12
mov ebp, r12d
mov qword [rbx], rax
mov eax, ebp
jmp 0x14002f93f
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x14002f99c
Capabilities:
Get disk information

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov r14, rdx
mov ebx, r15d
mov esi, r15d
lea ebp, [r15 + 1]
test rcx, rcx
je 0x14002fb97
test rdx, rdx
je 0x14002fb97
xor edx, edx
call fcn.14002f614
mov rdi, rax
mov r12d, 0x80070000
test rax, rax
je 0x14002fa07
lea edx, [rbp + 0x5b]
mov rcx, rax
call qword [sym.imp.msvcrt.dll_wcsrchr]
nop dword [rax + rax]
mov rsi, rax
jmp 0x14002fa47
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
movzx eax, ax
or eax, r12d
test ecx, ecx
cmovle eax, ecx
test eax, eax
jns 0x14002fb6d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, r12d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x14002fb72
test ebp, ebp
je 0x14002fb64
mov ebp, r15d
test ebx, ebx
js 0x14002fac1
mov dword [rsp + 0x38], r15d
xor r9d, r9d
mov qword [rsp + 0x30], r15
xor r8d, r8d
mov qword [rsp + 0x28], r15
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
nop dword [rax + rax]
test eax, eax
jne 0x14002fb68
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
movzx eax, ax
or eax, r12d
test ecx, ecx
cmovle eax, ecx
test eax, eax
jns 0x14002fb36
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, r12d
test eax, eax
cmovle ebx, eax
cmp ebx, 0x80070090
je 0x14002fada
mov eax, ebx
cmp ebx, 0x80070002
je 0x14002fada
cmp eax, 0x80070003
jne 0x14002fb3d
mov edx, 0x5c
mov word [rsi], r15w
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_wcsrchr]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
je 0x14002fb07
mov word [rax + 2], r15w
mov ebx, r15d
mov ebp, 1
test ebx, ebx
jns 0x14002fa47
test rdi, rdi
je 0x14002fb93
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x14002fb93
mov ebx, 0x80004005
jmp 0x14002fb41
test eax, eax
jns 0x14002fb64
mov r9d, ebx
mov qword [rsp + 0x20], r15
mov r8d, 0x21c
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibutilitypath.c
lea rcx, str.GetVolumeRootFromPath
call fcn.140046874
jmp 0x14002fb0f
test ebx, ebx
js 0x14002fb0f
mov qword [r14], rdi
jmp 0x14002fb93
mov ebx, 0x80004005
mov r9d, ebx
mov qword [rsp + 0x20], r15
mov r8d, 0x1ea
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibutilitypath.c
lea rcx, str.GetVolumeRootFromPath
call fcn.140046874
mov eax, ebx
jmp 0x14002fb9c
mov eax, 0x80070057
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop r12
ret
Function at 0x14003035c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x20
xor edi, edi
xor ebx, ebx
and qword [rsp + 0x58], rdi
mov rbp, rdx
mov qword [rsp + 0x50], rbx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14003043e
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14003043e
lea rdx, [rsp + 0x58]
mov rcx, rsi
call fcn.140030314
mov rsi, qword [rsp + 0x58]
test eax, eax
js 0x1400303ef
lea rdx, [rsp + 0x50]
mov rcx, rbp
call fcn.140030314
mov rbx, qword [rsp + 0x50]
test eax, eax
js 0x1400303ef
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__wcsicmp]
nop dword [rax + rax]
test eax, eax
sete dil
jmp 0x1400303f4
mov edi, 1
test rsi, rsi
je 0x140030419
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
test rbx, rbx
je 0x14003043e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x40]
mov eax, edi
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
Function at 0x140030cf4
Capabilities:
Hash data via bcrypt

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
and qword [rbp - 8], 0
mov rdi, r8
and qword [rbp - 0x10], 0
mov r14d, edx
and dword [rbp + 0x30], 0
mov r15, rcx
test rcx, rcx
je 0x140030e98
test edx, edx
je 0x140030e98
test r8, r8
je 0x140030e98
xorps xmm0, xmm0
lea rdx, str.SHA1
movups xmmword [r8], xmm0
xor eax, eax
lea rcx, [rbp - 8]
mov dword [r8 + 0x10], eax
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x140030e9d
and dword [rsp + 0x28], 0
lea rax, [rbp + 0x48]
mov rcx, qword [rbp - 8]
lea r8, [rbp + 0x30]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, str.ObjectLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x140030e80
mov ebx, dword [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8d, ebx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov rsi, rax
neg rax
sbb ebx, ebx
not ebx
and ebx, 0xc0000017
test rsi, rsi
je 0x140030e80
and dword [rsp + 0x30], 0
lea rdx, [rbp - 0x10]
and dword [rsp + 0x28], 0
mov r8, rsi
mov r9d, dword [rbp + 0x30]
mov rcx, qword [rbp - 8]
and qword [rsp + 0x20], 0
call qword [sym.imp.bcrypt.dll_BCryptCreateHash]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x140030e60
mov rcx, qword [rbp - 0x10]
xor r9d, r9d
mov r8d, r14d
mov rdx, r15
call qword [sym.imp.bcrypt.dll_BCryptHashData]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x140030e50
mov rcx, qword [rbp - 0x10]
xor r9d, r9d
mov rdx, rdi
lea r8d, [r9 + 0x14]
call qword [sym.imp.bcrypt.dll_BCryptFinishHash]
nop dword [rax + rax]
mov ebx, eax
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.bcrypt.dll_BCryptDestroyHash]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov rcx, qword [rbp - 8]
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
nop dword [rax + rax]
test ebx, ebx
jns 0x140030eb9
jmp 0x140030e9d
mov ebx, 0xc000000d
mov ecx, ebx
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
not ebx
shr ebx, 0x1f
mov eax, ebx
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400314fc
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x60
and dword [rax - 0x18], 0
mov rbx, r9
cmp dword [rsp + 0x90], 0
lea r9, [rax - 0x18]
mov esi, r8d
mov qword [rax - 0x48], rbx
mov rbp, rcx
je 0x14003153d
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
jmp 0x140031542
call fcn.1400319a8
mov edi, eax
test eax, eax
jne 0x1400315fb
test rbx, rbx
je 0x140031585
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0x3e5
jne 0x140031585
lea r9d, [rdi + 1]
mov rdx, rbx
lea r8, [rsp + 0x50]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jne 0x140031604
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx r9d, ax
or r9d, 0x80070000
test eax, eax
cmovle r9d, eax
test r9d, r9d
jns 0x140031685
test rbx, rbx
je 0x1400315bf
mov ecx, dword [rbx + 0x14]
mov eax, dword [rbx + 0x10]
shl rcx, 0x20
or rcx, rax
jmp 0x1400315c3
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x38], esi
lea rax, str.hFile_p__liOffset0x_I64x__cbData0x_x
mov qword [rsp + 0x30], rcx
lea rdx, str.onecore_base_ntsetupopktoolsosimagelib_readwrit_readwrit.c
mov qword [rsp + 0x28], rbp
lea rcx, str.ReadWriteDataInternal
mov r8d, 0xa5
mov qword [rsp + 0x20], rax
call fcn.140046874
jmp 0x140031685
test rbx, rbx
je 0x140031685
cmp esi, dword [rsp + 0x50]
je 0x140031685
xor edi, edi
lea ecx, [rdi + 0xd]
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx r9d, ax
or r9d, 0x80070000
test eax, eax
cmovle r9d, eax
test r9d, r9d
jns 0x140031685
mov eax, dword [rbx + 0x10]
lea rdx, str.onecore_base_ntsetupopktoolsosimagelib_readwrit_readwrit.c
mov ecx, dword [rbx + 0x14]
mov r8d, 0xb5
shl rcx, 0x20
or rcx, rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x40], eax
lea rax, str.hFile_p__liOffset0x_I64x__cbData0x_x__dwBytes__0x_x
mov dword [rsp + 0x38], esi
mov qword [rsp + 0x30], rcx
lea rcx, str.ReadWriteDataInternal
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
call fcn.140046874
lea r11, [rsp + 0x60]
mov eax, edi
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x1400319a8
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
cmp dword [0x1400bacd8], 0
mov rdi, r9
mov esi, r8d
mov rbp, rdx
mov rbx, rcx
je 0x140031a40
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
and dword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
nop dword [rax + rax]
test eax, eax
jne 0x140031a40
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
movabs r10, 0xca6106d138561870
mov rcx, qword [rsp + 0x70]
mov r9, rdi
mov rax, qword [0x1400bacb8]
mov r8d, esi
mov qword [rsp + 0x20], rcx
mov rdx, rbp
mov rcx, rbx
call qword [vtable._SH_n.0]
jmp 0x140031a62
mov rax, qword [rsp + 0x70]
mov r9, rdi
mov r8d, esi
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x140031b34
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
cmp dword [0x1400bacd8], 0
mov rdi, rdx
mov rbx, rcx
je 0x140031baa
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
and dword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
mov rcx, rbx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
nop dword [rax + rax]
test eax, eax
jne 0x140031baa
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
movabs r10, 0x8921be487edf6270
mov rax, qword [0x1400bacc8]
mov rdx, rdi
mov rcx, rbx
call qword [vtable._SH_n.0]
jmp 0x140031bbc
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140031bd4
Capabilities:
Clear file content

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov rdi, rcx
cmp dword [0x1400bacd8], ebx
je 0x140031c2a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, [rsp + 0x38]
mov dword [rsp + 0x38], ebx
mov rcx, rdi
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
nop dword [rax + rax]
test eax, eax
jne 0x140031c2a
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
jmp 0x140031c3b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
nop dword [rax + rax]
mov ebx, eax
mov rsi, qword [rsp + 0x40]
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret