joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18005bd24
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x18005bd93
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x18005bd93
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x18005bd93
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x18005bd93
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x18005bd93
cmp dword [rcx + 0x84], 0xe
jbe 0x18005bd93
cmp dword [rcx + 0xf8], 0
je 0x18005bd93
mov ecx, ebx
call fcn.18005be38
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.18005bc2c
nop
cmp dword [rbp + 0x20], 0
jne 0x18005bdf4
call fcn.180066e40
cmp eax, 1
jne 0x18005bde4
xor dl, dl
jmp 0x18005bdee
call fcn.180066e0c
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x18005bdff
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.18005be08
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x18005bd24
Function at 0x18005f9ac
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
xor edi, edi
mov rax, r15
lea rcx, [0x180092640]
and eax, 0x3f
mov r12, r15
sar r12, 6
mov rsi, rdx
lea r9d, [rdi + 0xa]
mov r14, r15
lea rbp, [rax + rax*8]
mov rax, qword [rcx + r12*8]
mov r10, qword [rax + rbp*8 + 0x28]
test r8, r8
je 0x18005fa02
cmp word [rdx], r9w
jne 0x18005fa02
or byte [rax + rbp*8 + 0x38], 4
jmp 0x18005fa07
and byte [rax + rbp*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rax, rsi
mov rbx, rsi
cmp rsi, r8
jae 0x18005fb86
mov r11d, 0xd
lea r13d, [r11 - 0xb]
movzx edx, word [rax]
cmp dx, 0x1a
je 0x18005fb51
lea rcx, [rax + 2]
cmp dx, r11w
jne 0x18005fa4f
cmp rcx, r8
jae 0x18005fa6f
cmp word [rcx], r9w
jne 0x18005fa4f
add rax, 4
mov edx, r9d
jmp 0x18005fa52
mov rax, rcx
mov word [rbx], dx
mov r9, r13
mov rcx, rbx
mov r9d, 0xa
lea rbx, [rbx + r13]
cmp rax, r8
jb 0x18005fa24
jmp 0x18005fb86
lea r9, [rsp + 0x80]
mov word [rsp + 0x70], di
mov r8d, r13d
mov dword [rsp + 0x80], edi
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x20], rdi
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18005fb4a
cmp dword [rsp + 0x80], edi
je 0x18005fb4a
lea r9, [0x180092640]
mov rax, qword [r9 + r12*8]
test byte [rax + rbp*8 + 0x38], 0x48
mov ebp, 0xa
je 0x18005fb24
movzx eax, word [rsp + 0x70]
cmp ax, bp
jne 0x18005fad7
mov word [rbx], bp
jmp 0x18005fb83
mov word [rsp + 0x78], ax
mov rdx, r14
mov rax, r14
sar rdx, 6
and eax, 0x3f
mov word [rbx], 0xd
lea r8, [rax + rax*8]
mov rax, qword [r9 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, r13
jl 0x18005faf2
mov rax, r14
sar rax, 6
and r14d, 0x3f
mov rax, qword [r9 + rax*8]
lea rcx, [r14 + r14*8]
mov byte [rax + rcx*8 + 0x3c], bpl
jmp 0x18005fb83
cmp word [rsp + 0x70], bp
jne 0x18005fb30
cmp rbx, rsi
je 0x18005facf
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.18005da30
cmp word [rsp + 0x70], bp
je 0x18005fb86
mov word [rbx], 0xd
jmp 0x18005fb83
mov rcx, r15
lea r9, [0x180092640]
and ecx, 0x3f
mov rax, r15
sar rax, 6
lea r8, [rcx + rcx*8]
mov rcx, qword [r9 + rax*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x18005fb80
or al, r13b
mov byte [rcx + r8*8 + 0x38], al
jmp 0x18005fb86
mov word [rbx], dx
add rbx, r13
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x180060b8c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov rax, qword [0x180097050]
mov ebx, r9d
mov rdi, r8
mov esi, edx
mov rbp, rcx
cmp rax, 0xffffffffffffffff
je 0x180060bf1
test rax, rax
jne 0x180060bdf
lea r9, str.GetLocaleInfoEx
lea r8, [0x18007a4e8]
lea rdx, str.GetLocaleInfoEx
lea ecx, [rax + 0xa]
call fcn.180060860
test rax, rax
je 0x180060bf1
mov r9d, ebx
mov r8, rdi
mov edx, esi
mov rcx, rbp
call fcn.180071d70
jmp 0x180060c0b
xor edx, edx
mov rcx, rbp
call fcn.180060e7c
mov ecx, eax
mov r9d, ebx
mov r8, rdi
mov edx, esi
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x180063ea4
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x180063eba
mov al, 1
jmp 0x180063f26
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x180063ecb
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x180063f24
mov ecx, dword [rcx + 0x18]
nop
call fcn.180068c7c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180063f24
and qword [rsp + 0x38], 0
lea r8, [rsp + 0x38]
mov r9d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180063f24
and qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180063f24
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x180063f26
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x180068478
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1800684a8
xor eax, eax
jmp 0x18006856b
mov rbp, rbx
cmp word [rax], si
je 0x1800684cd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1800684b4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1800684b0
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.180066cdc
movsxd r14, eax
mov rcx, r14
test eax, eax
jne 0x18006850e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1800684a1
call fcn.180062490
mov rdi, rax
test rax, rax
jne 0x180068524
xor ecx, ecx
call fcn.180060760
jmp 0x180068503
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.180066cdc
test eax, eax
jne 0x180068555
mov rcx, rdi
call fcn.180060760
jmp 0x18006855f
xor ecx, ecx
call fcn.180060760
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x18006b2d0
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor esi, esi
mov rdi, rdx
mov dword [rsp + 0x30], esi
mov rbx, rcx
test rcx, rcx
je 0x18006b343
cmp word [rcx], si
je 0x18006b343
lea rdx, [0x18007ba28]
call fcn.18006eae0
test eax, eax
je 0x18006b343
lea rdx, [0x18007ba40]
mov rcx, rbx
call fcn.18006eae0
test eax, eax
jne 0x18006b339
mov ecx, dword [rdi + 8]
lea r9d, [rsi + 2]
lea r8, [rsp + 0x30]
mov edx, 0x2000000b
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x18006b360
mov eax, dword [rsp + 0x30]
jmp 0x18006b372
mov rcx, rbx
call fcn.18005d6b8
jmp 0x18006b372
mov ecx, dword [rdi + 8]
lea r8, [rsp + 0x30]
mov r9d, 2
mov edx, 0x20001004
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jne 0x18006b364
xor eax, eax
jmp 0x18006b372
mov eax, dword [rsp + 0x30]
test eax, eax
jne 0x18006b372
call qword [sym.imp.KERNEL32.dll_GetACP]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x18006b384
Capabilities:
Get geographical location

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov ebp, edx
mov dword [rax + 8], ebx
mov edi, ecx
call fcn.18005df54
mov ecx, edi
lea r9d, [rbx + 2]
and ecx, 0x3ff
lea r8, [rsp + 0x30]
bts ecx, 0xa
mov edx, 0x20000001
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x18006b427
cmp edi, dword [rsp + 0x30]
je 0x18006b420
test ebp, ebp
je 0x18006b420
mov r9, qword [rsi + 0x98]
mov r8d, ebx
movzx edx, word [r9]
lea rcx, [r9 + 2]
lea eax, [rdx - 0x41]
cmp ax, 0x19
jbe 0x18006b3fc
sub dx, 0x61
cmp dx, 0x19
ja 0x18006b408
movzx edx, word [rcx]
inc r8d
add rcx, 2
jmp 0x18006b3e9
or rax, 0xffffffffffffffff
inc rax
cmp word [r9 + rax*2], bx
jne 0x18006b40c
cmp r8d, eax
setne bl
mov eax, ebx
jmp 0x18006b429
mov eax, 1
jmp 0x18006b429
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x18006f5d8
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.18005da30
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.18005da30
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x18006f725
cmp rax, 0xffffffffffffffff
je 0x18006f725
xor edi, edi
test rbp, rbp
jle 0x18006f6d3
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1800606e0
mov rbx, rax
test rax, rax
jne 0x18006f660
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x18006f6c9
mov edx, 0x8000
mov ecx, r14d
call fcn.18006f45c
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.180061d50
cmp eax, 0xffffffff
je 0x18006f6a9
cdqe
sub rbp, rax
test rbp, rbp
jg 0x18006f670
mov edx, r15d
mov ecx, r14d
call fcn.18006f45c
jmp 0x18006f6c9
cmp byte [rsi + 0x38], dil
je 0x18006f6c0
cmp dword [rsi + 0x34], 5
jne 0x18006f6c0
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x18006f6c9
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.180060760
jmp 0x18006f737
jns 0x18006f737
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.18005da30
cmp rax, 0xffffffffffffffff
jne 0x18006f6f1
cmp byte [rsi + 0x30], dil
je 0x18006f737
jmp 0x18006f72d
mov ecx, r14d
call fcn.180068c7c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x18006f737
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x18006f737
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x18006f732
mov edi, dword [rsi + 0x2c]
jmp 0x18006f737
mov edi, 0x16
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.18005da30
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x180070080
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1800700a8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1800700a8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140165b10]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140165b20]
mov dword [rax], 1
mov rax, qword [0x140165b30]
mov dword [rax], 1
mov rax, qword [0x140165b00]
mov dword [rax], 1
mov rax, qword [0x1401659c0]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x140165af0]
mov dword [0x14016900c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x1400010c0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140165ab0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140165a90]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140165970]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067
Function at 0x140003445
Capabilities:
Encode data using xor

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
cmp dword [rbp + 0x18], 0
je 0x1400035cb
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x5c]
mov edx, eax
mov rcx, qword [rbp + 0x10]
call sym.swd_remove_node
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x78]
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
mov eax, eax
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
shl eax, 5
mov ecx, eax
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x78]
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
add eax, 1
mov eax, eax
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
xor eax, ecx
shl eax, 5
mov ecx, eax
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x78]
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
add eax, 2
mov eax, eax
add rax, rdx
movzx eax, byte [rax]
movzx eax, al
xor eax, ecx
imul eax, eax, 0x9f5f
shr eax, 5
and eax, 0xffff
mov dword [rbp - 4], eax
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x80]
mov eax, dword [rbp - 4]
shl rax, 2
lea rcx, [rdx + rax]
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x88]
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
mov eax, eax
shl rax, 2
add rdx, rax
mov eax, dword [rcx]
mov dword [rdx], eax
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x80]
mov eax, dword [rbp - 4]
shl rax, 2
add rdx, rax
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
mov dword [rdx], eax
mov rax, qword [rbp + 0x10]
mov edx, dword [rax + 4]
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax + 0x90]
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
mov eax, eax
shl rax, 2
add rax, rcx
add edx, 1
mov dword [rax], edx
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x98]
mov eax, dword [rbp - 4]
shl rax, 2
add rax, rdx
mov edx, dword [rax]
add edx, 1
mov dword [rax], edx
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0x78]
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
mov eax, eax
add rax, rdx
movzx eax, word [rax]
movzx eax, ax
mov dword [rbp - 4], eax
mov rax, qword [rbp + 0x10]
mov rdx, qword [rax + 0xa0]
mov eax, dword [rbp - 4]
shl rax, 2
add rdx, rax
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x58]
mov dword [rdx], eax
mov rcx, qword [rbp + 0x10]
call sym.swd_getbyte
sub dword [rbp + 0x18], 1
cmp dword [rbp + 0x18], 0
jne 0x14000345e
nop
add rsp, 0x30
pop rbp
ret
Function at 0x1400068b0
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 0x140006920
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1401690c4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x140006ad0
mov rax, qword [0x1401690c8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000696c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400069f7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x140006950
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x140006b2d
mov rax, qword [0x1401690c8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1401690c8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140006b12
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400069f0
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140006a80
add dword [0x1401690c4], 1
cmp ebx, 8
jae 0x140006a28
test bl, 4
jne 0x140006ae0
test ebx, ebx
je 0x140006a19
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x140006b00
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x140006a19
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x140006a5a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x1401690c8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400069f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor edi, edi
jmp 0x140006977
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x140006a19
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x140006a19
mov rax, qword [0x1401690c8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop dword [rax]
Function at 0x140007040
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140169120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140169100]
test rbx, rbx
je 0x140007094
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 0x14000708b
test r12, r12
je 0x14000708b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140007070
lea rcx, [0x140169120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400072c0
Capabilities:
Parse pe header

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

Function at 0x1400072e0
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 0x140007325
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 0x14000731c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x140007327
add rax, 0x28
cmp rax, r9
jne 0x140007308
xor eax, eax
ret

Function at 0x1400073d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x1401659c0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x140007449
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x140007449
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 0x140007446
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 0x14000743d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x140007449
add r8, 0x28
cmp r8, r9
jne 0x140007428
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x140007530
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x1401659c0]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x14000759f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14000759f
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 0x14000759d
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 0x140007594
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400075a8
add rax, 0x28
cmp rax, r9
jne 0x140007580
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x1400075c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x1401659c0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x140007638
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x140007638
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x140007638
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x140007638
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 0x14000762c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x140007640
add rdx, 0x28
cmp rdx, r10
jne 0x140007618
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x140007650
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x14000765e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140007635
test r8d, r8d
jg 0x140007648
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor eax, eax
cmp word [0x00400000], 0x5a4d
mov dword [0x0049c048], 1
mov dword [0x0049c044], 1
mov dword [0x0049c040], 1
mov dword [0x0049c050], 1
je 0x4010b0
mov dword [0x0049c008], eax
mov eax, dword [0x0049c060]
test eax, eax
je 0x4010a1
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call dbg._encode_pointer
mov edx, dword [0x0049c070]
mov qword [0x0049d4a8], rax
mov qword [0x0049d4a0], rax
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov dword [rax], edx
call dbg._setargv
cmp dword [0x0046a050], 1
je 0x401100
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401063
movsxd rcx, dword [0x0040003c]
lea rdx, [0x00400000]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x401049
movzx ecx, word [rdx + 0x18]
cmp cx, 0x10b
je 0x401113
cmp cx, 0x20b
jne 0x401049
cmp dword [rdx + 0x84], 0xe
jbe 0x401049
mov edx, dword [rdx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401049
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rdx + 0x74], 0xe
jbe 0x401049
mov ecx, dword [rdx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401049