joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140814058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1408141df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140814089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14081406f
add dl, dl
jne 0x140814096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408140f6
xor eax, eax
add dl, dl
jne 0x1408140a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408141ad
add dl, dl
jne 0x1408140b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408140c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408140d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408140dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1408140ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14081407e
mov eax, 1
add dl, dl
jne 0x140814106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140814113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408140fb
sub eax, ebx
mov ebx, 1
jne 0x14081414c
mov ecx, 1
add dl, dl
jne 0x14081412e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14081413b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140814123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14081407e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140814168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140814175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14081415d
cmp eax, 0x7d00
jae 0x14081419b
cmp eax, 0x500
jb 0x140814196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14081407e
cmp eax, 0x7f
ja 0x14081419e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14081407e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1408141d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14081407e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001000
Capabilities:
Access peb ldr_data

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x70
mov rax, qword [0x140003008]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rax, qword [rcx + 0x18]
mov rdi, qword [rax + 0x10]
mov rbx, rdi
mov rbx, qword [rbx]
cmp qword [rbx + 0x30], 0
je 0x1400010d0
mov rdx, qword [rbx + 0x60]
xor eax, eax
cmp word [rdx], ax
je 0x140001074
nop word [rax + rax]
cmp rax, 0x3f
jae 0x14000106a
movzx ecx, byte [rdx]
add rdx, 2
mov byte [rsp + rax + 0x20], cl
inc rax
cmp word [rdx], 0
jne 0x140001050
cmp rax, 0x40
jae 0x1400010f6
lea rcx, [rsp + 0x20]
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.USER32.dll_CharLowerA]
mov edx, 0x99
mov rcx, 0xffffffffffffffff
mov r8, rax
inc rcx
cmp byte [rax + rcx], 0
jne 0x140001093
xor r9d, r9d
test rcx, rcx
je 0x1400010d0
nop dword [rax]
nop dword [rax + rax]
movsx eax, byte [r8]
lea edx, [rdx + rdx*2]
inc r9d
lea r8, [r8 + 1]
add edx, eax
movsxd rax, r9d
cmp rax, rcx
jb 0x1400010b0
cmp edx, 0x12d6a6
je 0x1400010d9
cmp rdi, rbx
jne 0x140001031
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140001110
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
ret
call fcn.140001238
int3

Function at 0x140001b0c
Capabilities:
Parse pe header

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

Disassembly:
push rbx
sub rsp, 0x20
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.geuss_a_number_between_1_and_6_n
call fcn.1400010b0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea rdx, [0x140005628]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::operator___int____ptr64____ptr64]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov ebx, eax
mov eax, 0x2aaaaaab
imul ebx
mov eax, dword [0x140005628]
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea ecx, [rdx + rdx*2]
add ecx, ecx
sub ebx, ecx
inc ebx
cmp eax, ebx
jne 0x140001080
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.You_Win
call fcn.1400010b0
mov eax, dword [0x140005628]
cdq
idiv ebx
mov dword [0x140005628], eax
test eax, eax
je 0x14000109a
lea rcx, str.C:WINDOWSSystem32_shutdown__s
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x140001bdc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001c26
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001c26
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001c26
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001c26
cmp dword [rcx + 0x84], 0xe
jbe 0x140001c26
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001c28
xor al, al
add rsp, 0x28
ret
Function at 0x140001480
Capabilities:
Check for outputdebugstring error
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x140001513
call fcn.140001740
cmp byte [rax + 2], 0
jne 0x140001513
test byte [rax + 0xbc], 0x70
jne 0x140001513
call fcn.140001d00
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x140005508]
mov edx, dword [rax]
mov rax, qword [0x140005510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x140005500]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001450
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.1400026f0
nop
add rsp, 0x20
pop rbp
jmp 0x140001480

Function at 0x140001520
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x140001513
call fcn.140001740
cmp byte [rax + 2], 0
jne 0x140001513
test byte [rax + 0xbc], 0x70
jne 0x140001513
call fcn.140001d00
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x140005508]
mov edx, dword [rax]
mov rax, qword [0x140005510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x140005500]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.140001450
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.1400026f0
nop
add rsp, 0x20
pop rbp
jmp 0x140001480

Function at 0x140001750
Capabilities:
Access peb ldr_data

Disassembly:
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x20]
ret
Function at 0x140002250
Capabilities:
Allocate or change rwx memory

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rdx
mov rdi, rcx
movsxd r13, dword [rcx + 0x3c]
mov ebx, dword [rcx + r13 + 0x54]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x1400022ba
lea r9, [rsp + 0x20]
mov rcx, rsi
mov rdx, rbx
mov r8d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400022ba
mov rcx, rsi
mov rdx, rdi
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rcx, rsi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movzx eax, word [rdi + r13 + 6]
test ax, ax
je 0x14000235d
movsxd rcx, dword [rdi + 0x3c]
lea rbp, [rcx + rdi]
add rbp, 0x110
xor ebx, ebx
jmp 0x1400022f5
movzx eax, word [rdi + r13 + 6]
inc rbx
movzx ecx, ax
add rbp, 0x28
cmp rbx, rcx
jae 0x14000235d
cmp dword [rbp + 0x1c], 0
js 0x1400022e6
mov r14d, dword [rbp]
mov r15d, dword [rbp + 4]
lea r12, [rdi + r15]
add r15, rsi
mov rcx, r12
mov rdx, r15
mov r8, r14
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x1400022e0
mov rcx, r15
mov rdx, r14
mov r8d, 0x40
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400022e0
mov rcx, r15
mov rdx, r12
mov r8, r14
call sub.msvcrt.dll_memcpy
mov r8d, dword [rsp + 0x24]
mov rcx, r15
mov rdx, r14
lea r9, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1400022e0
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1400023e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
test rcx, rcx
je 0x1400025b4
mov r14, rdx
mov rbx, rcx
movsxd rcx, dword [rcx + 0x3c]
mov r15d, dword [rcx + rbx + 0x88]
mov r13d, dword [r15 + rbx + 0x1c]
add r13, rbx
mov rax, rdx
shr rax, 0x10
test ax, ax
je 0x140002474
mov ebp, dword [rbx + r15 + 0x18]
test ebp, ebp
je 0x1400025b4
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], r8
mov r12d, dword [rbx + r15 + 0x20]
mov esi, dword [rbx + r15 + 0x24]
add r12, rbx
add rsi, rbx
xor edi, edi
nop dword [rax + rax]
mov ecx, dword [r12]
add rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x14000248a
add r12, 4
add rsi, 2
dec ebp
jne 0x140002450
jmp 0x1400025bb
movzx eax, r14w
mov ecx, dword [rbx + r15 + 0x10]
sub rax, rcx
mov edi, dword [r13 + rax*4]
jmp 0x1400025b8
movzx eax, word [rsi]
mov edi, dword [r13 + rax*4]
cmp r15d, edi
ja 0x1400025b8
mov rax, qword [rsp + 0x38]
add r15d, dword [rbx + rax + 0x8c]
cmp edi, r15d
jae 0x1400025b8
add rdi, rbx
mov rcx, rdi
mov edx, 0x2e
call sub.msvcrt.dll_strchr
mov rbx, rax
inc rbx
mov rsi, rbx
sub rsi, rdi
lea rcx, [rsi + 4]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1400025b4
mov r14, rax
lea r8, [rsi + 1]
mov qword [rsp + 0x20], rsi
xor ecx, ecx
mov rdx, rax
mov r9, rdi
call qword [sym.imp.msvcrt.dll_mbstowcs_s]
mov dword [r14 + rsi*2], 0x6c0064
mov word [r14 + rsi*2 + 4], 0x6c
lea rdx, [0x140005002]
mov r8d, 4
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140002542
lea rdx, str.ext_
mov r8d, 4
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x140002590
lea r8, [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rdx, r14
call fcn.140001770
test rax, rax
je 0x140002590
mov rsi, rax
mov rcx, r14
call sub.msvcrt.dll_free
mov rdi, qword [rsp + 0x40]
lea rcx, [rdi + 1]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1400025b4
mov r14, rax
add rdi, rdi
mov rcx, rax
mov rdx, rsi
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov rdx, rbx
mov r8, r14
call fcn.1400023e0
mov rdi, rax
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x1400025bb
xor edi, edi
jmp 0x1400025bb
add rdi, rbx
mov rax, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140002900
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 fcn.140003750
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140003750
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x140002970
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400080a4]
mov rbx, rcx
test esi, esi
jle 0x140002aa0
mov rax, qword [0x1400080a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400029bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002a45
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400029a0
mov rcx, rbx
call fcn.1400033c0
mov rdi, rax
test rax, rax
je 0x140002ac2
mov rax, qword [0x1400080a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003500
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400080a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002aa7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002a3e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002a50
add dword [0x1400080a4], 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 [0x1400080a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002a3e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002900
nop dword [rax]
xor esi, esi
jmp 0x1400029c8
mov rax, qword [0x1400080a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002900
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002900
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003030
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 0x14000308c
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 0x140003083
test rsi, rsi
je 0x140003083
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003068
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 0x1400033c0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140003440
Capabilities:
Parse pe header

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

Function at 0x140003500
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400053b0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000351f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003528
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140001001
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400043e0]
mov rcx, qword [0x140004390]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x1400043f0]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x140004400]
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 [0x1400043d0]
mov dword [0x14000700c], 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 [0x1400044a0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140004480]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140004340]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret

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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
call sym.__main
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0xfa0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400013a6
lea rax, str.allocation_failed
mov rcx, rax
call sym.perror
mov rax, qword [rbp - 8]
mov r8d, 0xfa0
lea rdx, section..data
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 8]
call rax
mov eax, 0
add rsp, 0x30
pop rbp
ret
Function at 0x140001644
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x1400070a8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x1400070a4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x140001692
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000168a
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140001779
inc ebx
add rax, 0x28
jmp 0x14000166a
mov rcx, r12
call sym.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
jne 0x1400016b1
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
movsxd rbx, ebx
mov rax, qword [0x1400070a8]
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 [0x1400070a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140001713
mov rax, qword [0x1400070a8]
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 0x140001773
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001773
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 [0x1400070a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001773
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 [0x1400070a4]
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 0x140001ba0
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x140007100]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x140001bec
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 0x140001be6
test eax, eax
jne 0x140001be6
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140001bbe
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140001da0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140001dc3
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x140001dc3
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x140001dc4
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 0x140001dfe
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140001df5
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140001e00
inc r8d
add rax, 0x28
jmp 0x140001ddc
xor eax, eax
ret

Function at 0x140001e71
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140004390]
mov r8, rcx
mov rcx, r9
call sym._ValidateImageBase
test eax, eax
je 0x140001e9d
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp sym._FindPESection
xor eax, eax
add rsp, 0x28
ret
Function at 0x1400c2fb9
Capabilities:
Hash data using fnv

Disassembly:
jmp 0x14011b8a0
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x18
mov qword [rsp], 0
jmp 0x14011b8c8
mov rax, qword [rsp]
inc rax
mov qword [rsp], rax
mov rax, qword [rsp + 0x30]
cmp qword [rsp], rax
jae 0x14011b912
mov rax, qword [rsp]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
movzx eax, byte [rax]
mov rcx, qword [rsp + 0x20]
xor rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
movabs rax, 0x100000001b3
mov rcx, qword [rsp + 0x20]
imul rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
jmp 0x14011b8bd
mov rax, qword [rsp + 0x20]
add rsp, 0x18
ret