joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400023d0
Capabilities:
Parse pe header

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

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

Disassembly:
mov rax, qword [0x14006b9c0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140002430
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x140002438
mov eax, r8d
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002430
sub rcx, rax
movzx eax, word [rdx + 0x14]
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x140002430
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 0x140002474
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002488
add rax, 0x28
cmp r9, rax
jne 0x140002460
xor r8d, r8d
mov eax, r8d
ret
mov r8d, dword [rax + 0x24]
not r8d
shr r8d, 0x1f
mov eax, r8d
ret

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

Disassembly:
mov r11, qword [0x14006b9c0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400024c2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400024d0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400024c2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400024c2
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
movzx r8d, word [r8 + 6]
test r8d, r8d
je 0x1400024c2
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 0x14000251d
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002530
add rdx, 0x28
cmp r10, rdx
jne 0x140002508
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x14000253f
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x14000254f
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002526
test ecx, ecx
jg 0x140002538
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret

Function at 0x140003bc0
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x14006ba40]
mov rax, qword [rsi]
test rax, rax
je 0x140003c50
cmp qword [rax + 0x30], 0
jne 0x140003c70
lea rbx, [0x14006aca8]
mov qword [rax + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [rsi]
test rax, rax
je 0x140003c20
cmp qword [rax + 0x30], 0
jne 0x140003c40
lea rdx, [0x14006aca8]
mov qword [rax + 0x30], rdx
mov rax, rdx
cmp dword [rax], 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x28
pop rbx
pop rsi
ret
call sym.__shmem3_winpthreads_tdm_init_local_region
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140003c02
test rax, rax
jne 0x140003c40
call sym.__shmem3_winpthreads_tdm_init_local_region
nop dword [rax]
mov rax, qword [rax + 0x30]
jmp 0x140003c10
call sym.__shmem3_winpthreads_tdm_init_local_region
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140003be0
test rax, rax
jne 0x140003c70
call sym.__shmem3_winpthreads_tdm_init_local_region
nop dword [rax]
mov rbx, qword [rax + 0x30]
jmp 0x140003beb
Function at 0x140007840
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x14006ba40]
mov rax, qword [rbx]
mov r12, rcx
mov esi, edx
test rax, rax
je 0x140007910
cmp qword [rax + 0x60], 0
jne 0x140007930
lea rcx, [0x14006ac98]
mov qword [rax + 0x60], rcx
call sym.pthread_mutex_lock
mov rcx, r12
call sym.__pthread_get_pointer
test rax, rax
je 0x140007940
cmp qword [rax + 0x1d8], r12
jne 0x140007940
test byte [rax + 0x40], 0xc
jne 0x140007940
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x140007940
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x140007940
mov rax, qword [rbx]
test rax, rax
je 0x1400079a0
cmp qword [rax + 0x60], 0
jne 0x1400079c0
lea rcx, [0x14006ac98]
mov qword [rax + 0x60], rcx
call sym.pthread_mutex_unlock
test esi, esi
je 0x1400079d0
lea edx, [rsi - 2]
cmp edx, 0x15
ja 0x1400079d8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
jmp sym.pthread_cancel
call sym.__shmem3_winpthreads_tdm_init_local_region
cmp qword [rax + 0x60], 0
mov rax, qword [rbx]
je 0x14000786b
test rax, rax
jne 0x140007930
call sym.__shmem3_winpthreads_tdm_init_local_region
nop dword [rax]
mov rcx, qword [rax + 0x60]
jmp 0x140007876
mov rax, qword [rbx]
test rax, rax
je 0x140007970
cmp qword [rax + 0x60], 0
jne 0x140007990
lea rcx, [0x14006ac98]
mov qword [rax + 0x60], rcx
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
call sym.__shmem3_winpthreads_tdm_init_local_region
mov r8, rax
mov rax, qword [rbx]
cmp qword [r8 + 0x60], 0
je 0x14000794f
test rax, rax
jne 0x140007990
call sym.__shmem3_winpthreads_tdm_init_local_region
nop dword [rax]
mov rcx, qword [rax + 0x60]
jmp 0x14000795a
call sym.__shmem3_winpthreads_tdm_init_local_region
cmp qword [rax + 0x60], 0
mov rax, qword [rbx]
je 0x1400078da
test rax, rax
jne 0x1400079c0
call sym.__shmem3_winpthreads_tdm_init_local_region
nop dword [rax]
mov rcx, qword [rax + 0x60]
jmp 0x1400078e5
xor eax, eax
jmp 0x140007964
mov eax, 0x16
jmp 0x140007964
Function at 0x140008940
Capabilities:
Print debug messages

Disassembly:
push r12
push rbx
sub rsp, 0x58
mov r12, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140008960
add rsp, 0x58
pop rbx
pop r12
ret
lea rdx, [rsp + 0x48]
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rdx
mov ecx, 0x1100
xor edx, edx
mov dword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x1400089a8
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x140008954
int3
mov rcx, qword [rsp + 0x48]
mov rbx, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rbx
mov rcx, r12
call rbx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140008995

Function at 0x1400089d0
Capabilities:
Check mutex on windows

Disassembly:
push r12
sub rsp, 0x20
xor edx, edx
xor ecx, ecx
lea r8, [0x14006f2c0]
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140008a88
mov rdx, qword [0x14006f200]
lea rcx, [0x14006f200]
mov rax, qword [rdx + 8]
test rax, rax
je 0x140008a58
cmp rdx, rcx
jne 0x140008a3a
mov qword [rdx], rax
cmp rax, rcx
je 0x140008a3f
nop dword [rax]
test rax, rax
je 0x140008a6a
mov rdx, qword [rdx]
mov qword [rax], rdx
mov rdx, rax
mov rax, qword [rdx + 8]
cmp rax, rcx
jne 0x140008a28
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
test rax, rax
je 0x140008a6a
mov rdx, rax
jmp 0x140008a36
lea rcx, [0x14006f300]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x140008aa6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x20
pop r12
ret
lea rcx, str.failed_to_to_lock_cleanup_mutex_n
call sym.__shmem_get_error
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x20
pop r12
ret
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_DeleteAtom]
jmp 0x140008a6a
Function at 0x1400119c0
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push r13
push r12
push rdi
push rbx
sub rsp, 0x438
call dbg.__main
lea rdi, [rsp + 0x40]
mov ecx, 0xfc
mov rax, qword [0x14006baa0]
lea r12, [rsp + 0x30]
mov r13, qword [0x14006bab0]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], rax
mov rbx, rax
xor eax, eax
rep stosd dword [rdi], eax
lea rcx, str.USERNAME
sub rbx, r13
mov qword [rsp + 0x38], 0
call sym.getenv
mov rcx, r12
mov edx, 0x400
lea r8, str.C:Users_sAppDataRoamingMicrosoftWindowsStart_MenuProgramsStartupComputerFanControl.exe
mov r9, rax
call sym.snprintf.constprop.0
mov rcx, r12
lea rdx, [0x14006b06a]
call sym.fopen
mov r12, rax
test rax, rax
jne 0x140011a5b
lea rcx, str.Patch_could_not_be_applied__n
call sym.printf
or eax, 0xffffffff
jmp 0x140011a84
mov r9, rax
mov r8, rbx
mov edx, 1
mov rcx, r13
call sym.fwrite
mov rcx, r12
call sym.fclose
lea rcx, str.Patch_successfully_applied__n
call sym.printf
xor eax, eax
add rsp, 0x438
pop rbx
pop rdi
pop r12
pop r13
ret
Function at 0x1400020d0
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r15
sub rsp, 0x30
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor esi, esi
xor eax, eax
lock cmpxchg qword [0x1400045e0], rbx
je 0x14000211c
cmp rax, rbx
jne 0x14000210f
mov ebx, 1
mov esi, ebx
jmp 0x140002121
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400020f4
mov ebx, 1
mov eax, dword [0x1400045e8]
cmp eax, ebx
jne 0x140002137
mov ecx, 0x1f
call sub.msvcrt.dll__amsg_exit
jmp 0x14000219c
mov eax, dword [0x1400045e8]
test eax, eax
jne 0x140002196
mov dword [0x1400045e8], ebx
lea r15, [0x1400032b0]
lea rdi, [0x140003298]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
cmp rdi, r15
jae 0x140002188
test eax, eax
jne 0x14000218c
cmp qword [rdi], 0
je 0x14000217d
mov rax, qword [rdi]
mov rcx, qword [vtable.H_MA8HI.0]
call rcx
mov dword [rsp + 0x20], eax
add rdi, 8
mov qword [rsp + 0x28], rdi
jmp 0x14000215e
test eax, eax
je 0x14000219c
mov eax, 0xff
jmp 0x140002278
mov dword [0x140004024], ebx
mov eax, dword [0x1400045e8]
cmp eax, ebx
jne 0x1400021c3
lea rdx, [0x140003290]
lea rcx, [0x140003280]
call sub.msvcrt.dll__initterm
mov dword [0x1400045e8], 2
test esi, esi
jne 0x1400021d0
xor eax, eax
xchg qword [0x1400045e0], rax
cmp qword [0x1400045f0], 0
je 0x140002204
lea rcx, [0x1400045f0]
call fcn.140002630
test eax, eax
je 0x140002204
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x1400045f0]
mov r9, qword [vtable.H_MA8HI.0]
call r9
mov r8, qword [0x140004038]
mov rdx, qword [0x140004030]
mov ecx, dword [0x140004028]
call fcn.14000116c
mov dword [0x140004020], eax
cmp dword [0x140004040], 0
jne 0x140002234
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x140004024], 0
jne 0x140002249
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x140004020]
jmp 0x140002278
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r15
ret
sub rsp, 0x28
call fcn.140120000
add rsp, 0x28
jmp 0x1400020d0

Function at 0x14000251c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140002568
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140002560
cmp dword [rcx + 0x3c], edx
jl 0x140002560
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140002560
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x140002568
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14004cd70]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14004cd80]
mov dword [rax], 1
mov rax, qword [0x14004cd90]
mov dword [rax], 1
mov rax, qword [0x14004cd20]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14004cd60]
mov dword [0x14005400c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14004ce40]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14004ce20]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14004ccd0]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x14000532d
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp - 8], 0
mov qword [rbp - 0x10], 0
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x20]
je 0x140005394
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.checkErr__systemZio_141
jmp 0x140005395
nop
mov rax, qword [rbp - 8]
add rsp, 0x30
pop rbp
ret

Function at 0x140006abf
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp - 8], 0
mov qword [rbp - 0x10], 0
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.checkErr__systemZio_141
mov rax, qword [rbp - 8]
add rsp, 0x30
pop rbp
ret
Function at 0x140006dee
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
lea rax, str.echoBinSafe
mov qword [rbp - 0x48], rax
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov word [rbp - 0x30], 0
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.nimFrame_4
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x40], 8
lea rax, [0x1400476c8]
mov qword [rbp - 0x38], rax
mov qword [rbp - 8], 0
mov qword [rbp - 0x40], 9
lea rax, [0x1400476c8]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jge 0x140006f3d
mov qword [rbp - 0x40], 0x333
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
cmp qword [rbp - 8], 0
js 0x140006e9f
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x28]
jl 0x140006eb3
mov rax, qword [rbp + 0x28]
lea rdx, [rax - 1]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.raiseIndexError2
mov rax, qword [rbp - 8]
lea rdx, [rax*8]
mov rax, qword [rbp + 0x20]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov rbx, qword [rax]
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov r8d, 0
mov rdx, rbx
mov rcx, rax
call sym.writeWindows__systemZio_205
mov qword [rbp - 0x40], 0xb
lea rax, [0x1400476c8]
mov qword [rbp - 0x38], rax
mov edx, 0
mov rax, qword [rbp - 8]
add rax, 1
jno 0x140006f17
mov edx, 1
mov rcx, rax
lea rax, [rbp - 0x58]
mov qword [rax], rcx
mov rax, rdx
and eax, 1
test al, al
je 0x140006f30
call sym.raiseOverflow
mov rax, qword [rbp - 0x58]
mov qword [rbp - 8], rax
jmp 0x140006e6d
nop
mov qword [rbp - 0x40], 0x339
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x18], 0
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 1
mov edx, 1
lea rax, [0x1400476ee]
mov rcx, rax
call sym.fwrite
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x40], 0x33a
lea rax, str._usr_lib_nim_lib_system_io.nim
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x1c], 0
mov ecx, 1
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
call sym.fflush
mov dword [rbp - 0x1c], eax
call sym.popFrame_4
nop
add rsp, 0x88
pop rbx
pop rbp
ret

Function at 0x140008f0f
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp - 8], 0
cmp qword [rbp + 0x18], 0
je 0x140008f3f
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.nimCStrLen_1
mov rcx, rax
jmp 0x140008f44
mov ecx, 0
mov rdx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov qword [rbp - 8], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fflush
mov dword [rbp - 0xc], eax
nop
add rsp, 0x30
pop rbp
ret
Function at 0x14001159e
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp - 8], 0
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov qword [rbp - 8], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.fflush
mov dword [rbp - 0xc], eax
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140016e2b
Capabilities:
Encode data using base64

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp - 8], 0
cmp qword [rbp + 0x10], 0
je 0x140016e53
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax]
jmp 0x140016e58
mov edx, 0
cmp qword [rbp + 0x18], 0
je 0x140016e68
mov rax, qword [rbp + 0x18]
mov rax, qword [rax]
jmp 0x140016e6d
mov eax, 0
add rax, rdx
add rax, 1
mov rcx, rax
call sym.rawNewString
mov qword [rbp - 8], rax
mov rdx, qword [rbp + 0x10]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.appendString_1
mov rdx, qword [rbp + 0x18]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.appendString_1
mov rax, qword [rbp - 8]
lea rdx, [0x140048100]
mov rcx, rax
call sym.appendString_1
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.sysFatal__system_3121
nop
Function at 0x14003f210
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 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 rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x14003f280
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140069594]
mov rbx, rcx
test esi, esi
jle 0x14003f3b0
mov rax, qword [0x140069598]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14003f2cb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14003f355
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14003f2b0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x14003f3d2
mov rax, qword [0x140069598]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140069598]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14003f3b7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14003f34e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14003f360
add dword [0x140069594], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140069598]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14003f34e
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 esi, esi
jmp 0x14003f2d8
mov rax, qword [0x140069598]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14003f940
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140069600]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400695e0]
test rbx, rbx
je 0x14003f99c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x14003f993
test rsi, rsi
je 0x14003f993
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14003f978
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x14003fbb0
Capabilities:
Parse pe header

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

Function at 0x14003fbe0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14003fc2d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x14003fc24
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14003fc2f
add rax, 0x28
cmp rax, r9
jne 0x14003fc10
xor eax, eax
ret

Function at 0x14003fc30
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x14003fcc0
mov rdx, qword [0x14004cd20]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14003fcae
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14003fcae
cmp word [rax + 0x18], 0x20b
jne 0x14003fcae
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x14003fcc0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x14003fc99
add rbx, 0x28
cmp rbx, rdi
je 0x14003fcc0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x14003fc90
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

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

Disassembly:
mov rdx, qword [0x14004cd20]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14003fcf0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14003fcf8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14003fcf0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14003fd4d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14003fd44
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14003fcf0
add rax, 0x28
cmp rax, r9
jne 0x14003fd30
xor eax, eax
ret

Function at 0x14003fd50
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14004cd20]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14003fd6f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x14003fd78
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14003fd6f
movzx ecx, word [rax + 6]
mov eax, ecx
ret