joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180164c20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0xd8
mov r8, qword [rsp + 0xf8]
mov rdx, qword [rsp + 0x100]
lea rcx, [rsp + 0x38]
call fcn.180162340
mov r8, qword [rsp + 0x108]
mov rdx, qword [rsp + 0x110]
lea rcx, [rsp + 0x40]
call fcn.180162340
movss xmm0, dword [rsp + 0x3c]
ucomiss xmm0, dword [0x1801f43ac]
jp 0x180164c7f
je 0x180164c93
movss xmm0, dword [rsp + 0x44]
divss xmm0, dword [rsp + 0x3c]
movss dword [rsp + 0x30], xmm0
jmp 0x180164c9c
xorps xmm0, xmm0
movss dword [rsp + 0x30], xmm0
movss xmm0, dword [rsp + 0x38]
ucomiss xmm0, dword [0x1801f43ac]
jp 0x180164cad
je 0x180164cc1
movss xmm0, dword [rsp + 0x40]
divss xmm0, dword [rsp + 0x38]
movss dword [rsp + 0x34], xmm0
jmp 0x180164cca
xorps xmm0, xmm0
movss dword [rsp + 0x34], xmm0
movss xmm2, dword [rsp + 0x30]
movss xmm1, dword [rsp + 0x34]
lea rcx, [rsp + 0x58]
call fcn.1801185c0
movsxd rax, dword [rsp + 0xe8]
imul rax, rax, 0x14
mov rcx, qword [rsp + 0xe0]
add rax, qword [rcx + 0x28]
mov qword [rsp + 0x48], rax
movsxd rax, dword [rsp + 0xf0]
imul rax, rax, 0x14
mov rcx, qword [rsp + 0xe0]
add rax, qword [rcx + 0x28]
mov qword [rsp + 0x50], rax
movzx eax, byte [rsp + 0x118]
test eax, eax
je 0x180164e2e
mov r8, qword [rsp + 0x110]
mov rdx, qword [rsp + 0x108]
lea rcx, [rsp + 0x70]
call fcn.1801624f0
mov r8, qword [rsp + 0x110]
mov rdx, qword [rsp + 0x108]
lea rcx, [rsp + 0x60]
call fcn.1801625a0
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x20], rax
jmp 0x180164d78
mov rax, qword [rsp + 0x20]
add rax, 0x14
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x20], rax
jae 0x180164e29
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x20]
movss xmm2, dword [rax + 4]
mov rax, qword [rsp + 0x20]
movss xmm1, dword [rax]
lea rcx, [rsp + 0x80]
call fcn.1801185c0
mov r8, qword [rsp + 0xf8]
mov rdx, rax
lea rcx, [rsp + 0x88]
call fcn.180162340
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rsp + 0x90]
call fcn.1801629f0
mov r8, rax
mov rdx, qword [rsp + 0x108]
lea rcx, [rsp + 0x98]
call fcn.1801622e0
mov qword [rsp + 0x78], rax
mov r9, qword [rsp + 0x68]
lea r8, [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0xa0]
call fcn.180162650
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 8], rax
jmp 0x180164d6a
jmp 0x180164eca
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
jmp 0x180164e48
mov rax, qword [rsp + 0x28]
add rax, 0x14
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x28], rax
jae 0x180164eca
mov rax, qword [rsp + 0x28]
movss xmm2, dword [rax + 4]
mov rax, qword [rsp + 0x28]
movss xmm1, dword [rax]
lea rcx, [rsp + 0xa8]
call fcn.1801185c0
mov r8, qword [rsp + 0xf8]
mov rdx, rax
lea rcx, [rsp + 0xb0]
call fcn.180162340
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rsp + 0xb8]
call fcn.1801629f0
mov r8, rax
mov rdx, qword [rsp + 0x108]
lea rcx, [rsp + 0xc0]
call fcn.1801622e0
mov rax, qword [rax]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
jmp 0x180164e3a
add rsp, 0xd8
ret
Function at 0x1801777b0
Capabilities:
Log keystrokes via polling

Disassembly:
sub rsp, 0x78
mov rax, qword [0x18024bd40]
xor rax, rsp
mov qword [rsp + 0x60], rax
call fcn.1800ec150
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x50]
mov rcx, qword [0x1802a1428]
call qword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [rsp + 0x54]
mov ecx, dword [rsp + 0x5c]
sub ecx, eax
mov eax, ecx
cvtsi2ss xmm0, eax
mov eax, dword [rsp + 0x50]
mov ecx, dword [rsp + 0x58]
sub ecx, eax
mov eax, ecx
cvtsi2ss xmm1, eax
movaps xmm2, xmm0
lea rcx, [rsp + 0x48]
call fcn.1801185c0
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 8], rax
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [0x1802a1430]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
cvtsi2ss xmm0, rax
cvtsi2ss xmm1, qword [0x1802a1438]
divss xmm0, xmm1
mov rax, qword [rsp + 0x20]
movss dword [rax + 0x10], xmm0
mov rax, qword [rsp + 0x40]
mov qword [0x1802a1430], rax
mov ecx, 0x11
call qword [sym.imp.USER32.dll_GetKeyState]
cwde
and eax, 0x8000
test eax, eax
je 0x18017787c
mov dword [rsp + 0x28], 1
jmp 0x180177884
mov dword [rsp + 0x28], 0
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rsp + 0x28]
mov byte [rax + 0xe04], cl
mov ecx, 0x10
call qword [sym.imp.USER32.dll_GetKeyState]
cwde
and eax, 0x8000
test eax, eax
je 0x1801778b3
mov dword [rsp + 0x2c], 1
jmp 0x1801778bb
mov dword [rsp + 0x2c], 0
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rsp + 0x2c]
mov byte [rax + 0xe05], cl
mov ecx, 0x12
call qword [sym.imp.USER32.dll_GetKeyState]
cwde
and eax, 0x8000
test eax, eax
je 0x1801778ea
mov dword [rsp + 0x30], 1
jmp 0x1801778f2
mov dword [rsp + 0x30], 0
mov rax, qword [rsp + 0x20]
movzx ecx, byte [rsp + 0x30]
mov byte [rax + 0xe06], cl
mov rax, qword [rsp + 0x20]
mov byte [rax + 0xe07], 0
call fcn.180177aa0
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + 0x68]
test eax, eax
je 0x18017792a
mov dword [rsp + 0x34], 0xffffffff
jmp 0x180177933
call fcn.1800f7650
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
cmp dword [0x18024bd08], eax
je 0x180177956
mov eax, dword [rsp + 0x38]
mov dword [0x18024bd08], eax
call fcn.180177980
call fcn.180177bc0
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1801909d0
add rsp, 0x78
ret
Function at 0x18018fabc
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x18018faf6
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x18018fafb
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x18018fb44
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1801fbea0]
cmp byte [rcx + rax], 0
je 0x18018fb44
dec r8
sub rdx, 1
jne 0x18018fb2a
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00404460]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00404470]
mov dword [rax], 1
mov rax, qword [0x00404480]
mov dword [rax], 1
mov rax, qword [0x00404450]
mov dword [rax], 1
mov rax, qword [0x00404340]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00404440]
mov dword [0x00407008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00404400]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004042f0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058

Function at 0x401550
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
call sym.__main
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x37d
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
mov r8d, 0x37d
lea rdx, [0x00403020]
mov rcx, rax
call sym.memmove
mov rax, qword [rbp - 8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8, rax
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
nop
add rsp, 0x40
pop rbp
ret
Function at 0x401b10
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00407624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x401c98
mov rax, qword [0x00407628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x401b5c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x401be5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x401b40
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x401ccd
mov rax, qword [0x00407628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00407628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401cb0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x401bde
sub eax, 0x40
and eax, 0xffffffbf
jne 0x401c40
add dword [0x00407624], 1
cmp edi, 8
jae 0x401c13
test dil, 4
jne 0x401c84
test edi, edi
je 0x401c08
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x401c9f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x401c08
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x401c2c
jmp 0x401c08
add rsi, qword [0x00407628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401bde
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x401c08
xor esi, esi
jmp 0x401b67
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x401c08
mov rax, qword [0x00407628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x402420
Capabilities:
Get thread local storage value

Disassembly:
push rbp
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 0x402474
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40246b
test rsi, rsi
je 0x40246b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402450
lea rcx, [0x00407900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x4026b0
Capabilities:
Parse pe header

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

Function at 0x4026d0
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 0x402711
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x402708
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402713
add rax, 0x28
cmp rax, r9
jne 0x4026f4
xor eax, eax
ret

Function at 0x4027b0
Capabilities:
Enumerate pe sections

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

Function at 0x402920
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00404340]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x402940
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402938
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40299d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402994
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4029a4
add rax, 0x28
cmp rax, r9
jne 0x402980
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x4029c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00404340]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x402a2e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402a2e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x402a2e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x402a2e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x402a25
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x402a35
add rcx, 0x28
cmp rcx, rax
jne 0x402a10
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x402a48
jmp 0x402a2e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x402a56
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x402a2e
test r9d, r9d
jg 0x402a40
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400054f0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140005500]
mov dword [rax], 1
mov rax, qword [0x140005510]
mov dword [rax], 1
mov rax, qword [0x140005490]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400054e0]
mov dword [0x140008020], 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 [0x1400055b0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140005590]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140005440]
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 0x1400020c0
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 0x140002130
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400080b4]
mov rbx, rcx
test esi, esi
jle 0x140002260
mov rax, qword [0x1400080b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000217b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002205
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002160
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140002282
mov rax, qword [0x1400080b8]
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 [0x1400080b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002267
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400021fe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002210
add dword [0x1400080b4], 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 [0x1400080b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400021fe
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 0x140002188
mov rax, qword [0x1400080b8]
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 0x1400027f0
Capabilities:
Get thread local storage value

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

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

Function at 0x140002a90
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 0x140002add
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 0x140002ad4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140002adf
add rax, 0x28
cmp rax, r9
jne 0x140002ac0
xor eax, eax
ret

Function at 0x140002ae0
Capabilities:
Parse pe header

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

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

Function at 0x140002c00
Capabilities:
Parse pe header

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

Disassembly:
mov r8, qword [0x140005490]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002c60
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002c68
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002c60
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002cb0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140002ca7
test rcx, rcx
je 0x140002c60
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x140002c98
xor eax, eax
ret

Function at 0x140002cc0
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x140005490]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002d20
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002d28
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002d20
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140002d20
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 0x140002d74
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140002d80
add rdx, 0x28
cmp r9, rdx
jne 0x140002d60
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x140005490]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002db2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002dc0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002db2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002db2
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140002db2
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 0x140002e15
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002e28
add rdx, 0x28
cmp rdx, r10
jne 0x140002e00
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002e37
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002e47
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002e1e
test ecx, ecx
jg 0x140002e30
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret