joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180079280
Capabilities:
Access peb ldr_data

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x1800a5010]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rax, qword gs:[0x30]
mov rsi, rdx
mov byte [rsp + 0x20], r9b
mov rbx, rcx
mov dword [rsp + 0x24], r8d
mov rdx, qword [rax + 0x60]
mov rdi, qword [rdx + 0x18]
add rdi, 0x20
mov r10, qword [rdi]
cmp r10, rdi
je 0x180079342
nop dword [rax + rax]
test rbx, rbx
je 0x18007936f
mov r9, qword [r10 + 0x50]
mov r11, rbx
test r9, r9
je 0x18007933a
nop word [rax + rax]
movsx ecx, byte [r11]
lea r11, [r11 + 1]
movzx edx, word [r9]
lea r9, [r9 + 2]
lea eax, [rcx - 0x41]
cmp ax, 0x19
lea r8d, [rcx + 0x20]
lea eax, [rdx - 0x41]
cmova r8w, cx
cmp ax, 0x19
lea ecx, [rdx + 0x20]
cmova cx, dx
test r8w, r8w
je 0x18007936f
cmp r8w, cx
je 0x180079300
mov r10, qword [r10]
cmp r10, rdi
jne 0x1800792e0
xor eax, eax
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.180079a30
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov rdi, qword [r10 + 0x20]
test rdi, rdi
je 0x180079342
movsxd rcx, dword [rdi + 0x3c]
lea rdx, [rsp + 0x58]
add rcx, rdi
xorps xmm0, xmm0
mov r8, rsi
movups xmmword [rsp + 0x58], xmm0
movzx ebx, word [rcx + 0x14]
add rbx, rcx
mov r12d, dword [rbx + 0x28]
call fcn.180079480
mov r11d, dword [rbx + 0x24]
xorps xmm0, xmm0
mov ebp, dword [rsp + 0x60]
add r11, rdi
xor ebx, ebx
xor r10d, r10d
movups xmmword [rsp + 0x28], xmm0
movups xmmword [rsp + 0x38], xmm0
movups xmmword [rsp + 0x48], xmm0
sub r12d, ebp
je 0x180079342
mov r13, qword [rsp + 0x58]
mov r15d, dword [rsp + 0x4c]
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x28]
nop
xor eax, eax
test ebp, ebp
je 0x180079428
mov r14d, r10d
mov r9, r13
nop dword [rax]
mov ecx, eax
add rcx, r14
add rcx, r11
cmp rcx, rbx
jb 0x180079407
cmp r15d, 1
je 0x18007944e
lea rbx, [rdi + rsi]
mov r8d, dword [r9]
lea ecx, [rax + r10]
movzx ecx, byte [rcx + r11]
cmp ecx, r8d
je 0x18007941e
cmp r8d, 0xffffffff
jne 0x18007945a
inc eax
add r9, 4
cmp eax, ebp
jb 0x1800793f0
cmp byte [rsp + 0x20], 0
mov edx, r10d
je 0x18007946b
movsxd rcx, dword [rsp + 0x24]
lea rax, [rcx + r10]
movsxd rax, dword [rax + r11 - 4]
add rax, rcx
add rax, rdx
add rax, r11
jmp 0x180079344
mov eax, esi
lea r10d, [rdi - 1]
sub eax, r11d
add r10d, eax
inc r10d
cmp r10d, r12d
jb 0x1800793e0
jmp 0x180079342
lea rax, [r10 + r11]
jmp 0x180079344
Function at 0x1800796d0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x80
mov r10, rdx
mov rdi, rcx
test rcx, rcx
je 0x1800798eb
test rdx, rdx
je 0x1800798eb
movups xmm1, xmmword [0x18009b4a8]
xor ebx, ebx
movups xmm0, xmmword [0x18009b498]
pextrw eax, xmm1, 7
movups xmmword [rsp + 0x20], xmm0
movups xmmword [rsp + 0x30], xmm1
test ax, ax
je 0x1800798ba
cmp dword [0x1800a5018], 2
mov ecx, ebx
jl 0x180079881
movdqa xmm5, xmmword [0x18009d8f0]
lea rcx, [rsp + 0x20]
movdqa xmm4, xmmword [0x18009dcf0]
mov eax, 4
movaps xmmword [rsp + 0x70], xmm6
mov edx, ebx
movaps xmmword [rsp + 0x60], xmm7
movdqa xmm7, xmmword [0x18009d950]
movaps xmmword [rsp + 0x50], xmm8
movd xmm6, eax
mov eax, 0x1f
movaps xmmword [rsp + 0x40], xmm9
movdqa xmm9, xmmword [0x18009d9d0]
movd xmm8, eax
nop dword [rax]
movd xmm2, edx
lea eax, [rdx + 4]
pshufd xmm2, xmm2, 0
lea rcx, [rcx + 0x10]
paddd xmm2, xmm5
add edx, 8
movdqa xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm4
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm9
pshufhw xmm1, xmm0, 0xd8
movq xmm0, qword [rcx - 0x10]
pshufd xmm3, xmm1, 0xd8
paddw xmm3, xmm2
movd xmm2, eax
pshufd xmm2, xmm2, 0
pxor xmm3, xmm0
movq qword [rcx - 0x10], xmm3
paddd xmm2, xmm5
movdqa xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm4
punpckldq xmm1, xmm2
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm9
pshufhw xmm1, xmm0, 0xd8
movq xmm0, qword [rcx - 8]
pshufd xmm3, xmm1, 0xd8
paddw xmm3, xmm2
pxor xmm3, xmm0
movq qword [rcx - 8], xmm3
cmp edx, 0x10
jl 0x180079780
movaps xmm9, xmmword [rsp + 0x40]
movaps xmm8, xmmword [rsp + 0x50]
movaps xmm7, xmmword [rsp + 0x60]
movaps xmm6, xmmword [rsp + 0x70]
jmp 0x1800798ba
lea r8, [rsp + 0x20]
nop word [rax + rax]
mov eax, 0x4ec4ec4f
lea r8, [r8 + 2]
mul ecx
shr edx, 4
movzx eax, dx
imul edx, eax, 0x34
movzx eax, cx
inc ecx
sub ax, dx
add ax, 0x30
xor word [r8 - 2], ax
cmp ecx, 0x10
jl 0x180079890
xor r9d, r9d
lea rcx, [rsp + 0x20]
xor r8d, r8d
mov rdx, r10
call fcn.180079280
mov rcx, rax
test rax, rax
je 0x1800798eb
mov rax, rbx
cmp qword [rdi + rax*8], rcx
je 0x180079901
inc ebx
inc rax
cmp rax, 0x3a98
jl 0x1800798d8
mov eax, 0xffffffff
mov rbx, qword [rsp + 0x90]
add rsp, 0x80
pop rdi
ret
mov eax, ebx
mov rbx, qword [rsp + 0x90]
add rsp, 0x80
pop rdi
ret
Function at 0x180083a34
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x180083a64
xor eax, eax
jmp 0x180083b27
mov rbp, rbx
cmp word [rax], si
je 0x180083a89
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x180083a70
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x180083a6c
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.180083954
movsxd r14, eax
test eax, eax
jne 0x180083ac7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x180083a5d
mov rcx, r14
call fcn.180081d5c
mov rdi, rax
test rax, rax
jne 0x180083ae0
xor ecx, ecx
call fcn.180081f8c
jmp 0x180083abc
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.180083954
test eax, eax
jne 0x180083b11
mov rcx, rdi
call fcn.180081f8c
jmp 0x180083b1b
xor ecx, ecx
call fcn.180081f8c
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x1400111ea
Capabilities:
Terminate process

Disassembly:
jmp 0x140012f10
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x140011267
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
jmp 0x140011920
push rbp
push rdi
sub rsp, 0x148
lea rbp, [rsp + 0x20]
lea rcx, [0x1400210a2]
call fcn.14001136b
mov qword [rbp + 8], 2
lea rcx, str.Decrypting_and_executing_shellcode..._n
call fcn.140011190
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, qword [rbp + 8]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
jne 0x14001198d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.VirtualAlloc_failed___d_._n
call fcn.140011190
mov eax, 1
jmp 0x1400119c0
mov r8, qword [rbp + 8]
lea rdx, [0x14001c174]
mov rcx, qword [rbp + 0x28]
call fcn.1400111ae
mov rax, qword [rbp + 0x28]
mov qword [rbp + 0x48], rax
call qword [rbp + 0x48]
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
lea rsp, [rbp + 0x128]
pop rdi
pop rbp
ret

Function at 0x140011271
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014260
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014280
xor al, al
jmp 0x140014301
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014293
xor al, al
jmp 0x140014301
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x1400142bd
xor al, al
jmp 0x140014301
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400142d1
xor al, al
jmp 0x140014301
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x1400142e3
xor al, al
jmp 0x140014301
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x1400142ff
xor al, al
jmp 0x140014301
mov al, 1
add rsp, 0x38
ret
Function at 0x140001290
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rdi
sub rsp, 0x270
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rbx, rcx
mov qword [rsp + 0x28], rcx
mov ecx, 0x104
lea rdx, [rsp + 0x50]
xor ebp, ebp
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, eax
xorps xmm0, xmm0
mov edi, 0xf
lea eax, [rcx - 1]
cmp eax, 0x103
ja 0x14000140e
lea rax, [rsp + 0x50]
mov qword [rsp + 0x288], rsi
lea rax, [rax + rcx*2]
mov qword [rsp + 0x48], rdi
mov esi, ecx
lea rcx, [rsp + 0x50]
movups xmmword [rsp + 0x30], xmm0
cmp rcx, rax
jne 0x14000131c
mov qword [rsp + 0x40], rbp
mov byte [rsp + 0x30], bpl
jmp 0x1400013cd
cmp rsi, rdi
jbe 0x14000138e
mov eax, 0x16
mov rdi, rsi
or rdi, 0xf
cmp rdi, rax
cmovb rdi, rax
lea rcx, [rdi + 1]
cmp rcx, 0x1000
jb 0x14000137d
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140001421
mov rcx, rax
call fcn.1400035f0
mov rcx, rax
test rax, rax
je 0x140001376
add rax, 0x27
mov qword [rsp + 0x48], rdi
and rax, 0xffffffffffffffe0
mov qword [rsp + 0x30], rax
mov qword [rax - 8], rcx
jmp 0x140001393
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400035f0
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x48], rdi
jmp 0x140001393
mov rax, qword [rsp + 0x30]
lea r9, [rsp + 0x30]
mov r8, rsi
lea rdx, [rsp + 0x50]
cmp rdi, 0xf
jbe 0x1400013ae
mov r9, rax
mov rcx, rax
jmp 0x1400013b1
mov rcx, r9
movzx eax, byte [rdx]
lea rdx, [rdx + 2]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x1400013b1
mov qword [rsp + 0x40], rsi
mov byte [r9 + rsi], bpl
movups xmm0, xmmword [rsp + 0x30]
mov rsi, qword [rsp + 0x288]
mov rax, rbx
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [rbx], xmm0
movups xmmword [rbx + 0x10], xmm1
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1400035d0
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
mov rax, rbx
mov qword [rbx + 0x18], rdi
mov byte [rbx], bpl
jmp 0x1400013e9
call fcn.140001110
int3
Function at 0x1400022e0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je case.default.0x140002301
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x14000232e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140002330
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140002389
test ecx, ecx
jle 0x140002369
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140002389
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140002389
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret
mov esi, 0x545fefa
add dword [rax + rbx + 0x3002027e], esp
push rsp
add byte [rsi - 0x3d], bh
jle 0x14000ca48
scasd eax, dword [rdi]
sub al, 0xe1
invalid
Function at 0x1400023b0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x1400023d2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x1400023e1
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140002404
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140002406
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140002442
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x1400024de
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000247d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x1400024be
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x1400024de
cmp rbx, rax
ja 0x140002490
test rbx, rbx
je 0x1400024de
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
jmp 0x17e0eb892
Function at 0x140002940
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000296d
xor eax, eax
jmp 0x140002ad9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400029a7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x1400029a7
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140002ad9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140002acc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400029ea
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140002a15
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002ad1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002a84
sub eax, 1
je 0x140002a84
cmp eax, 2
jne 0x140002acc
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002ad1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002ab2
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140002acc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002ad1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400035d0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140002d60
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140002e33
cmp byte [rcx + 0x71], 0
je 0x140002e33
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140002e2f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002df4
sub eax, 1
je 0x140002df8
cmp eax, 2
jne 0x140002e2f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400035d0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140002e26
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140002e2f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140002ddc
xor al, al
jmp 0x140002ddc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400035d0
add rsp, 0x60
pop rbx
ret

Function at 0x140003f50
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400055c0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400055d0]
mov dword [rax], 1
mov rax, qword [0x1400055e0]
mov dword [rax], 1
mov rax, qword [0x140005570]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400055b0]
mov dword [0x14000900c], 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 [0x140005680]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140005660]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140005510]
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 0x140002110
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 0x140002180
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140009114]
mov rbx, rcx
test esi, esi
jle 0x1400022b0
mov rax, qword [0x140009118]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400021cb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002255
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400021b0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400022d2
mov rax, qword [0x140009118]
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 [0x140009118]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400022b7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000224e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002260
add dword [0x140009114], 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 [0x140009118]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000224e
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 0x1400021d8
mov rax, qword [0x140009118]
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 0x140002840
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140009180]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140009160]
test rbx, rbx
je 0x14000289c
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 0x140002893
test rsi, rsi
je 0x140002893
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002878
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 0x140002ab0
Capabilities:
Parse pe header

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