joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401224d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x1402b70e8]
test ecx, ecx
je 0x140122500
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140122519
mov rdi, rax
cmp qword [rax + 8], 0
je 0x140122519
add rdi, 0x10
jmp 0x1401225fa
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::he83f3bc0876f81a8
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x1401224ed
mov ecx, dword [0x1402b70e8]
test ecx, ecx
je 0x1401225db
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x1401225f8
mov rsi, rax
test rax, rax
jne 0x1401225aa
movzx eax, byte [0x140361100]
mov rcx, qword [0x1403610c8]
test rcx, rcx
jne 0x14012256b
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x140122614
mov rcx, rax
mov qword [0x1403610c8], rax
mov r8d, 0x18
xor edx, edx
call fcn.14014aadc
test rax, rax
je 0x140122614
mov rsi, rax
lea rax, sym.std::sys::common::thread_local::os_local::destroy_value::he83f3bc0876f81a8
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1402b70e8]
test ecx, ecx
je 0x140122604
dec ecx
mov rdx, rsi
call fcn.14014a9a4
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x1401225fa
test rcx, rcx
je 0x1401225fa
lock dec qword [rcx]
jne 0x1401225fa
call sym.alloc::sync::Arc_T_A_::drop_slow::h9c84d1bb8f2f669c
jmp 0x1401225fa
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::he83f3bc0876f81a8
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x140122538
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::he83f3bc0876f81a8
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
jmp 0x1401225a2
mov ecx, 8
mov edx, 0x18
call sym.alloc::alloc::handle_alloc_error::hc580476980f9927e
int3

Function at 0x140122b50
Capabilities:
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, rcx
mov rdi, qword [rcx]
mov ecx, dword [rdi + 0x18]
test ecx, ecx
je 0x140122b78
dec ecx
mov edx, 1
call fcn.14014a9a4
cmp qword [rsi + 8], 0
jne 0x140122b93
jmp 0x140122bab
mov rcx, rdi
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
mov edx, 1
call fcn.14014a9a4
cmp qword [rsi + 8], 0
je 0x140122bab
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x140122bab
lock dec qword [rax]
jne 0x140122bab
mov rcx, qword [rsi + 0x10]
call sym.alloc::sync::Arc_T_A_::drop_slow::h9c84d1bb8f2f669c
mov rcx, qword [0x1403610c8]
xor edx, edx
mov r8, rsi
call fcn.14014aabc
mov ecx, dword [rdi + 0x18]
test ecx, ecx
je 0x140122bc7
dec ecx
jmp 0x140122bd1
mov rcx, rdi
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
xor edx, edx
add rsp, 0x28
pop rdi
pop rsi
jmp fcn.14014a9a4
Function at 0x140124230
Capabilities:
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rdi, rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140124247
dec ecx
jmp 0x140124251
mov rcx, rsi
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
mov edx, 1
call fcn.14014a9a4
mov rcx, qword [0x1403610c8]
xor edx, edx
mov r8, rdi
call fcn.14014aabc
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140124277
dec ecx
jmp 0x140124281
mov rcx, rsi
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
xor edx, edx
add rsp, 0x28
pop rdi
pop rsi
jmp fcn.14014a9a4

Function at 0x140124390
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x1402b70c8]
test ecx, ecx
je 0x1401243bd
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x1401243d6
cmp qword [rax + 8], 0
je 0x1401243d6
add rax, 0x10
add rsp, 0x20
pop rsi
ret
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x1401243ac
mov ecx, dword [0x1402b70c8]
test ecx, ecx
je 0x140124481
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x14012449e
mov rsi, rax
test rax, rax
jne 0x140124463
movzx eax, byte [0x140361100]
mov rcx, qword [0x1403610c8]
test rcx, rcx
jne 0x140124428
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x1401244b6
mov rcx, rax
mov qword [0x1403610c8], rax
mov r8d, 0x20
xor edx, edx
call fcn.14014aadc
test rax, rax
je 0x1401244b6
mov rsi, rax
lea rax, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1402b70c8]
test ecx, ecx
je 0x1401244a6
dec ecx
mov rdx, rsi
call fcn.14014a9a4
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x18], 0
add rsp, 0x20
pop rsi
ret
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x1401243f5
xor eax, eax
add rsp, 0x20
pop rsi
ret
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
jmp 0x14012445b
mov ecx, 8
mov edx, 0x20
call sym.alloc::alloc::handle_alloc_error::hc580476980f9927e
int3
Function at 0x140127b50
Capabilities:
Read file via mapping

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x88
mov rax, r8
mov rsi, rcx
mov dword [rsp + 0x40], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov dword [rsp + 0x58], 7
mov qword [rsp + 0x5c], 0
mov word [rsp + 0x64], 0
mov byte [rsp + 0x60], 1
lea r8, [rsp + 0x40]
mov rcx, rdx
mov rdx, rax
call sym.std::sys::windows::fs::File::open::hb1a2d50cc7a4d6dd
mov rdi, rdx
test rax, rax
je 0x140127bbf
mov rcx, rdi
call sym.core::ptr::drop_in_place_std::io::error::Error_::he1a1f231b7e07eb9
mov qword [rsi], 0
jmp 0x140127ceb
lea rcx, [rsp + 0x40]
mov rdx, rdi
call sym.std::sys::windows::fs::File::file_attr::h82ab68ec0f8c7faa
cmp dword [rsp + 0x40], 2
jne 0x140127bfc
mov rcx, qword [rsp + 0x48]
call sym.core::ptr::drop_in_place_std::io::error::Error_::he1a1f231b7e07eb9
mov qword [rsi], 0
mov rcx, rdi
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp fcn.14014ac64
mov r12, qword [rsp + 0x78]
test rdi, rdi
je 0x140127c4e
mov qword [rsp + 0x40], 0
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov rcx, rax
mov rdx, rdi
mov r8, rax
call sub.KERNEL32.dll_DuplicateHandle
test eax, eax
je 0x140127cca
mov rbx, qword [rsp + 0x40]
jmp 0x140127c50
xor ebx, ebx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rbx
xor edx, edx
mov r8d, 2
xor r9d, r9d
call sub.KERNEL32.dll_CreateFileMappingA
test rax, rax
je 0x140127cb9
mov r14, rax
mov qword [rsp + 0x20], r12
mov rcx, rax
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call sub.KERNEL32.dll_MapViewOfFile
mov r15, rax
mov rcx, r14
call fcn.14014ac64
test r15, r15
je 0x140127cb9
mov qword [rsi + 8], rbx
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r12
mov qword [rsi], 1
jmp 0x140127ce3
mov qword [rsi], 0
mov rcx, rbx
call fcn.14014ac64
jmp 0x140127ce3
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
lea rcx, [rax + 2]
call sym.core::ptr::drop_in_place_std::io::error::Error_::he1a1f231b7e07eb9
mov qword [rsi], 0
mov rcx, rdi
call fcn.14014ac64
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x1401437c0
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x14032f678]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtReadFile
cmp eax, 0x103
jne 0x14014382a
mov rcx, rdi
mov edx, 0xffffffff
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0xc0000011
jne 0x140143839
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x140143870
cmp eax, 0x103
je 0x14014387a
test eax, eax
js 0x140143856
mov rax, qword [rsp + 0x68]
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
shl rax, 0x20
loopne 0x140143881
mov dword [rsp + 0x58], 0
mov byte [rsp + 0x5c], 0
pop rsp
add byte [rax - 0x73], cl
add eax, 0x1ebe4a
Function at 0x140143a90
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x500
movaps xmmword [rsp + 0x4f0], xmm6
mov rbx, rdx
mov rsi, rcx
mov eax, dword [rdx + 0x10]
movq xmm6, qword [rdx + 0x40]
movzx ebp, word [rdx + 0x44]
mov dword [rdx + 0x10], 0
cmp eax, 1
jne 0x140143af0
mov r14, qword [rbx]
movd eax, xmm6
cmp ax, 0x2e
jne 0x140143bd4
pextrw eax, xmm6, 1
test eax, eax
je 0x140143af0
cmp ax, 0x2e
jne 0x140143bd4
test bp, bp
jne 0x140143bd4
lea r14, [rsp + 0x80]
mov r8d, 0x250
mov rcx, r14
xor edx, edx
call sub.msvcrt.dll_memset
mov rdi, qword [rbx + 8]
mov rcx, rdi
mov rdx, r14
call sub.KERNEL32.dll_FindNextFileW
test eax, eax
je 0x140143bba
mov r14, qword [rbx]
lea rbx, [rsp + 0x80]
jmp 0x140143b3f
mov rcx, rdi
mov rdx, rbx
call sub.KERNEL32.dll_FindNextFileW
test eax, eax
je 0x140143bba
cmp word [rsp + 0xac], 0x2e
jne 0x140143b68
movzx eax, word [rsp + 0xae]
test ax, ax
je 0x140143b30
cmp ax, 0x2e
jne 0x140143b68
cmp word [rsp + 0xb0], 0
je 0x140143b30
lock inc qword [r14]
jle 0x140143cbb
mov rdi, qword [rsp + 0x80]
movups xmm0, xmmword [rsp + 0x88]
movaps xmmword [rsp + 0x20], xmm0
movups xmm0, xmmword [rsp + 0x98]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rsp + 0xa8]
mov dword [rsp + 0x40], eax
movd xmm6, dword [rsp + 0xac]
movzx ebp, word [rsp + 0xb0]
lea rdx, [rsp + 0xb2]
jmp 0x140143bff
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x12
jne 0x140143c4b
mov qword [rsi], 0
jmp 0x140143ca5
lock inc qword [r14]
jle 0x140143cbb
lea rdx, [rbx + 0x46]
mov rdi, qword [rbx + 0x14]
mov eax, dword [rbx + 0x3c]
mov dword [rsp + 0x40], eax
movups xmm0, xmmword [rbx + 0x2c]
movaps xmmword [rsp + 0x30], xmm0
movups xmm0, xmmword [rbx + 0x1c]
movaps xmmword [rsp + 0x20], xmm0
lea rcx, [rsp + 0x2d2]
mov r8d, 0x21e
call sym.memcpy
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x70], eax
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x60], xmm1
movaps xmmword [rsp + 0x50], xmm0
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x2d2]
mov r8d, 0x21e
call sym.memcpy
jmp 0x140143c5d
call sub.KERNEL32.dll_GetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
xor r14d, r14d
mov qword [rsi + 8], r14
mov qword [rsi + 0x10], rdi
movaps xmm0, xmmword [rsp + 0x50]
movaps xmm1, xmmword [rsp + 0x60]
movups xmmword [rsi + 0x18], xmm0
movups xmmword [rsi + 0x28], xmm1
mov eax, dword [rsp + 0x70]
mov dword [rsi + 0x38], eax
movd dword [rsi + 0x3c], xmm6
mov word [rsi + 0x40], bp
lea rcx, [rsi + 0x42]
lea rdx, [rsp + 0x80]
mov r8d, 0x21e
call sym.memcpy
mov qword [rsi], 1
movaps xmm6, xmmword [rsp + 0x4f0]
add rsp, 0x500
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
ud2
Function at 0x1401455c0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
sub rsp, 0x80
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
mov edx, 0x10
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x1401455f6
mov rax, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
add rsp, 0x80
pop rsi
ret
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x28]
mov qword [rsp + 0x40], rax
lea rax, [sym.__std::io::error::Error_as_core::fmt::Display_::fmt::h0ae59b4b5a93ace0]
mov qword [rsp + 0x48], rax
lea rax, str.fallback_RNG_broken:
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rsp + 0x50]
call sym.core::panicking::panic_fmt::hc685bd5fdf74c15e
ud2
Function at 0x14014a330
Capabilities:
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x30
mov ecx, dword [0x1402b7128]
test ecx, ecx
je 0x14014a35d
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x14014a376
cmp qword [rax + 8], 0
je 0x14014a376
add rax, 0x10
add rsp, 0x30
pop rsi
ret
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x14014a34c
mov ecx, dword [0x1402b7128]
test ecx, ecx
je 0x14014a45d
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x14014a47a
mov rsi, rax
test rax, rax
jne 0x14014a40b
movzx eax, byte [0x140361100]
mov rcx, qword [0x1403610c8]
test rcx, rcx
jne 0x14014a3c8
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x14014a495
mov rcx, rax
mov qword [0x1403610c8], rax
mov r8d, 0x20
xor edx, edx
call fcn.14014aadc
test rax, rax
je 0x14014a495
mov rsi, rax
lea rax, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1402b7128]
test ecx, ecx
je 0x14014a482
dec ecx
mov rdx, rsi
call fcn.14014a9a4
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x10
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
js 0x14014a43b
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
jmp 0x14014a443
call sym.std::sys::windows::rand::fallback_rng::h848a634495d0b4a3
mov rcx, rax
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], rcx
mov qword [rsi + 0x18], rdx
add rsp, 0x30
pop rsi
ret
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x14014a395
xor eax, eax
add rsp, 0x30
pop rsi
ret
lea rcx, sym.std::sys::common::thread_local::os_local::destroy_value::h09bb1f25f6aed612
call sym.std::sys::windows::thread_local_key::StaticKey::init::h6a94beccf240c3a3
mov ecx, eax
jmp 0x14014a403
mov ecx, 8
mov edx, 0x20
call sym.alloc::alloc::handle_alloc_error::hc580476980f9927e
int3

Function at 0x14014b8b0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x14014b920
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x140361194]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x14014bad0
mov rax, qword [0x140361198]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14014b96c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x14014b9f7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x14014b950
mov rcx, r12
call sym.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x14014bb2d
mov rax, qword [0x140361198]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x140361198]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14014bb12
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14014b9f0
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14014ba80
add dword [0x140361194], 1
cmp ebx, 8
jae 0x14014ba28
test bl, 4
jne 0x14014bae0
test ebx, ebx
je 0x14014ba19
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x14014bb00
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x14014ba19
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x14014ba5a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x140361198]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14014b9f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
xor edi, edi
jmp 0x14014b977
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x14014ba19
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x14014ba19
mov rax, qword [0x140361198]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call sym.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
nop
nop dword [rax]
Function at 0x14014c040
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140361200]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1403611e0]
test rbx, rbx
je 0x14014c094
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x14014c08b
test r12, r12
je 0x14014c08b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14014c070
lea rcx, [0x140361200]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x14014c2c0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x14014c2d0
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x14014c2e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x14014c325
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x14014c31c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x14014c327
add rax, 0x28
cmp rax, r9
jne 0x14014c308
xor eax, eax
ret

Function at 0x14014c3d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x14033df80]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x14014c449
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14014c449
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x14014c446
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x14014c43d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x14014c449
add r8, 0x28
cmp r8, r9
jne 0x14014c428
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x14014c530
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x14033df80]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x14014c59f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14014c59f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x14014c59d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14014c594
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14014c5a8
add rax, 0x28
cmp rax, r9
jne 0x14014c580
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x14014c5c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x14033df80]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x14014c638
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14014c638
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x14014c638
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x14014c638
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x14014c62c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x14014c640
add rdx, 0x28
cmp rdx, r10
jne 0x14014c618
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x14014c650
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x14014c65e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14014c635
test r8d, r8d
jg 0x14014c648
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x140151e90
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [0x140341b40]
mov rdi, qword [rcx + 0xa8]
mov r14, qword [rcx + 0x10]
mov r12, qword [rcx]
mov rsi, rcx
test rdi, rdi
jne 0x140151faa
jmp 0x140152000
sub eax, 1
mov byte [rsi + 0x1f], al
movzx eax, al
mov r13d, dword [rsi + rax*4 + 0xe8]
movsxd rax, dword [r14 + 0x90]
lea r8d, [rbx + 2]
lea r9d, [rax + 7]
cmp eax, dword [r14 + 0x94]
jge 0x140151fe0
lea ecx, [rax + 1]
movd xmm0, r8d
movd xmm1, r9d
mov dword [r14 + 0x90], ecx
lea rcx, [rax + rax*2]
punpckldq xmm0, xmm1
mov rax, qword [r14 + 0x88]
lea rax, [rax + rcx*8]
mov dword [rax + 0xc], ebx
mov qword [rax + 0x10], 0
mov dword [rax], 0x37
movq qword [rax + 4], xmm0
mov rax, qword [r15 + 0x18]
mov rcx, rsi
mov r9d, 0x71
mov r8, qword [rax + 0x68]
call sym.sqlite3OpenTable.constprop.0
mov rdx, rbp
mov rcx, r14
call sym.sqlite3VdbeAddOpList.constprop.1
test rax, rax
je 0x140152000
lea edx, [rbx + 1]
sub ebx, 1
mov dword [rax + 0x3c], r13d
mov dword [rax + 4], edx
mov dword [rax + 0x20], edx
mov dword [rax + 0x54], edx
mov edx, 8
mov dword [rax + 0x34], ebx
mov dword [rax + 0x50], r13d
mov word [rax + 0x4a], dx
test r13d, r13d
je 0x140151fa2
movzx eax, byte [rsi + 0x1f]
cmp al, 7
ja 0x140151fa2
lea edx, [rax + 1]
mov byte [rsi + 0x1f], dl
mov dword [rsi + rax*4 + 0xe8], r13d
mov rdi, qword [rdi]
test rdi, rdi
je 0x140152000
movsxd r15, dword [rdi + 0x10]
movzx eax, byte [rsi + 0x1f]
mov ebx, dword [rdi + 0x14]
mov rdx, r15
shl r15, 5
add r15, qword [r12 + 0x20]
test al, al
jne 0x140151ed0
mov eax, dword [rsi + 0x38]
lea r13d, [rax + 1]
mov dword [rsi + 0x38], r13d
jmp 0x140151ee1
mov dword [rsp + 0x20], ebx
mov edx, 0x37
mov rcx, r14
call sym.growOp3
mov edx, dword [rdi + 0x10]
jmp 0x140151f3a
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret