joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140006950
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x4038
call fcn.14000acc0
sub rsp, rax
mov rax, qword [0x140038008]
xor rax, rsp
mov qword [rsp + 0x4020], rax
mov rdx, rcx
xor r8d, r8d
xor ecx, ecx
call fcn.140007980
mov r8d, 0x2000
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1400069e6
mov r8d, 0x2000
lea rdx, [rsp + 0x2020]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor r8d, r8d
lea rdx, [rsp + 0x20]
xor ecx, ecx
call fcn.140007a90
test rax, rax
je 0x1400069e6
cmp byte [rax], 0
je 0x1400069e6
mov rcx, rax
call fcn.140014d20
mov rcx, qword [rsp + 0x4020]
xor rcx, rsp
call fcn.14000ac90
add rsp, 0x4038
ret
xor eax, eax
mov rcx, qword [rsp + 0x4020]
xor rcx, rsp
call fcn.14000ac90
add rsp, 0x4038
ret

Function at 0x140006ef0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdx, rcx
xor r8d, r8d
xor ecx, ecx
call fcn.140007980
xor edx, edx
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rdi
mov ebx, eax
call fcn.14001003c
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140006f30
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
mov eax, 0x2110
call fcn.14000acc0
sub rsp, rax
mov rax, qword [0x140038008]
xor rax, rsp
mov qword [rsp + 0x2100], rax
mov rdx, rcx
xor edi, edi
lea rcx, [rsp + 0x100]
mov dword [rsp + 0x50], edi
mov r8d, 0x1000
call fcn.140007980
mov ebx, 1
lea rcx, [0x140006420]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
lea rcx, [rsp + 0x90]
mov dword [rsp + 0x58], 0x18
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0x68], ebx
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
xorps xmm0, xmm0
mov qword [rsp + 0x98], rdi
xor ecx, ecx
movdqa xmmword [rsp + 0xa0], xmm0
mov dword [rsp + 0xcc], 0x101
mov word [rsp + 0xd0], bx
call fcn.140010210
mov rcx, rax
call fcn.140014d98
mov ecx, eax
call fcn.140012c80
mov ecx, ebx
mov qword [rsp + 0xe0], rax
call fcn.140010210
mov rcx, rax
call fcn.140014d98
mov ecx, eax
call fcn.140012c80
lea ecx, [rdi + 2]
mov qword [rsp + 0xe8], rax
call fcn.140010210
mov rcx, rax
call fcn.140014d98
mov ecx, eax
call fcn.140012c80
mov qword [rsp + 0xf0], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor r9d, r9d
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rsp + 0x100]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140007098
mov rcx, qword [rsp + 0x70]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x70]
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [rsp + 0x50]
jmp 0x1400070b0
lea rdx, str.Error_creating_child_process__n
lea rcx, [0x140027d28]
call fcn.140002610
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x2100]
xor rcx, rsp
call fcn.14000ac90
mov rbx, qword [rsp + 0x2128]
add rsp, 0x2110
pop rdi
ret
Function at 0x140007150
Capabilities:
Read file on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov r12, rcx
mov rbp, r8
mov ecx, 0x2000
mov r14, rdx
xor r13d, r13d
call fcn.140010050
mov r15, rax
test rax, rax
je 0x140007263
xor edx, edx
lea r8d, [r13 + 2]
mov rcx, r12
call fcn.14000d588
test eax, eax
js 0x140007263
mov rcx, r12
mov qword [rsp + 0x50], rbx
call fcn.140013658
mov rbx, rax
cmp rax, rbp
jb 0x14000725e
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdi
nop dword [rax]
cmp rbx, 0x2000
lea rsi, [rbx - 0x2000]
cmovb rsi, r13
sub rbx, rsi
cmp rbx, rbp
jb 0x140007254
xor r8d, r8d
mov rdx, rsi
mov rcx, r12
call fcn.14000d588
test eax, eax
js 0x140007254
mov r9, r12
mov r8, rbx
mov edx, 1
mov rcx, r15
call fcn.14000d2b8
cmp rax, rbx
jne 0x140007254
sub rbx, rbp
add rbx, 1
je 0x14000723b
lea rdi, [r15 - 1]
add rdi, rbx
nop dword [rax]
nop dword [rax + rax]
mov r8, rbp
mov rdx, r14
mov rcx, rdi
call fcn.14000c4d0
test eax, eax
je 0x14000724d
dec rdi
sub rbx, 1
jne 0x140007220
lea rbx, [rbp - 1]
add rbx, rsi
test rsi, rsi
jne 0x1400071c0
jmp 0x140007254
lea r13, [rbx - 1]
add r13, rsi
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
mov rcx, r15
call fcn.14001003c
mov rax, r13
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x1400077f0
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
mov eax, 0x2070
call fcn.14000acc0
sub rsp, rax
mov rax, qword [0x140038008]
xor rax, rsp
mov qword [rsp + 0x2060], rax
xor ebx, ebx
mov qword [rsp + 0x38], 0xffffffffffffffff
mov qword [rsp + 0x40], rbx
mov rdi, rcx
mov dword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x38]
lea edx, [rbx + 8]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400078c1
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [rbx + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140007878
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400078c1
mov edx, dword [rsp + 0x30]
mov ecx, 1
call fcn.140010034
mov rbx, rax
test rax, rax
je 0x1400078c1
mov r9d, dword [rsp + 0x30]
lea rax, [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
mov r8, rbx
mov edx, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1400078c1
mov rcx, qword [rbx]
lea rdx, [rsp + 0x40]
call sub.ADVAPI32.dll_ConvertSidToStringSidW
mov rcx, rbx
call fcn.14001003c
mov rcx, qword [rsp + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x1400078da
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x40]
lea r9, str.S_1_3_4
test rbx, rbx
lea r8, str.D:_A__FA____s_
mov edx, 0x1000
lea rcx, [rsp + 0x60]
cmovne r9, rbx
call fcn.1400074f0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor r9d, r9d
mov dword [rsp + 0x48], 0x18
lea r8, [rsp + 0x50]
mov dword [rsp + 0x58], 0
lea rcx, [rsp + 0x60]
lea edx, [r9 + 1]
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
je 0x14000794c
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x14000794c
xor eax, eax
jmp 0x140007951
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x2060]
xor rcx, rsp
call fcn.14000ac90
mov rbx, qword [rsp + 0x2088]
add rsp, 0x2070
pop rdi
ret
Function at 0x140012474
Capabilities:
Delete directory

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140012494
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1400102ec
or eax, 0xffffffff
jmp 0x140012496
xor eax, eax
add rsp, 0x28
ret

Function at 0x1400127c4
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x290
mov rax, qword [0x140038008]
xor rax, rsp
mov qword [rsp + 0x280], rax
xor esi, esi
mov rbx, rdx
test rdx, rdx
jne 0x140012503
call fcn.14001035c
mov dword [rax], 0x16
call fcn.140015adc
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14000ac90
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
test rcx, rcx
je 0x1400124ca
mov dword [rsp + 0x28], esi
lea r8, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140012571
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jb 0x140012544
cmp eax, 3
jbe 0x140012561
cmp eax, 8
je 0x140012551
cmp eax, 0x12
je 0x140012561
call fcn.14001035c
mov dword [rax], 0x16
jmp 0x1400124da
call fcn.14001035c
mov dword [rax], 0xc
jmp 0x1400124da
call fcn.14001035c
mov dword [rax], 2
jmp 0x1400124da
mov eax, dword [rsp + 0x30]
lea rcx, [rsp + 0x34]
cmp eax, 0x80
cmove eax, esi
mov dword [rbx], eax
call fcn.14001270c
lea rcx, [rsp + 0x3c]
mov qword [rbx + 8], rax
call fcn.14001270c
lea rcx, [rsp + 0x44]
mov qword [rbx + 0x10], rax
call fcn.14001270c
mov qword [rbx + 0x18], rax
lea rcx, [rbx + 0x24]
mov eax, dword [rsp + 0x50]
lea r8, [rsp + 0x5c]
mov edx, 0x104
mov dword [rbx + 0x20], eax
call fcn.14001b294
test eax, eax
jne 0x1400125cf
mov rax, rdi
jmp 0x1400124de
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.140015afc
int3
jmp 0x14001249c
Function at 0x1400127cc
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x290
mov rax, qword [0x140038008]
xor rax, rsp
mov qword [rsp + 0x280], rax
xor edi, edi
mov rbx, rdx
test rcx, rcx
jne 0x140012641
call fcn.14001035c
mov dword [rax], 0x16
call fcn.140015adc
or eax, 0xffffffff
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14000ac90
mov rbx, qword [rsp + 0x2b0]
add rsp, 0x290
pop rdi
ret
cmp rcx, 0xffffffffffffffff
je 0x14001260d
test rbx, rbx
je 0x14001260d
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x14001269c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jb 0x140012675
cmp eax, 3
jbe 0x14001268f
cmp eax, 8
je 0x140012682
cmp eax, 0x12
je 0x14001268f
call fcn.14001035c
mov dword [rax], 0x16
jmp 0x14001261d
call fcn.14001035c
mov dword [rax], 0xc
jmp 0x14001261d
call fcn.14001035c
mov dword [rax], 2
jmp 0x14001261d
mov eax, dword [rsp + 0x30]
lea rcx, [rsp + 0x34]
cmp eax, 0x80
cmove eax, edi
mov dword [rbx], eax
call fcn.14001270c
lea rcx, [rsp + 0x3c]
mov qword [rbx + 8], rax
call fcn.14001270c
lea rcx, [rsp + 0x44]
mov qword [rbx + 0x10], rax
call fcn.14001270c
mov qword [rbx + 0x18], rax
lea rcx, [rbx + 0x24]
mov eax, dword [rsp + 0x50]
lea r8, [rsp + 0x5c]
mov edx, 0x104
mov dword [rbx + 0x20], eax
call fcn.14001b294
test eax, eax
je 0x140012620
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.140015afc
int3
jmp 0x1400125e4

Function at 0x140012cf8
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140012d18
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1400102ec
or eax, 0xffffffff
jmp 0x140012d1a
xor eax, eax
add rsp, 0x28
ret

Function at 0x1400145ec
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140014418
Function at 0x140001aec
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001b36
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001b36
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001b36
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001b36
cmp dword [rcx + 0x84], 0xe
jbe 0x140001b36
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001b38
xor al, al
add rsp, 0x28
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00659890]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x006598a0]
mov dword [rax], 1
mov rax, qword [0x006598b0]
mov dword [rax], 1
mov rax, qword [0x00659880]
mov dword [rax], 1
mov rax, qword [0x00659760]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00659870]
mov dword [0x0065c008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00659830]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00659710]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x40196e
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
lea rax, [rbp - 8]
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 0x18
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
call rax
test eax, eax
sete al
test al, al
je 0x4019c1
mov eax, 0xffffffff
jmp 0x401aec
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov edx, 0x800c
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
call rax
test eax, eax
sete al
test al, al
je 0x4019fe
mov eax, 0xffffffff
jmp 0x401aec
mov rax, qword [rbp + 0x28]
mov ecx, eax
mov rax, qword [rbp - 0x10]
mov rdx, qword [rbp + 0x20]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptHashData]
call rax
test eax, eax
sete al
test al, al
je 0x401a34
mov eax, 0xffffffff
jmp 0x401aec
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x18]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8, rcx
mov edx, 0x6610
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
call rax
test eax, eax
sete al
test al, al
je 0x401a6f
mov eax, 0xffffffff
jmp 0x401aec
mov rax, qword [rbp - 0x18]
lea rdx, [rbp + 0x18]
mov qword [rsp + 0x28], rdx
mov rdx, qword [rbp + 0x10]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
call rax
test eax, eax
sete al
test al, al
je 0x401ab2
mov eax, 0xffffffff
jmp 0x401aec
mov rax, qword [rbp - 8]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
call rax
mov rax, qword [rbp - 0x18]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
mov eax, 0
add rsp, 0x50
pop rbp
ret
Function at 0x402270
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0065c624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4023f8
mov rax, qword [0x0065c628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4022bc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x402345
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4022a0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40242d
mov rax, qword [0x0065c628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0065c628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x402410
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40233e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4023a0
add dword [0x0065c624], 1
cmp edi, 8
jae 0x402373
test dil, 4
jne 0x4023e4
test edi, edi
je 0x402368
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4023ff
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x402368
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40238c
jmp 0x402368
add rsi, qword [0x0065c628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40233e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x402368
xor esi, esi
jmp 0x4022c7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x402368
mov rax, qword [0x0065c628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x402b80
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0065c900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0065c8e0]
test rbx, rbx
je 0x402bd4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x402bcb
test rsi, rsi
je 0x402bcb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402bb0
lea rcx, [0x0065c900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x402e10
Capabilities:
Parse pe header

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

Function at 0x402e30
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 0x402e71
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x402e68
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402e73
add rax, 0x28
cmp rax, r9
jne 0x402e54
xor eax, eax
ret

Function at 0x402f10
Capabilities:
Enumerate pe sections

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

Function at 0x403080
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00659760]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x4030a0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x403098
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4030fd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4030f4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403104
add rax, 0x28
cmp rax, r9
jne 0x4030e0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x403120
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00659760]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40318e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40318e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40318e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40318e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x403185
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x403195
add rcx, 0x28
cmp rcx, rax
jne 0x403170
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x4031a8
jmp 0x40318e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x4031b6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40318e
test r9d, r9d
jg 0x4031a0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x403ed0
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x403f25
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x403f10
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x403fa0
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
mov r8d, 1
cmovl r12d, edx
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
add r12d, 1
mov dword [rbx + 0xc], eax
call sym.__pformat_emit_float
mov ecx, dword [rbx + 8]
mov rdx, rbx
mov eax, dword [rbx + 0x2c]
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call sym.__pformat_putc
mov rdx, rbx
mov rcx, rsi
add dword [rbx + 0xc], r12d
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp sym.__pformat_int.isra.0
mov eax, dword [0x00658a00]
cmp eax, 0xffffffff
je 0x403fd6
test eax, eax
je 0x403fc6
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x403f2d
mov dword [0x00658a00], 0
call sym._get_output_format
mov edx, 3
test al, 1
jne 0x403faf
jmp 0x403fb4
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sym.getenv
test rax, rax
je 0x403fbc
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
ja 0x403fbc
mov dword [0x00658a00], 1
jmp 0x403faf

Function at 0x408280
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x140001070
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
xor r8d, r8d
mov r9d, edx
mov r10, rcx
test edx, edx
jle 0x1400010c4
lea r11, str.Vba.YA_u56V.
nop dword [rax]
nop dword [rax + rax]
mov eax, 0x2aaaaaab
lea r10, [r10 + 1]
imul r8d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
inc r8d
lea ecx, [rdx + rdx*2]
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
movzx eax, byte [rcx + r11]
xor byte [r10 - 1], al
cmp r8d, r9d
jl 0x140001090
mov eax, r9d
ret