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

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
movzx eax, byte [0x140186130]
test al, al
je 0x140020eaf
test edx, edx
je 0x140020d37
cmp edx, 3
jne 0x140020eaf
mov rbx, qword [0x140186138]
test rbx, rbx
je 0x140020eaf
xor r14d, r14d
jmp 0x140020d59
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140020d8d
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140020efa
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140020d50
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.140047e34
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140020d50
test r14b, 1
je 0x140020eaf
mov rbx, qword [0x140186138]
test rbx, rbx
je 0x140020eaf
xor r14d, r14d
jmp 0x140020db9
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140020ded
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140020efa
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140020db0
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.140047e34
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140020db0
test r14b, 1
je 0x140020eaf
mov rbx, qword [0x140186138]
test rbx, rbx
je 0x140020eaf
xor r14d, r14d
jmp 0x140020e19
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140020e4d
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140020efa
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140020e10
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.140047e34
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140020e10
test r14b, 1
je 0x140020eaf
mov rbx, qword [0x140186138]
test rbx, rbx
je 0x140020eaf
xor r14d, r14d
jmp 0x140020e79
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140020ea9
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140020efa
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140020e70
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.140047e34
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140020e70
test r14b, 1
jne 0x140020ebb
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov rbx, qword [0x140186138]
jmp 0x140020ec8
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140020eaf
mov esi, dword [rbx + 0x18]
mov r14, qword [rbx]
test r14, r14
je 0x140020efa
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140020ec4
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.140047e34
mov rcx, rdi
call r14
jmp 0x140020ec4
lea rcx, str.called__Option::unwrap____on_a__None__value_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112librarycore_srcio_borrowed_buf.rs_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
lea r8, str.library_std_src_syswindows_thread_local_key.rs
mov edx, 0x2b
call dbg.panic
ud2
Function at 0x140021c60
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rsi, rcx
cmp qword [rcx], 0
je 0x140021ce5
mov dword [rsp + 0x2c], 0
lea rbx, [rsi + 0x10]
lea r8, [rsp + 0x2c]
mov rcx, rbx
xor edx, edx
xor r9d, r9d
call sub.KERNEL32.dll_InitOnceBeginInitialize
mov dword [rsp + 0x28], eax
cmp eax, 1
jne 0x140021d26
cmp dword [rsp + 0x2c], 0
je 0x140021d0a
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x140021d40
mov edi, eax
inc eax
mov dword [rsi + 0x18], eax
mov rax, qword [0x140186138]
nop
mov qword [rsi + 8], rax
lock cmpxchg qword [0x140186138], rsi
jne 0x140021cc0
mov byte [0x140186130], 1
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x140021d1c
call sub.KERNEL32.dll_TlsAlloc
mov dword [rsp + 0x28], eax
cmp eax, 0xffffffff
je 0x140021d8c
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x140021d0f
mov edi, dword [rsp + 0x28]
jmp 0x140021d1c
mov edi, dword [rsi + 0x18]
jmp 0x140021d1a
mov edi, eax
mov ecx, dword [rsp + 0x28]
call sub.KERNEL32.dll_TlsFree
dec edi
mov eax, edi
add rsp, 0x60
pop rbx
pop rdi
pop rsi
ret
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call dbg.assert_failed<i32, i32>
ud2
mov rcx, rbx
mov edx, 4
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, str.called__Option::unwrap____on_a__None__value_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112librarycore_srcio_borrowed_buf.rs_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rdx, str.library_std_src_syswindows_thread_local_key.rs
lea rcx, [rsp + 0x30]
call dbg.panic_fmt
ud2
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, str.called__Option::unwrap____on_a__None__value_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112librarycore_srcio_borrowed_buf.rs_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call dbg.assert_failed<u32, u32>
ud2
Function at 0x1400220b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x1400650a0]
test ecx, ecx
je 0x1400220e0
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x1400220f9
mov rdi, rax
cmp qword [rax + 8], 0
je 0x1400220f9
add rdi, 0x10
jmp 0x1400221da
lea rcx, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x1400220cd
mov ecx, dword [0x1400650a0]
test ecx, ecx
je 0x1400221bb
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x1400221d8
mov rsi, rax
test rax, rax
jne 0x14002218a
movzx eax, byte [0x140186040]
mov rcx, qword [0x140186128]
test rcx, rcx
jne 0x14002214b
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x1400221f4
mov rcx, rax
mov qword [0x140186128], rax
mov r8d, 0x18
xor edx, edx
call fcn.140047ee4
test rax, rax
je 0x1400221f4
mov rsi, rax
lea rax, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1400650a0]
test ecx, ecx
je 0x1400221e4
dec ecx
mov rdx, rsi
call fcn.140047e34
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 0x1400221da
test rcx, rcx
je 0x1400221da
lock dec qword [rcx]
jne 0x1400221da
call dbg.drop_slow<std::thread::Inner, alloc::alloc::Global>
jmp 0x1400221da
lea rcx, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x140022118
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
call dbg.init
mov ecx, eax
jmp 0x140022182
mov ecx, 8
mov edx, 0x18
call dbg.handle_alloc_error
ud2

Function at 0x1400224e0
Capabilities:
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x68
mov rsi, rcx
mov rdi, qword [rcx]
mov ecx, dword [rdi + 0x18]
test ecx, ecx
je 0x140022508
dec ecx
mov edx, 1
call fcn.140047e34
cmp qword [rsi + 8], 0
jne 0x140022523
jmp 0x14002253b
mov rcx, rdi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.140047e34
cmp qword [rsi + 8], 0
je 0x14002253b
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x14002253b
lock dec qword [rax]
jne 0x14002253b
mov rcx, qword [rsi + 0x10]
call dbg.drop_slow<std::thread::Inner, alloc::alloc::Global>
mov rcx, qword [0x140186128]
xor edx, edx
mov r8, rsi
call fcn.140047edc
mov ecx, dword [rdi + 0x18]
test ecx, ecx
je 0x140022557
dec ecx
jmp 0x140022561
mov rcx, rdi
call dbg.init
mov ecx, eax
xor edx, edx
add rsp, 0x68
pop rdi
pop rsi
jmp fcn.140047e34
Function at 0x140022c50
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x1400650c0]
test ecx, ecx
je 0x140022d16
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140022c7d
mov rsi, rax
cmp byte [rax + 8], 0
jne 0x140022d10
mov ecx, dword [0x1400650c0]
test ecx, ecx
je 0x140022d38
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140022d55
mov rsi, rax
test rax, rax
jne 0x140022d0a
movzx eax, byte [0x140186040]
mov rcx, qword [0x140186128]
test rcx, rcx
jne 0x140022ccf
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x140022d70
mov rcx, rax
mov qword [0x140186128], rax
mov r8d, 0x10
xor edx, edx
call fcn.140047ee4
test rax, rax
je 0x140022d70
mov rsi, rax
lea rax, dbg.destroy_value_core::cell::Cell__usize__bool___
mov qword [rsi], rax
mov byte [rsi + 8], 0
mov ecx, dword [0x1400650c0]
test ecx, ecx
je 0x140022d60
dec ecx
mov rdx, rsi
call fcn.140047e34
mov word [rsi + 8], 1
add rsi, 9
jmp 0x140022d57
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x140022c70
jmp 0x140022c7d
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x140022c9c
xor esi, esi
mov rax, rsi
add rsp, 0x20
pop rsi
ret
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
jmp 0x140022d02
mov ecx, 8
mov edx, 0x10
call dbg.handle_alloc_error
ud2

Function at 0x140023300
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x14006d5f8]
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_NtWriteFile
cmp eax, 0x103
jne 0x140023371
mov rcx, rdi
mov edx, 0xffffffff
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x1400233a7
test eax, eax
js 0x140023382
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x14002339a
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
add rsp, 0xa8
pop rdi
pop rsi
ret
mov dword [rsp + 0x58], 0
mov byte [rsp + 0x5c], 0
lea rax, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call sym.std::io::Write::write_fmt::h9c6f8a47e53199c5
mov rcx, rax
call sym.core::ptr::drop_in_place_core::result::Result____std::io::error::Error__::h0f798feb3c43cb64
mov ecx, 7
int 0x29
ud2
Function at 0x140023c50
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x140065080]
test ecx, ecx
je 0x140023c7d
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140023c96
cmp qword [rax + 8], 0
je 0x140023c96
add rax, 0x10
add rsp, 0x20
pop rsi
ret
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x140023c6c
mov ecx, dword [0x140065080]
test ecx, ecx
je 0x140023d41
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140023d5e
mov rsi, rax
test rax, rax
jne 0x140023d23
movzx eax, byte [0x140186040]
mov rcx, qword [0x140186128]
test rcx, rcx
jne 0x140023ce8
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x140023d76
mov rcx, rax
mov qword [0x140186128], rax
mov r8d, 0x20
xor edx, edx
call fcn.140047ee4
test rax, rax
je 0x140023d76
mov rsi, rax
lea rax, dbg.destroy_value_core::cell::Cell__usize__bool___
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140065080]
test ecx, ecx
je 0x140023d66
dec ecx
mov rdx, rsi
call fcn.140047e34
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, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x140023cb5
xor eax, eax
add rsp, 0x20
pop rsi
ret
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
jmp 0x140023d1b
mov ecx, 8
mov edx, 0x20
call dbg.handle_alloc_error
ud2

Function at 0x140023e10
Capabilities:
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x68
mov rsi, rcx
mov rdi, qword [rcx]
mov ecx, dword [rdi + 0x18]
test ecx, ecx
je 0x140023e27
dec ecx
jmp 0x140023e31
mov rcx, rdi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.140047e34
mov rcx, qword [0x140186128]
xor edx, edx
mov r8, rsi
call fcn.140047edc
mov ecx, dword [rdi + 0x18]
test ecx, ecx
je 0x140023e57
dec ecx
jmp 0x140023e61
mov rcx, rdi
call dbg.init
mov ecx, eax
xor edx, edx
add rsp, 0x68
pop rdi
pop rsi
jmp fcn.140047e34
Function at 0x1400270f0
Capabilities:
Read file via mapping

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x98
movaps xmmword [rsp + 0x80], xmm6
mov rax, r8
mov rsi, rcx
mov dword [rsp + 0x40], 0
xorps xmm6, xmm6
movups xmmword [rsp + 0x48], xmm6
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 dbg.open
mov rdi, rdx
test rax, rax
je 0x140027167
mov rcx, rdi
call dbg.drop_in_place<std::io::error::Error>
mov qword [rsi], 0
jmp 0x1400272fa
movaps xmmword [rsp + 0x60], xmm6
movaps xmmword [rsp + 0x50], xmm6
movaps xmmword [rsp + 0x40], xmm6
mov dword [rsp + 0x70], 0
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sub.KERNEL32.dll_GetFileInformationByHandle
test eax, eax
je 0x14002721a
test byte [rsp + 0x41], 4
je 0x1400271bf
mov qword [rsp + 0x78], 0
lea r8, [rsp + 0x78]
mov rcx, rdi
mov edx, 9
mov r9d, 8
call sub.KERNEL32.dll_GetFileInformationByHandleEx
test eax, eax
je 0x14002721a
mov r12d, dword [rsp + 0x60]
mov r15d, dword [rsp + 0x64]
test rdi, rdi
je 0x140027256
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 0x1400272d9
mov rbx, qword [rsp + 0x40]
jmp 0x140027258
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov rcx, rax
call dbg.drop_in_place<std::io::error::Error>
mov qword [rsi], 0
mov rcx, rdi
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp fcn.140047f8c
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 0x1400272c8
mov r14, rax
shl r12, 0x20
or r12, r15
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.140047f8c
test r15, r15
je 0x1400272c8
mov qword [rsi + 8], rbx
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r12
mov qword [rsi], 1
jmp 0x1400272f2
mov qword [rsi], 0
mov rcx, rbx
call fcn.140047f8c
jmp 0x1400272f2
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
lea rcx, [rax + 2]
call dbg.drop_in_place<std::io::error::Error>
mov qword [rsi], 0
mov rcx, rdi
call fcn.140047f8c
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x1400489a0
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 dbg.__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 dbg.__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 0x140048a10
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x140186204]
mov r12, rcx
test ebx, ebx
jle 0x140048b40
mov rax, qword [0x140186208]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x140048a5b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x140048ae5
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x140048a40
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rsi, rax
test rax, rax
je 0x140048b62
mov rax, qword [0x140186208]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140186208]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140048b47
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140048ade
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140048af0
add dword [0x140186204], 1
add rsp, 0x50
pop rbx
pop rsi
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 rbx, qword [0x140186208]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140048ade
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor ebx, ebx
jmp 0x140048a68
mov rax, qword [0x140186208]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400490e0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r13, [0x140186260]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140186240]
test rbx, rbx
je 0x14004913c
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x140049133
test r12, r12
je 0x140049133
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140049118
mov rcx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140049370
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140049388
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140049390
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400493a0
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 0x1400493e5
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 0x1400493dc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x1400493e7
add rax, 0x28
cmp rax, r9
jne 0x1400493c8
xor eax, eax
ret

Function at 0x1400493f0
Capabilities:
Parse pe header

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
call sym.strlen
cmp rax, 8
ja 0x140049480
mov rdx, qword [0x14006f0d0]
xor r12d, r12d
cmp word [rdx], 0x5a4d
jne 0x14004946e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14004946e
cmp word [rax + 0x18], 0x20b
jne 0x14004946e
movzx edx, word [rax + 0x14]
lea r12, [rax + rdx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x140049480
sub eax, 1
lea rax, [rax + rax*4]
lea rsi, [r12 + rax*8 + 0x28]
jmp 0x140049459
add r12, 0x28
cmp r12, rsi
je 0x140049480
mov r8d, 8
mov rdx, rbx
mov rcx, r12
call sym.strncmp
test eax, eax
jne 0x140049450
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
xor r12d, r12d
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret

Function at 0x140049490
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14006f0d0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400494b0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400494b8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400494b0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140049505
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x1400494fc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400494b0
add rax, 0x28
cmp rax, r9
jne 0x1400494e8
xor eax, eax
ret

Function at 0x140049510
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14006f0d0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140049530
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140049538
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x140049530
movzx r8d, word [rax + 6]
mov eax, r8d
ret
Function at 0x140049550
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x14006f0d0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140049570
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140049578
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140049570
movzx eax, word [rdx + 0x14]
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x1400495b8
sub edx, 1
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400495af
test rcx, rcx
je 0x140049570
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400495a0
xor eax, eax
ret

Function at 0x1400495c0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14006f0d0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x1400495e0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x1400495e8
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x140049600
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14006f0d0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140049620
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140049628
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140049620
sub rcx, rdx
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
movzx r8d, word [r8 + 6]
test r8d, r8d
je 0x140049620
lea eax, [r8 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop dword [rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x14004966c
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140049680
add rdx, 0x28
cmp rdx, r9
jne 0x140049658
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x140049690
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x14006f0d0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400496b2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400496c0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400496b2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400496b2
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
movzx r8d, word [r8 + 6]
test r8d, r8d
je 0x1400496b2
sub r8d, 1
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop dword [rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x14004970d
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140049720
add rdx, 0x28
cmp r10, rdx
jne 0x1400496f8
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x14004972f
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x14004973f
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140049716
test ecx, ecx
jg 0x140049728
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret