joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140221bc0
Capabilities:
Set file attributes

Disassembly:
push rbp
mov rbp, rsp
push r15
mov r15, r8
mov r8d, 0x7fffffff
push r14
push r13
push r12
push rdi
mov rdi, rdx
mov rdx, r15
push rsi
mov rsi, r9
push rbx
mov ebx, ecx
xor ecx, ecx
sub rsp, 0x88
mov r12d, dword [rbp + 0x30]
mov qword [r9], 0xffffffffffffffff
call sub.msvcrt.dll_mbstowcs
mov r13, rax
dec rax
cmp rax, 0x7ffe
jbe 0x140221c15
mov r12d, 0x7b
jmp 0x140221d6e
lea r8, [r13 + 1]
lea rax, [r8 + r8]
add rax, 0xf
shr rax, 4
shl rax, 4
call fcn.1400358f0
sub rsp, rax
mov rdx, r15
lea r14, [rsp + 0x40]
mov rcx, r14
call sub.msvcrt.dll_mbstowcs
cmp rax, r13
jne 0x140221c0a
mov edx, dword [rdi + 4]
cmp r12w, 1
sbb eax, eax
and edx, 0x400000
add eax, 4
cmp edx, 1
sbb r8d, r8d
dec ebx
and r8d, 3
cmp ebx, 4
ja case.default.0x140221c78
lea rcx, [0x1402b7b78]
movsxd rdx, dword [rcx + rbx*4]
add rdx, rcx
jmp rdx
mov edx, 0xc0000080
mov ebx, 0x1002000
jmp 0x140221cf6
or r8d, 1
mov edx, 0x80000080
mov ebx, 0x1002000
mov eax, 3
jmp 0x140221cf6
mov edx, 0x40000080
mov ebx, 0x81002000
mov eax, 3
jmp 0x140221cf6
mov eax, dword [rdi + 0x88]
xor ebx, ebx
cmp dword [rdi + 0x78], eax
mov edx, 0x40000080
setae bl
mov eax, 1
xor r8d, r8d
shl ebx, 0x1d
or ebx, 0x1002000
jmp 0x140221cf6
or r8d, 4
mov edx, 0x110180
mov ebx, 0x1002000
mov eax, 3
jmp 0x140221cf6
mov edx, 0xc0000080
mov ebx, 0x1002102
mov eax, 4
mov rcx, r14
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi], rax
mov rcx, rax
cmp rax, 0xffffffffffffffff
jne 0x140221d2a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
jmp 0x140221d6e
lea rdx, [rbp - 0x74]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x140221d53
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsi]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi], 0xffffffffffffffff
jmp 0x140221d6e
mov edx, dword [rbp - 0x74]
xor r12d, r12d
xor ebx, edx
and ebx, 0x2902
je 0x140221d6e
xor edx, ebx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rsp, [rbp - 0x38]
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
Function at 0x140221d90
Capabilities:
Get disk information

Disassembly:
push r14
mov r14, rcx
push r13
push r12
push rsi
push rbx
mov ebx, edx
sub rsp, 0x1e0
cmp qword [0x1403f24a8], 0
jne 0x140221dbe
bt edx, 0x16
mov r12d, 0x307
jae 0x14022203e
mov rcx, r14
mov r12d, 0x10fe
call qword [sym.imp.KERNEL32.dll_GetFileType]
dec eax
jne 0x14022203e
mov rax, qword [0x1403f24e0]
test rax, rax
je 0x140221e25
mov r9d, 0x74
lea r8, [rsp + 0x60]
mov edx, 0xd
mov rcx, r14
call rax
test eax, eax
je 0x140221e25
mov eax, dword [rsp + 0x70]
test al, 2
je 0x140221e0c
bt ebx, 0x11
jae 0x14022203e
mov edx, ebx
and eax, 1
mov r12d, 0x1100
and edx, 0x400000
or edx, eax
je 0x14022203e
mov rax, qword [0x1403f24c0]
test rax, rax
je 0x140221eb7
lea rdx, [rsp + 0x60]
mov rcx, r14
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x40], rdx
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], rdx
xor edx, edx
mov dword [rsp + 0x48], 0x180
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x90310
call rax
mov ecx, eax
test eax, eax
js 0x140221e8e
bt ebx, 0x16
mov r12d, 0x1100
jb 0x140221eb7
jmp 0x14022203e
cmp eax, 0xc000046d
setne dl
cmp eax, 0xc0000010
setne al
test dl, al
je 0x140221eb7
cmp ecx, 0xc00000bb
je 0x140221eb7
call fcn.1402214e0
mov r12d, eax
jmp 0x14022203e
mov rsi, qword [0x1403f24d8]
xor r12d, r12d
test rsi, rsi
je 0x14022203e
cmp qword [0x1403f24d0], 0
je 0x14022203e
mov ecx, 0xfffe
mov r12d, 0xe
call sub.msvcrt.dll_malloc
mov r13, rax
test rax, rax
je 0x14022203e
lea rax, [rsp + 0x60]
lea r9, [rsp + 0x50]
mov rdx, r13
mov rcx, r14
mov dword [rsp + 0x38], 0
mov r8d, 0x7fff
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
call rsi
test eax, eax
je 0x140221f5f
mov esi, ebx
and esi, 0x20000
jne 0x140221f43
test dword [rsp + 0x60], 0x188000
jne 0x140221f95
mov r9d, 2
mov r8d, 0x7fff
mov rdx, r13
mov rcx, r14
call qword [0x1403f24d0]
test eax, eax
jne 0x140221f6d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
jmp 0x140222036
mov r12, qword [sym.imp.msvcrt.dll__wcsnicmp]
mov r8d, 0xc
lea rdx, str.DeviceMup_
mov rcx, r13
call r12
test eax, eax
jne 0x140221fa0
bt ebx, 0x16
jb 0x14022201b
mov r12d, 0x1100
jmp 0x140222036
xor r9d, r9d
mov r8d, 0x7fff
mov rdx, r13
mov rcx, r14
call qword [0x1403f24d0]
test eax, eax
je 0x14022201b
mov r14, qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov rcx, r13
call r14
cmp eax, 1
jne 0x140222008
mov r8d, 4
lea rdx, [0x1402b7ba6]
mov rcx, r13
call r12
test eax, eax
jne 0x140221f8b
lea rcx, [r13 + 0xa]
mov r8d, 2
lea rdx, [0x1402b7bb0]
call r12
test eax, eax
jne 0x140221f8b
mov word [r13 + 0xe], 0
lea rcx, [r13 + 8]
call r14
cmp eax, 5
je 0x14022202d
ja 0x140222020
sub eax, 2
cmp eax, 1
ja 0x140221f8b
xor r12d, r12d
jmp 0x140222036
xor r12d, r12d
cmp eax, 6
je 0x140222036
jmp 0x140221f8b
test esi, esi
jne 0x14022201b
jmp 0x140221f8b
mov rcx, r13
call sub.msvcrt.dll_free
add rsp, 0x1e0
mov eax, r12d
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
Function at 0x1402222a0
Capabilities:
Clear file content

Disassembly:
push r12
mov r12, rcx
sub rsp, 0x30
mov rax, qword [0x1403f24c8]
test rax, rax
je 0x1402222de
mov qword [rsp + 0x28], rdx
lea r8, [rsp + 0x28]
mov r9d, 8
mov edx, 6
call rax
mov r8d, eax
xor eax, eax
test r8d, r8d
jne 0x140222309
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140222309
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1402222fa
add rsp, 0x30
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x1402222ee
xor eax, eax
add rsp, 0x30
pop r12
ret
Function at 0x140222820
Capabilities:
Map section object

Disassembly:
push rbp
xorps xmm0, xmm0
mov rbp, rsp
push r14
mov r14, r9
push r13
push r12
push rdi
mov rdi, r8
push rsi
mov esi, ecx
push rbx
mov rbx, rdx
and rsp, 0xfffffffffffffff0
sub rsp, 0x60
mov qword [rdx], 0
mov rcx, qword [rdx + 8]
mov qword [rdx + 0x20], 0
mov qword [rdx + 0x28], 0
movups xmmword [rdx + 0x10], xmm0
mov edx, esi
call fcn.140221d90
mov r12d, eax
test eax, eax
jne 0x1402229b7
mov r13d, esi
mov rcx, qword [rbx + 8]
and r13d, 0x20000
jne 0x1402228a0
test byte [rbp + 0x30], 1
je 0x1402228a0
mov rdx, rdi
call fcn.1402222a0
test eax, eax
jne 0x1402229b4
mov qword [rbx + 0x20], rdi
jmp 0x1402228b1
lea rdx, [rbx + 0x20]
call fcn.140221530
test eax, eax
jne 0x1402229b4
cmp r13d, 1
mov r8, qword [rbx + 8]
lea rcx, [rbx + 0x28]
mov dword [rsp + 0x28], 0x4000000
sbb eax, eax
and esi, 0x80000
lea r9, [rsp + 0x50]
mov qword [rsp + 0x50], rdi
and eax, 2
mov qword [rsp + 0x30], r8
add eax, 2
cmp esi, 1
sbb edx, edx
mov dword [rsp + 0x20], eax
xor r8d, r8d
and edx, 0xfffffffe
add edx, 0x17
call sub.ntdll.dll_NtCreateSection
mov ecx, eax
test eax, eax
js 0x140222999
test r13d, r13d
jne 0x140222916
cmp qword [0x1403f24a8], 0
cmovne rdi, r14
jmp 0x140222918
xor edi, edi
cmp esi, 1
mov qword [rsp + 0x58], rdi
sbb esi, esi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and esi, 0xfffffffe
mov rcx, qword [rbx + 0x28]
mov r8, rbx
add esi, 4
mov rdx, rax
xor eax, eax
test r13d, r13d
sete al
mov dword [rsp + 0x48], esi
xor r9d, r9d
shl eax, 0xd
mov dword [rsp + 0x38], 2
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call sub.ntdll.dll_NtMapViewOfSection
mov r13d, eax
test eax, eax
jns 0x1402229a3
mov rcx, qword [rbx + 0x28]
call sub.ntdll.dll_NtClose
mov qword [rbx + 0x28], 0
mov ecx, r13d
mov qword [rbx], 0
call fcn.1402214e0
mov r12d, eax
jmp 0x1402229b7
movq xmm0, qword [rsp + 0x58]
movhps xmm0, qword [rsp + 0x50]
movups xmmword [rbx + 0x10], xmm0
jmp 0x1402229b7
mov r12d, eax
lea rsp, [rbp - 0x30]
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop rbp
ret

Function at 0x140222ae0
Capabilities:
Read file on windows

Disassembly:
push rbx
mov rbx, r8
sub rsp, 0x60
lea rax, [rsp + 0x40]
mov dword [rsp + 0x50], r9d
lea r9, [rsp + 0x3c]
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x3c], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140222b30
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140222b44
mov eax, 0x1e
jmp 0x140222b44
mov eax, dword [rsp + 0x3c]
mov edx, 0x26
cmp rax, rbx
mov eax, 0
cmovne eax, edx
add rsp, 0x60
pop rbx
ret
Function at 0x140222b50
Capabilities:
Query or enumerate registry value

Disassembly:
push r14
mov r14, rdx
push r13
mov r13, rcx
push r12
push rsi
mov rsi, r9
push rbx
mov rbx, r8
sub rsp, 0x50
mov rax, qword [0x1403f24a0]
test rax, rax
jne 0x140222bc5
mov rdx, rcx
lea r8, [rsp + 0x48]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov r12d, eax
test eax, eax
jne 0x140222c58
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x28], rsi
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, qword [rsp + 0x48]
mov r12d, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140222c58
mov qword [rsp + 0x30], r9
mov r9d, 0xffff
mov qword [rsp + 0x28], r8
mov r8, rdx
mov rdx, rcx
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], 0
call rax
mov r12d, eax
cmp eax, 2
jne 0x140222c58
mov qword [rsp + 0x30], rsi
mov r9d, 0x1ffff
mov r8, r14
mov rdx, r13
mov qword [rsp + 0x28], rbx
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], 0
call qword [0x1403f24a0]
mov r12d, eax
cmp eax, 2
jne 0x140222c58
mov qword [rsp + 0x30], rsi
mov r9d, 0x2ffff
mov r8, r14
mov rdx, r13
mov qword [rsp + 0x28], rbx
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], 0
call qword [0x1403f24a0]
mov r12d, eax
add rsp, 0x50
mov eax, r12d
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
Function at 0x1402231e0
Capabilities:
Print debug messages

Disassembly:
push r13
mov r13, r9
push r12
mov r12, rdx
push rsi
push rbx
mov ebx, r8d
sub rsp, 0x38
mov rax, qword [0x1403f1a40]
mov rsi, qword [rsp + 0x80]
test rax, rax
je 0x140223213
add rsp, 0x38
pop rbx
pop rsi
pop r12
pop r13
jmp rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1402232e0
mov qword [rsp + 0x20], 0
test r12, r12
je 0x140223267
test ebx, ebx
jle 0x14022324c
lea rcx, [rsp + 0x20]
mov r9d, ebx
mov r8, r12
lea rdx, str._s:_d
call fcn.1402231b0
jmp 0x14022327f
test r12, r12
je 0x140223267
lea rcx, [rsp + 0x20]
mov r8, r12
lea rdx, [0x1402b7bea]
call fcn.1402231b0
jmp 0x14022327f
test ebx, ebx
jle 0x14022329e
lea rcx, [rsp + 0x20]
mov r8d, ebx
lea rdx, str._d:
call fcn.1402231b0
test eax, eax
jle 0x14022329e
mov r12, qword [rsp + 0x20]
test r12, r12
je 0x14022329e
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov rcx, r12
call sub.msvcrt.dll_free
lea rcx, [rsp + 0x28]
mov r8, rsi
mov rdx, r13
mov qword [rsp + 0x28], 0
call fcn.140220ed0
test eax, eax
jle 0x1402232e0
mov r12, qword [rsp + 0x28]
test r12, r12
je 0x1402232e0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add rsp, 0x38
mov rcx, r12
pop rbx
pop rsi
pop r12
pop r13
jmp sub.msvcrt.dll_free
add rsp, 0x38
pop rbx
pop rsi
pop r12
pop r13
ret

Function at 0x1402242c0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x48
cmp qword [0x1403f1a40], 0
je 0x1402242e3
mov qword [rsp + 0x20], rcx
lea r9, str.assert:__s_n
xor ecx, ecx
call fcn.1402232f0
jmp 0x14022434a
mov qword [rsp + 0x38], 0
test rdx, rdx
jne 0x1402242f8
lea rdx, [0x1402b83b6]
mov dword [rsp + 0x20], r8d
lea r10, [rsp + 0x38]
mov r9, rdx
mov r8, rcx
lea rdx, str._r_nMDBX_ASSERTION:__s___s:_u
mov rcx, r10
call fcn.1402231b0
test eax, eax
jle 0x140224323
cmp qword [rsp + 0x38], 0
jne 0x14022432f
lea rax, str._troubles_with_assertion_message_preparation_
mov qword [rsp + 0x38], rax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x14022434a
call qword [sym.imp.KERNEL32.dll_DebugBreak]
or ecx, 0xffffffff
add rsp, 0x48
jmp qword [sym.imp.KERNEL32.dll_FatalExit]

Function at 0x140224360
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsFree]
test eax, eax
jne 0x14022438b
mov r8d, 0x124e
lea rdx, str.thread_key_delete
lea rcx, str.TlsFree_key_
add rsp, 0x28
jmp fcn.1402242c0
add rsp, 0x28
ret

Function at 0x1402245c0
Capabilities:
Print debug messages

Disassembly:
mov r8d, 0x125f
lea rdx, str.thread_rthc_set
lea rcx, str.TlsSetValue_key___void__value_
jmp fcn.1402242c0
Function at 0x140225290
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rax, rcx
mov rbp, rsp
push r13
push r12
push rdi
push rsi
mov esi, r9d
push rbx
mov ebx, r8d
and rsp, 0xfffffffffffffff0
sub rsp, 0x430
mov r12, qword [rcx + 0x40]
mov rax, qword [rax + 0x30]
movzx ecx, byte [r12 + 0x80]
cmp qword [rdx], rax
jb 0x14022530c
mov r8d, r9d
mov al, 0xff
mov rdi, rdx
shl r8, cl
mov rcx, r8
rep stosb byte [rdi], al
mov dword [rdx + 0x10], ebx
test byte [r12 + 6], 8
jne 0x1402253b8
movzx ecx, byte [r12 + 0x80]
mov r10, qword [r12 + 0x10]
mov r9d, ebx
lea rsp, [rbp - 0x28]
pop rbx
pop rsi
shl r9, cl
pop rdi
mov rcx, r10
pop r12
pop r13
pop rbp
jmp fcn.140220f60
mov eax, dword [r12 + 0x78]
shl rbx, cl
mov r8d, 1
lea r13, [rsp + 0x30]
mov edi, 0x40
mov qword [rsp + 0x38], rax
add rax, qword [r12 + 0xa8]
mov qword [rsp + 0x30], rax
dec esi
mov eax, r8d
je 0x140225392
movaps xmm0, xmmword [rsp + 0x30]
shl rax, 4
inc r8d
movaps xmmword [rsp + rax + 0x30], xmm0
cmp r8d, 0x40
jne 0x140225336
mov rax, rdi
mov r10, qword [r12 + 0x10]
mov r9, rbx
mov rdx, r13
movzx ecx, byte [r12 + 0x80]
shl rax, cl
mov rcx, r10
mov qword [rsp + 0x20], rax
call fcn.1401415c0
mov rax, rdi
xor r8d, r8d
movzx ecx, byte [r12 + 0x80]
shl rax, cl
add rbx, rax
jmp 0x140225336
mov r10, qword [r12 + 0x10]
lea rdx, [rsp + 0x30]
mov r9, rbx
movzx ecx, byte [r12 + 0x80]
shl rax, cl
mov rcx, r10
mov qword [rsp + 0x20], rax
call fcn.1401415c0
lea rsp, [rbp - 0x28]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
Function at 0x1402267e0
Capabilities:
Allocate thread local storage

Disassembly:
push r15
push r14
mov r14, rcx
push r13
push r12
mov r12, rdx
push rbp
mov rbp, r8
push rdi
push rsi
push rbx
sub rsp, 0x38
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [r14], eax
inc eax
je 0x140226830
lea r13, [0x1403f2460]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x1403f240c]
mov r10d, dword [0x1403f2408]
mov r9d, dword [r14]
mov r15, rbx
cmp ebx, r10d
jne 0x140226899
jmp 0x140226840
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1402268e0
jmp 0x140226806
mov rsi, qword [0x1403f2400]
xor ecx, ecx
imul rdx, rbx, 0x30
mov dword [rsp + 0x2c], r9d
lea rdi, [0x1403f2280]
mov dword [rsp + 0x28], r10d
cmp rsi, rdi
cmovne rcx, rsi
call sub.msvcrt.dll_realloc
test rax, rax
je 0x1402268ca
cmp rsi, rdi
mov r10d, dword [rsp + 0x28]
mov r9d, dword [rsp + 0x2c]
jne 0x140226888
mov ecx, 0x60
mov rdi, rax
rep movsd dword [rdi], dword [rsi]
add r10d, r10d
mov qword [0x1403f2400], rax
mov dword [0x1403f2408], r10d
imul rax, rbx, 0x18
inc r15d
add rax, qword [0x1403f2400]
mov rcx, r13
mov byte [rax + 0x14], 1
mov dword [rax + 0x10], r9d
mov qword [rax], r12
mov qword [rax + 8], rbp
mov dword [0x1403f240c], r15d
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x1402268e0
mov ecx, dword [r14]
call fcn.140224360
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xe
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140227aa0
Capabilities:
Print debug messages

Disassembly:
push r12
mov r10, rcx
lea r12, str._troubles_with_panic_message_preparation_
push rbx
sub rsp, 0x38
mov qword [rsp + 0x58], rdx
lea rcx, [rsp + 0x28]
mov rdx, r10
mov qword [rsp + 0x60], r8
lea r8, [rsp + 0x58]
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x20], r8
mov qword [rsp + 0x28], 0
call fcn.140220ed0
test eax, eax
jle 0x140227af5
mov r12, qword [rsp + 0x28]
test r12, r12
jne 0x140227af5
lea r12, str._troubles_with_panic_message_preparation_
lea rcx, str._r_nMDBX_PANIC:
mov rbx, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rbx
mov rcx, r12
call rbx
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x140227b1a
call qword [sym.imp.KERNEL32.dll_DebugBreak]
or ecx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_FatalExit]
Function at 0x140228950
Capabilities:
Get memory capacity
Get system information on windows

Disassembly:
push r12
mov rax, rcx
push rbp
push rdi
mov rdi, rcx
push rsi
mov rsi, rdx
push rbx
mov rbx, r8
sub rsp, 0x60
or rax, rdx
jne 0x140228982
mov eax, 0x57
test r8, r8
je 0x140228a2e
mov qword [rbx], 0xffffffffffffffff
jmp 0x140228993
test rdx, rdx
je 0x14022898e
mov qword [rdx], 0xffffffffffffffff
test rbx, rbx
jne 0x140228979
lea r12, [rsp + 0x20]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, dword [rsp + 0x24]
mov rbp, rdx
test rdi, rdi
je 0x1402289b0
mov qword [rdi], rdx
mov eax, 0xffff87c0
cmp rdx, 0xff
jle 0x140228a2e
lea rcx, [rdx - 1]
test rcx, rdx
jne 0x140228a2e
xor eax, eax
mov ecx, 0x10
mov rdi, r12
bsf ebp, ebp
rep stosd dword [rdi], eax
mov dword [rsp + 0x20], 0x40
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
jne 0x1402289f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140228a2e
test rsi, rsi
jne 0x1402289ff
test rbx, rbx
jne 0x140228a13
jmp 0x140228a25
mov rax, qword [rsp + 0x28]
mov ecx, ebp
shr rax, cl
mov qword [rsi], rax
test rax, rax
jg 0x1402289f8
jmp 0x140228a29
mov rax, qword [rsp + 0x30]
mov ecx, ebp
shr rax, cl
mov qword [rbx], rax
test rax, rax
jle 0x140228a29
xor eax, eax
jmp 0x140228a2e
mov eax, 0x32
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140228c60
Capabilities:
Get system information on windows

Disassembly:
push r12
mov edx, 0x2f0
push rsi
push rbx
mov rbx, rcx
mov ecx, 1
sub rsp, 0x60
call sub.msvcrt.dll_calloc
mov r12, rax
mov eax, 0xe
test r12, r12
je 0x140228dc6
movabs rax, 0x20000003d
mov dword [r12 + 0x168], 2
mov qword [r12 + 0x8c], rax
mov qword [r12 + 0x10], 0xffffffffffffffff
mov qword [r12 + 0x38], 0xffffffffffffffff
mov qword [r12 + 0x48], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rcx, [rsp + 0x30]
mov byte [r12 + 0x81], 0xff
mov dword [r12 + 0x94], eax
movabs rax, 0x4000000000400
mov qword [r12 + 0xe8], rax
mov eax, 0x3fa0001
shl rax, 0x10
mov qword [r12 + 0xf0], rax
movabs rax, 0x400000080840
mov qword [r12 + 0xf8], rax
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x34]
lea rcx, [rax - 1]
mov rdx, rax
test rcx, rax
jne 0x140228d33
cmp rax, 0xff
ja 0x140228d75
cmp byte [0x1403f1a48], 0
je 0x140228d5f
mov qword [rsp + 0x20], rax
lea r9, str.unsuitable_system_pagesize__llu_n
mov r8d, 0x39d8
lea rdx, str.mdbx_env_create
mov ecx, 1
call fcn.1402232f0
mov rcx, r12
call sub.msvcrt.dll_free
mov qword [rbx], 0
mov eax, 0xffff87c0
jmp 0x140228dc6
mov dword [r12 + 0x88], eax
mov eax, 0x10000
mov rcx, r12
cmp edx, eax
cmova rdx, rax
call fcn.140228a40
mov rsi, qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [r12 + 0x140]
call rsi
lea rcx, [r12 + 0x188]
call qword [0x1403f2508]
lea rcx, [r12 + 0x190]
call rsi
mov dword [r12], 0x9a899641
xor eax, eax
mov qword [rbx], r12
add rsp, 0x60
pop rbx
pop rsi
pop r12
ret
Function at 0x140003280
Capabilities:
Hash data with crc32

Disassembly:
mov qword [rsp + 8], rbx
mov r11d, r8d
mov r10, rdx
not r11d
mov r9, rcx
mov eax, r11d
test rdx, rdx
je 0x1400032dd
lea rbx, [0x1400ccd70]
movzx r8d, byte [r9]
lea r9, [r9 + 1]
dec r10
cmp r8b, 0x23
jne 0x1400032c4
cmp r10, 2
jb 0x1400032c4
cmp byte [r9], r8b
jne 0x1400032c4
cmp byte [r9 + 1], r8b
cmove eax, r11d
movzx edx, al
xor rdx, r8
shr eax, 8
xor eax, dword [rbx + rdx*4]
test r10, r10
jne 0x1400032a0
not eax
mov rbx, qword [rsp + 8]
ret
movzx r8d, byte [rcx]
inc r9
test r8b, r8b
je 0x14000331f
lea rbx, [0x1400ccd70]
cmp r8b, 0x23
jne 0x140003303
cmp byte [r9], r8b
jne 0x140003303
cmp byte [r9 + 1], r8b
cmove eax, r11d
movzx edx, al
movzx ecx, r8b
movzx r8d, byte [r9]
xor rdx, rcx
shr eax, 8
inc r9
xor eax, dword [rbx + rdx*4]
test r8b, r8b
jne 0x1400032f0
mov rbx, qword [rsp + 8]
not eax
ret

Function at 0x140003460
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push r14
sub rsp, 0x20
mov r14, r8
test r8, r8
je 0x14000347a
mov qword [r8], 0
lea rdx, [0x1400cc7c4]
call fcn.140003330
mov rbx, rax
test rax, rax
jne 0x14000349a
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret
mov qword [rsp + 0x30], rsi
mov rcx, rbx
mov qword [rsp + 0x38], rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov esi, eax
cmp eax, 0xffffffff
je 0x140003571
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jne 0x140003571
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
movsxd rdi, eax
cmp edi, 0xffffffff
je 0x140003571
xor r8d, r8d
mov edx, esi
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jne 0x140003571
cmp rdi, 0xffffffffffffffff
je 0x140003571
mov rax, qword [0x14010a3b0]
test rax, rax
je 0x14000350e
inc dword [rax + 0x3b0]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x140003571
mov r9, rbx
mov r8, rdi
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rbx
cmp rax, rdi
je 0x14000355e
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rax, qword [0x14010a3b0]
test rax, rax
je 0x140003553
dec dword [rax + 0x3b0]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14000357a
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test r14, r14
je 0x14000356c
mov qword [r14], rdi
mov rax, rsi
jmp 0x14000357c
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret