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

Disassembly:
push rsi
sub rsp, 0x40
mov ecx, dword [0x100370a0]
test ecx, ecx
je 0x10012a62
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x100129a0
cmp qword [rax + 8], 0
je 0x100129a0
add rax, 0x10
jmp 0x10012a5c
mov ecx, dword [0x100370a0]
test ecx, ecx
je 0x10012a75
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x10012a5a
test rax, rax
jne 0x10012a20
mov qword [rsp + 0x30], 0
lea rax, [0x10037088]
mov qword [rsp + 0x28], rax
movzx eax, byte [0x104ab0c0]
mov edx, 0x18
xor ecx, ecx
call fcn.100316a0
test rax, rax
je 0x10012aa1
mov rcx, qword [rsp + 0x38]
mov qword [rax + 0x10], rcx
movups xmm0, xmmword [rsp + 0x28]
movups xmmword [rax], xmm0
mov ecx, dword [0x100370a0]
test ecx, ecx
je 0x10012a88
dec ecx
mov rdx, rax
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rax, rsi
mov rdx, rax
add rax, 0x10
mov rcx, qword [rdx + 0x10]
cmp qword [rdx + 8], 0
mov qword [rdx + 8], 1
mov qword [rdx + 0x10], 0
je 0x10012a5c
test rcx, rcx
je 0x10012a5c
lock dec qword [rcx]
jne 0x10012a5c
mov rsi, rax
call fcn.10012ad0
mov rax, rsi
jmp 0x10012a5c
xor eax, eax
add rsp, 0x40
pop rsi
ret
lea rcx, [0x10037088]
call fcn.10012b80
mov ecx, eax
jmp 0x10012985
lea rcx, [0x10037088]
call fcn.10012b80
mov ecx, eax
jmp 0x100129b0
lea rcx, [0x10037088]
mov rsi, rax
call fcn.10012b80
mov ecx, eax
mov rax, rsi
jmp 0x10012a12
mov ecx, 8
mov edx, 0x18
call fcn.100045d0
ud2
Function at 0x10012b80
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rsi, rcx
cmp qword [rcx], 0
je 0x10012c10
mov rax, qword [0x104ae030]
mov dword [rsp + 0x2c], 0
lea rdi, [rsi + 0x10]
lea r8, [rsp + 0x2c]
mov rcx, rdi
xor edx, edx
xor r9d, r9d
call sub.KERNEL32.dll_InitOnceBeginInitialize
mov dword [rsp + 0x28], eax
cmp eax, 1
jne 0x10012c51
cmp dword [rsp + 0x2c], 0
je 0x10012c35
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x10012c69
mov ebx, eax
inc eax
mov dword [rsi + 0x18], eax
mov rax, qword [0x104ab0b8]
nop dword [rax]
mov qword [rsi + 8], rax
lock cmpxchg qword [0x104ab0b8], rsi
jne 0x10012bf0
mov rcx, rdi
xor edx, edx
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
mov eax, ebx
jmp 0x10012c49
call sub.KERNEL32.dll_TlsAlloc
mov dword [rsp + 0x28], eax
cmp eax, 0xffffffff
je 0x10012cb3
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x10012c3a
mov eax, dword [rsp + 0x28]
jmp 0x10012c49
mov eax, dword [rsi + 0x18]
jmp 0x10012c47
mov ecx, dword [rsp + 0x28]
mov esi, eax
call sub.KERNEL32.dll_TlsFree
mov eax, esi
dec eax
add rsp, 0x60
pop rbx
pop rdi
pop rsi
ret
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call fcn.10012d10
mov rcx, rdi
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, [0x104a50f0]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rdx, str.library_std_src_syspalwindows_thread_local_key.rs
lea rcx, [rsp + 0x30]
call fcn.10004d90
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, [0x104a50f0]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call fcn.10012d60
int3
Function at 0x10013140
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x50
mov rax, qword [rcx]
cmp byte [rax], 0
mov byte [rax], 0
je 0x100133a0
mov byte [rsp + 0x2f], 0
mov rax, qword [0x104ab038]
cmp rax, 3
jne 0x10013173
cmp byte [rsp + 0x2f], 0
je 0x10013184
add rsp, 0x50
pop rsi
ret
lea rcx, [rsp + 0x2f]
call fcn.10013430
cmp byte [rsp + 0x2f], 0
jne 0x1001316d
mov ecx, dword [0x100370c0]
test ecx, ecx
je 0x10013361
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x100131a9
cmp byte [rax + 8], 0
jne 0x10013240
mov ecx, dword [0x100370c0]
test ecx, ecx
je 0x10013374
dec ecx
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x100131f2
cmp rax, 1
jne 0x1001323a
lea rax, [0x104a3b78]
mov qword [rsp + 0x20], rax
lea rcx, str.cannot_access_a_Thread_Local_Storage_value_during_or_after_destructionlibrary_std_src_threadlocal.rs
lea r9, [0x104a30b0]
lea r8, [rsp + 0x30]
mov edx, 0x46
call fcn.10006a00
movzx eax, byte [0x104ab0c0]
mov edx, 0x10
xor ecx, ecx
call fcn.100316a0
test rax, rax
je 0x100133b3
lea rcx, [0x100370a8]
mov qword [rax], rcx
mov byte [rax + 8], 0
mov ecx, dword [0x100370c0]
test ecx, ecx
je 0x10013387
dec ecx
mov rdx, rax
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rax, rsi
mov word [rax + 8], 1
add rax, 9
mov rcx, qword [0x104ab040]
cmp rcx, rax
jne 0x10013260
mov eax, dword [0x104ab048]
inc eax
je 0x1001316d
jmp 0x10013281
mov rcx, rax
mov dl, 1
xor eax, eax
lock cmpxchg byte [0x104ab04c], dl
jne 0x1001316d
mov qword [0x104ab040], rcx
mov eax, 1
mov dword [0x104ab048], eax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 1
mov qword [rsp + 0x40], 0
mov byte [rsp + 0x48], 0
mov byte [rsp + 0x4d], 0
mov dword [rsp + 0x49], 0
cmp qword [0x104ab050], 0
jne 0x100133ac
mov qword [0x104ab050], 0xffffffffffffffff
cmp byte [0x104ab070], 0
jne 0x100132ef
lea rcx, [0x104ab058]
call fcn.10013540
test rax, rax
je 0x100132ef
mov rcx, rax
call fcn.100136d0
cmp qword [0x104ab058], 0
je 0x1001330a
mov rcx, qword [0x104ab060]
mov edx, 1
call fcn.100043b0
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [0x104ab068], xmm1
movups xmmword [0x104ab058], xmm0
inc qword [0x104ab050]
dec dword [0x104ab048]
jne 0x1001316d
mov qword [0x104ab040], 0
xor eax, eax
xchg byte [0x104ab04c], al
cmp al, 2
jne 0x1001316d
lea rcx, [0x104ab04c]
call sub.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle
jmp 0x1001316d
lea rcx, [0x100370a8]
call fcn.10012b80
mov ecx, eax
jmp 0x10013194
lea rcx, [0x100370a8]
call fcn.10012b80
mov ecx, eax
jmp 0x100131b9
lea rcx, [0x100370a8]
mov rsi, rax
call fcn.10012b80
mov ecx, eax
mov rax, rsi
jmp 0x1001322c
lea rcx, str.library_std_src_synconce.rs
call fcn.10006c60
call fcn.10006220
ud2
mov ecx, 8
mov edx, 0x10
call fcn.100045d0
mov rsi, rax
cmp qword [0x104ab058], 0
je 0x100133e0
mov rcx, qword [0x104ab060]
mov edx, 1
call fcn.100043b0
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [0x104ab068], xmm1
movups xmmword [0x104ab058], xmm0
inc qword [0x104ab050]
jmp 0x1001340e
call fcn.100134a0
mov rcx, rsi
call fcn.10035db0
call fcn.10007070
int3
Function at 0x100140a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x10037080]
test ecx, ecx
je 0x1001415d
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x100140d0
cmp qword [rax + 8], 0
je 0x100140d0
add rax, 0x10
jmp 0x10014157
mov ecx, dword [0x10037080]
test ecx, ecx
je 0x10014170
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x10014155
test rax, rax
jne 0x10014138
movzx eax, byte [0x104ab0c0]
mov edx, 0x20
xor ecx, ecx
call fcn.100316a0
test rax, rax
je 0x10014199
lea rcx, [0x10037068]
mov qword [rax], rcx
mov qword [rax + 8], 0
mov ecx, dword [0x10037080]
test ecx, ecx
je 0x10014183
dec ecx
mov rdx, rax
mov rsi, rax
call sub.KERNEL32.dll_TlsSetValue
mov rax, rsi
mov qword [rax + 8], 1
mov rcx, rax
add rax, 0x10
mov qword [rcx + 0x10], 0
mov byte [rcx + 0x18], 0
jmp 0x10014157
xor eax, eax
add rsp, 0x20
pop rsi
ret
lea rcx, [0x10037068]
call fcn.10012b80
mov ecx, eax
jmp 0x100140b5
lea rcx, [0x10037068]
call fcn.10012b80
mov ecx, eax
jmp 0x100140e0
lea rcx, [0x10037068]
mov rsi, rax
call fcn.10012b80
mov ecx, eax
mov rax, rsi
jmp 0x1001412a
mov ecx, 8
mov edx, 0x20
call fcn.100045d0
int3

Function at 0x100176f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
movzx r9d, byte [rdx + 0x38]
cmp r9b, 1
ja 0x1001776c
movzx r8d, byte [rdx + 0x3a]
test r8b, r8b
jne 0x10017745
movzx esi, byte [rdx + 0x10]
lea eax, [rsi - 5]
cmp al, 1
ja 0x10017745
mov r10, qword [rdx]
mov rax, qword [rdx + 8]
xor r11d, r11d
test r9b, r9b
jne 0x1001773c
cmp sil, 6
je 0x1001773c
mov r11d, 2
cmp rax, 1
jbe 0x1001792d
cmp r11, rax
jne 0x10017879
xor eax, eax
xor r8d, r8d
xor eax, eax
add rax, r10
lea rsi, [r10 + r11]
inc rsi
cmp rsi, rax
sete al
movzx r10d, byte [r10 + r11]
test al, 1
jne 0x10017902
cmp r10b, 0x2e
Function at 0x10036450
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 fcn.10036f40
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.10036f40
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x100364c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x104ab114]
mov r12, rcx
test ebx, ebx
jle 0x100365f0
mov rax, qword [0x104ab118]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x1003650c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x10036593
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x100364f0
mov rcx, r12
call fcn.10036c50
mov rsi, rax
test rax, rax
je 0x10036612
mov rax, qword [0x104ab118]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.10036d80
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x104ab118]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x100365f7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1003658c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x100365a0
add dword [0x104ab114], 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 [0x104ab118]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1003658c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.10036450
nop dword [rax]
xor ebx, ebx
jmp 0x10036517
mov rax, qword [0x104ab118]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.10036450
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.10036450
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x100368c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x104ab140]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x104ab120]
test rbx, rbx
je 0x10036914
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 0x1003690b
test r12, r12
je 0x1003690b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x100368f0
lea rcx, [0x104ab140]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x10036c50
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x104a5460]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x10036c70
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x10036c78
ret
cmp word [r8 + 0x18], 0x20b
jne 0x10036c70
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x10036cc5
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 0x10036cbc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x10036c70
add rax, 0x28
cmp rax, r9
jne 0x10036ca8
xor eax, eax
ret

Function at 0x10036cd0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x104a5460]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x10036cf0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x10036cf8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x10036cf0
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x10036d80
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x104a5460]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x10036da0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x10036da8
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x1406e73c8
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1406e754f
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1406e73f9
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406e73df
add dl, dl
jne 0x1406e7406
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406e7466
xor eax, eax
add dl, dl
jne 0x1406e7415
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406e751d
add dl, dl
jne 0x1406e7426
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406e7433
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406e7440
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406e744d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1406e745a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1406e73ee
mov eax, 1
add dl, dl
jne 0x1406e7476
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406e7483
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406e746b
sub eax, ebx
mov ebx, 1
jne 0x1406e74bc
mov ecx, 1
add dl, dl
jne 0x1406e749e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1406e74ab
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406e7493
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406e73ee
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1406e74d8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1406e74e5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406e74cd
cmp eax, 0x7d00
jae 0x1406e750b
cmp eax, 0x500
jb 0x1406e7506
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406e73ee
cmp eax, 0x7f
ja 0x1406e750e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406e73ee
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1406e7542
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1406e73ee
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001450
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x30
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
mov ecx, dword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rsp + 0x20], 0x40
xor r14d, r14d
mov rcx, 0xffffffffffffffff
xor edx, edx
mov r8, rdi
mov r9d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test rax, rax
je 0x1400014db
mov r15, rax
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov rcx, 0xffffffffffffffff
mov rdx, r15
mov r8, rbx
mov r9, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400014d8
mov qword [rsi], 0
call r15
mov r14, rax
jmp 0x1400014db
xor r14d, r14d
mov rax, r14
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x1400014f0
Capabilities:
Check for outputdebugstring error
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x140001583
call fcn.1400a02f0
cmp byte [rax + 2], 0
jne 0x140001583
test byte [rax + 0xbc], 0x70
jne 0x140001583
call fcn.1400a08b0
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x1400a4508]
mov edx, dword [rax]
mov rax, qword [0x1400a4510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x1400a4500]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001450
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.1400a12a0
nop
add rsp, 0x20
pop rbp
jmp 0x1400014f0

Function at 0x140001590
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x140001583
call fcn.1400a02f0
cmp byte [rax + 2], 0
jne 0x140001583
test byte [rax + 0xbc], 0x70
jne 0x140001583
call fcn.1400a08b0
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x1400a4508]
mov edx, dword [rax]
mov rax, qword [0x1400a4510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x1400a4500]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001450
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.1400a12a0
nop
add rsp, 0x20
pop rbp
jmp 0x1400014f0

Function at 0x1400a0300
Capabilities:
Access peb ldr_data

Disassembly:
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x20]
ret
Function at 0x1400a0e00
Capabilities:
Allocate or change rwx memory

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rdx
mov rdi, rcx
movsxd r13, dword [rcx + 0x3c]
mov ebx, dword [rcx + r13 + 0x54]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x1400a0e6a
lea r9, [rsp + 0x20]
mov rcx, rsi
mov rdx, rbx
mov r8d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400a0e6a
mov rcx, rsi
mov rdx, rdi
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rcx, rsi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movzx eax, word [rdi + r13 + 6]
test ax, ax
je 0x1400a0f0d
movsxd rcx, dword [rdi + 0x3c]
lea rbp, [rcx + rdi]
add rbp, 0x110
xor ebx, ebx
jmp 0x1400a0ea5
movzx eax, word [rdi + r13 + 6]
inc rbx
movzx ecx, ax
add rbp, 0x28
cmp rbx, rcx
jae 0x1400a0f0d
cmp dword [rbp + 0x1c], 0
js 0x1400a0e96
mov r14d, dword [rbp]
mov r15d, dword [rbp + 4]
lea r12, [rdi + r15]
add r15, rsi
mov rcx, r12
mov rdx, r15
mov r8, r14
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x1400a0e90
mov rcx, r15
mov rdx, r14
mov r8d, 0x40
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400a0e90
mov rcx, r15
mov rdx, r12
mov r8, r14
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x24]
mov rcx, r15
mov rdx, r14
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1400a0e90
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1400a0f90
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
test rcx, rcx
je 0x1400a1164
mov r14, rdx
mov rbx, rcx
movsxd rcx, dword [rcx + 0x3c]
mov r15d, dword [rcx + rbx + 0x88]
mov r13d, dword [r15 + rbx + 0x1c]
add r13, rbx
mov rax, rdx
shr rax, 0x10
test ax, ax
je 0x1400a1024
mov ebp, dword [rbx + r15 + 0x18]
test ebp, ebp
je 0x1400a1164
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], r8
mov r12d, dword [rbx + r15 + 0x20]
mov esi, dword [rbx + r15 + 0x24]
add r12, rbx
add rsi, rbx
xor edi, edi
nop dword [rax + rax]
mov ecx, dword [r12]
add rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x1400a103a
add r12, 4
add rsi, 2
dec ebp
jne 0x1400a1000
jmp 0x1400a116b
movzx eax, r14w
mov ecx, dword [rbx + r15 + 0x10]
sub rax, rcx
mov edi, dword [r13 + rax*4]
jmp 0x1400a1168
movzx eax, word [rsi]
mov edi, dword [r13 + rax*4]
cmp r15d, edi
ja 0x1400a1168
mov rax, qword [rsp + 0x38]
add r15d, dword [rbx + rax + 0x8c]
cmp edi, r15d
jae 0x1400a1168
add rdi, rbx
mov rcx, rdi
mov edx, 0x2e
call sub.msvcrt.dll_strchr
mov rbx, rax
inc rbx
mov rsi, rbx
sub rsi, rdi
lea rcx, [rsi + 4]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1400a1164
mov r14, rax
lea r8, [rsi + 1]
mov qword [rsp + 0x20], rsi
xor ecx, ecx
mov rdx, rax
mov r9, rdi
call qword [sym.imp.msvcrt.dll_mbstowcs_s]
mov dword [r14 + rsi*2], 0x6c0064
mov word [r14 + rsi*2 + 4], 0x6c
lea rdx, [0x1400a4002]
mov r8d, 4
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x1400a10f2
lea rdx, str.ext_
mov r8d, 4
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x1400a1140
lea r8, [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rdx, r14
call fcn.1400a0320
test rax, rax
je 0x1400a1140
mov rsi, rax
mov rcx, r14
call sub.msvcrt.dll_free
mov rdi, qword [rsp + 0x40]
lea rcx, [rdi + 1]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1400a1164
mov r14, rax
add rdi, rdi
mov rcx, rax
mov rdx, rsi
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov rdx, rbx
mov r8, r14
call fcn.1400a0f90
mov rdi, rax
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x1400a116b
xor edi, edi
jmp 0x1400a116b
add rdi, rbx
mov rax, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x1400a14b0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 fcn.1400a2320
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.1400a2320
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]