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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00435b90]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x00435ba0]
mov dword [rax], 1
mov rax, qword [0x00435bb0]
mov dword [rax], 1
mov rax, qword [0x00435b80]
mov dword [rax], 1
mov rax, qword [0x00435a50]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x00435b70]
mov dword [0x0043b00c], 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 [0x00435b30]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004359e0]
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:
Query environment variable

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
lea rcx, str.ProgramFiles
call sym.getenv
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
add rsp, 0x30
pop rbp
ret

Function at 0x40164e
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov dword [rbp + 0x20], r8d
lea rdx, [0x0043300e]
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401686
mov eax, 0
jmp 0x401759
mov edx, dword [rbp + 0x18]
mov rax, qword [rbp - 8]
mov r8d, 0
mov rcx, rax
call sym.fseek
mov eax, dword [rbp + 0x20]
lea edx, [rax + 0x3ff]
test eax, eax
cmovs eax, edx
sar eax, 0xa
add eax, 1
shl eax, 0xa
mov dword [rbp - 0xc], eax
mov eax, dword [rbp - 0xc]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x4016e0
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov eax, 0
jmp 0x401759
mov eax, dword [rbp - 0xc]
movsxd rdx, eax
mov rax, qword [rbp - 0x18]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp + 0x20]
movsxd rdx, eax
mov rcx, qword [rbp - 8]
mov rax, qword [rbp - 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp - 0x20], rax
mov eax, dword [rbp + 0x20]
cdqe
cmp qword [rbp - 0x20], rax
je 0x401749
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov eax, 0
jmp 0x401759
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x18]
add rsp, 0x40
pop rbp
ret
Function at 0x40183e
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
lea rdx, [0x0043300e]
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401872
mov eax, 0
jmp 0x401987
mov rax, qword [rbp - 8]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.ftell
sub eax, dword [rbp + 0x18]
mov dword [rbp - 0xc], eax
mov edx, dword [rbp + 0x18]
mov rax, qword [rbp - 8]
mov r8d, 0
mov rcx, rax
call sym.fseek
mov eax, dword [rbp - 0xc]
lea edx, [rax + 0x3ff]
test eax, eax
cmovs eax, edx
sar eax, 0xa
add eax, 1
shl eax, 0xa
mov dword [rbp - 0x10], eax
mov eax, dword [rbp - 0x10]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x4018f8
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov eax, 0
jmp 0x401987
mov eax, dword [rbp - 0x10]
movsxd rdx, eax
mov rax, qword [rbp - 0x18]
mov r8, rdx
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [rbp - 0xc]
movsxd rdx, eax
mov rcx, qword [rbp - 8]
mov rax, qword [rbp - 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp - 0x20], rax
mov eax, dword [rbp - 0xc]
cdqe
cmp qword [rbp - 0x20], rax
je 0x401961
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov eax, 0
jmp 0x401987
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
mov edx, dword [rbp - 0xc]
mov rax, qword [rbp - 0x18]
lea r8, str.idXCX6NtpNUlsQsP
mov rcx, rax
call sym.xabFtEySbddlrYVl
mov rax, qword [rbp - 0x18]
add rsp, 0x40
pop rbp
ret

Function at 0x4021a0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x28
mov r9, rcx
mov rcx, rdx
mov edx, 1
mov r9, qword [r9 + 8]
call sym.fwrite
add rsp, 0x28
ret
Function at 0x406fe0
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
mov rbx, rdx
lea rdx, [0x004334ec]
call sym.fopen
mov r12, rax
test rax, rax
je 0x407068
mov rcx, rax
mov r8d, 2
xor edx, edx
call sym.fseek
mov rcx, r12
test eax, eax
jne 0x407078
call sym.ftell
cdqe
mov qword [rbx], rax
lea rcx, [rax + 1]
call sym.malloc
mov r13, rax
test rax, rax
je 0x40705d
xor r8d, r8d
xor edx, edx
mov rcx, r12
call sym.fseek
mov r8, qword [rbx]
mov r9, r12
mov edx, 1
mov rcx, r13
call sym.fread
cmp rax, qword [rbx]
jne 0x407090
mov byte [r13 + rax], 0
mov rcx, r12
mov r12, r13
call sym.fclose
mov rax, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
ret
call sym.fclose
xor r12d, r12d
mov rax, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
ret
mov rcx, r13
xor r12d, r12d
call sym.free
jmp 0x407068
Function at 0x411340
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
lea rdx, [0x004334ec]
call sym.fopen
mov r12, rax
test rax, rax
je 0x41138e
mov rcx, rax
mov r8d, 2
xor edx, edx
call sym.fseek
mov rcx, r12
test eax, eax
jne 0x4113e0
call sym.ftell
movsxd rbx, eax
test ebx, ebx
jg 0x4113a0
xor r13d, r13d
mov rcx, r12
mov r12, r13
call sym.fclose
mov rax, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
ret
lea ecx, [rbx + 1]
movsxd rcx, ecx
call sym.malloc
mov r13, rax
test rax, rax
je 0x411380
xor r8d, r8d
xor edx, edx
mov rcx, r12
call sym.fseek
mov r9, r12
mov r8, rbx
mov edx, 1
mov rcx, r13
call sym.fread
cmp rbx, rax
jne 0x4113f8
mov byte [r13 + rbx], 0
jmp 0x411383
call sym.fclose
xor r12d, r12d
mov rax, r12
add rsp, 0x20
pop rbx
pop r12
pop r13
ret
mov rcx, r13
call sym.free
jmp 0x411380

Function at 0x4117e0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rdi
sub rsp, 0x190
mov r15, rcx
call sym.json_fread
mov r12, rax
test rax, rax
je 0x411948
lea rdx, [0x004338ec]
mov rcx, r15
call sym.fopen
mov r13, rax
test rax, rax
je 0x411948
lea rax, [sym.json_printer_file]
pxor xmm0, xmm0
mov rcx, r12
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], rax
movups xmmword [rsp + 0x40], xmm0
call sym.strlen
lea r9, [rsp + 0x50]
mov ecx, 0x27
lea rdx, [rsp + 0x20]
mov qword [rsp + 0x28], 0
mov r8, rax
mov rdi, r9
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor eax, eax
rep stosq qword [rdi], rax
movsxd rax, r8d
mov qword [rsp + 0x58], r12
lea rdi, [sym.prettify_cb]
add rax, r12
mov qword [rsp + 0x178], rdx
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x180], rdi
cmp r12, rax
ja 0x4118f0
je 0x411953
mov rcx, r9
call sym.json_parse_value
mov r14d, eax
test eax, eax
js 0x411900
mov rax, qword [rsp + 0x58]
sub rax, r12
mov r14d, eax
test eax, eax
js 0x411900
mov rdx, r13
mov ecx, 0xa
call sym.fputc
mov rcx, r13
call sym.fclose
mov rcx, r12
call sym.free
mov eax, r14d
add rsp, 0x190
pop rdi
pop r12
pop r13
pop r14
pop r15
ret
mov r14d, 0xffffffff
nop word cs:[rax + rax]
mov rcx, r13
call sym.fclose
mov rcx, r15
lea rdx, [0x004338ec]
call sym.fopen
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov r13, rax
call sym.fseek
mov rcx, r12
call sym.strlen
mov r9, r13
mov edx, 1
mov rcx, r12
mov r8, rax
call sym.fwrite
jmp 0x4118cb
mov r14d, 0xffffffff
jmp 0x4118d3
mov r14d, 0xfffffffe
jmp 0x411900
Function at 0x428df0
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push rsi
push rbx
lea rax, [rcx + 0xf]
sub rax, rdx
cmp rax, 0x1e
jbe 0x428e8f
movdqu xmm0, xmmword [rdx]
movups xmmword [rcx], xmm0
movzx r9d, byte [rcx + 0xf]
movzx r8d, byte [rcx + 0xe]
mov r10d, 4
lea r11, [0x004350c0]
movzx edx, byte [rcx + 0xd]
movzx eax, byte [rcx + 0xc]
lea rsi, [0x00434fa0]
test r10b, 3
jne 0x428e63
movzx edx, dl
movzx r8d, r8b
movzx r9d, r9b
movzx eax, al
movzx ebx, byte [r11 + rdx]
movzx edx, byte [r11 + r8]
movzx r8d, byte [r11 + r9]
movzx r9d, byte [r11 + rax]
mov eax, r10d
shr eax, 2
xor bl, byte [rsi + rax]
mov eax, ebx
xor al, byte [rcx]
xor dl, byte [rcx + 1]
add r10d, 1
add rcx, 4
xor r8b, byte [rcx - 2]
xor r9b, byte [rcx - 1]
mov byte [rcx + 0xc], al
mov byte [rcx + 0xd], dl
mov byte [rcx + 0xe], r8b
mov byte [rcx + 0xf], r9b
cmp r10d, 0x2c
jne 0x428e30
pop rbx
pop rsi
ret
movzx eax, byte [rdx]
mov byte [rcx], al
movzx eax, byte [rdx + 1]
mov byte [rcx + 1], al
movzx eax, byte [rdx + 2]
mov byte [rcx + 2], al
movzx eax, byte [rdx + 3]
mov byte [rcx + 3], al
movzx eax, byte [rdx + 4]
mov byte [rcx + 4], al
movzx eax, byte [rdx + 5]
mov byte [rcx + 5], al
movzx eax, byte [rdx + 6]
mov byte [rcx + 6], al
movzx eax, byte [rdx + 7]
mov byte [rcx + 7], al
movzx eax, byte [rdx + 8]
mov byte [rcx + 8], al
movzx eax, byte [rdx + 9]
mov byte [rcx + 9], al
movzx eax, byte [rdx + 0xa]
mov byte [rcx + 0xa], al
movzx eax, byte [rdx + 0xb]
mov byte [rcx + 0xb], al
movzx eax, byte [rdx + 0xc]
mov byte [rcx + 0xc], al
movzx eax, byte [rdx + 0xd]
mov byte [rcx + 0xd], al
movzx eax, byte [rdx + 0xe]
mov byte [rcx + 0xe], al
movzx eax, byte [rdx + 0xf]
mov byte [rcx + 0xf], al
jmp 0x428e0a
Function at 0x429db0
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
mov r8, rcx
mov rcx, rdx
mov rdx, r8
jmp sym.Cipher

Function at 0x429dc0
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
mov r8, rcx
mov rcx, rdx
mov rdx, r8
jmp sym.InvCipher

Function at 0x429eb0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
xor edi, edi
mov rsi, rcx
mov rbx, rdx
mov rbp, r8
test r8, r8
je 0x429f96
nop dword [rax]
movdqu xmm4, xmmword [rbx]
mov rcx, rbx
mov rdx, rsi
add rdi, 0x10
call sym.InvCipher
movzx eax, byte [rsi + 0xb0]
xor byte [rbx], al
movzx eax, byte [rsi + 0xb1]
xor byte [rbx + 1], al
movzx eax, byte [rsi + 0xb2]
xor byte [rbx + 2], al
movzx eax, byte [rsi + 0xb3]
xor byte [rbx + 3], al
movzx eax, byte [rsi + 0xb4]
xor byte [rbx + 4], al
movzx eax, byte [rsi + 0xb5]
xor byte [rbx + 5], al
movzx eax, byte [rsi + 0xb6]
xor byte [rbx + 6], al
movzx eax, byte [rsi + 0xb7]
xor byte [rbx + 7], al
movzx eax, byte [rsi + 0xb8]
xor byte [rbx + 8], al
movzx eax, byte [rsi + 0xb9]
xor byte [rbx + 9], al
movzx eax, byte [rsi + 0xba]
xor byte [rbx + 0xa], al
movzx eax, byte [rsi + 0xbb]
xor byte [rbx + 0xb], al
movzx eax, byte [rsi + 0xbc]
xor byte [rbx + 0xc], al
movzx eax, byte [rsi + 0xbd]
xor byte [rbx + 0xd], al
movzx eax, byte [rsi + 0xbe]
xor byte [rbx + 0xe], al
movzx eax, byte [rsi + 0xbf]
xor byte [rbx + 0xf], al
add rbx, 0x10
movups xmmword [rsi + 0xb0], xmm4
cmp rbp, rdi
ja 0x429ed0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x429fa0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbx, rdx
lea rsi, [rdx + r8]
mov rdi, rcx
mov edx, 0x10
lea rbp, [rsp + 0x20]
test r8, r8
je 0x429fe3
nop dword [rax]
cmp edx, 0x10
je 0x429ff0
movsxd rax, edx
add edx, 1
movzx eax, byte [rsp + rax + 0x20]
xor byte [rbx], al
add rbx, 1
cmp rsi, rbx
jne 0x429fc8
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
movdqu xmm0, xmmword [rdi + 0xb0]
mov rdx, rdi
mov rcx, rbp
movups xmmword [rsp + 0x20], xmm0
call sym.Cipher
movzx eax, byte [rdi + 0xbf]
mov edx, 0xf
cmp al, 0xff
je 0x42a030
add eax, 1
mov byte [rdi + rdx + 0xb0], al
mov edx, 1
xor eax, eax
jmp 0x429fd3
movzx eax, byte [rdi + 0xbe]
mov byte [rdi + 0xbf], 0
mov edx, 0xe
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xbd]
mov byte [rdi + 0xbe], 0
mov edx, 0xd
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xbc]
mov byte [rdi + 0xbd], 0
mov edx, 0xc
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xbb]
mov byte [rdi + 0xbc], 0
mov edx, 0xb
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xba]
mov byte [rdi + 0xbb], 0
mov edx, 0xa
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb9]
mov byte [rdi + 0xba], 0
mov edx, 9
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb8]
mov byte [rdi + 0xb9], 0
mov edx, 8
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb7]
mov byte [rdi + 0xb8], 0
mov edx, 7
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb6]
mov byte [rdi + 0xb7], 0
mov edx, 6
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb5]
mov byte [rdi + 0xb6], 0
mov edx, 5
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb4]
mov byte [rdi + 0xb5], 0
mov edx, 4
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb3]
mov byte [rdi + 0xb4], 0
mov edx, 3
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb2]
mov byte [rdi + 0xb3], 0
mov edx, 2
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb1]
mov byte [rdi + 0xb2], 0
mov edx, 1
cmp al, 0xff
jne 0x42a018
movzx eax, byte [rdi + 0xb0]
mov byte [rdi + 0xb1], 0
xor edx, edx
cmp al, 0xff
jne 0x42a018
mov byte [rdi + 0xb0], 0
mov edx, 1
xor eax, eax
jmp 0x429fd3

Function at 0x42a680
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 0x42a6f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x0043b654]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x42a898
mov rax, qword [0x0043b658]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x42a73c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x42a7c7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x42a720
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x42a8d2
mov rax, qword [0x0043b658]
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 [0x0043b658]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x42a8e1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x42a7c0
sub eax, 4
and eax, 0xfffffffb
jne 0x42a850
add dword [0x0043b654], 1
cmp ebx, 8
jae 0x42a7f8
test bl, 4
jne 0x42a8a0
test ebx, ebx
je 0x42a7e9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x42a8c0
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 0x42a7e9
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 0x42a82a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x0043b658]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x42a7c0
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 edi, edi
jmp 0x42a747
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x42a7e9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x42a7e9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x0043b658]
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
nop
nop dword [rax]
Function at 0x42b0c0
Capabilities:
Get thread local storage value

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

Function at 0x42b340
Capabilities:
Parse pe header

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

Function at 0x42b360
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 0x42b3a5
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 0x42b39c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x42b3a7
add rax, 0x28
cmp rax, r9
jne 0x42b388
xor eax, eax
ret

Function at 0x42b450
Capabilities:
Enumerate pe sections

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

Function at 0x42b5b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00435a50]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x42b61f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x42b61f
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 0x42b61d
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 0x42b614
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x42b628
add rax, 0x28
cmp rax, r9
jne 0x42b600
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x42b640
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00435a50]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x42b6b8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x42b6b8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x42b6b8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x42b6b8
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 0x42b6ac
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x42b6c0
add rdx, 0x28
cmp rdx, r10
jne 0x42b698
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x42b6d0
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x42b6de
mov edx, dword [rax + 0xc]
test edx, edx
je 0x42b6b5
test r8d, r8d
jg 0x42b6c8
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x431060
Capabilities:
Create directory

Disassembly:
push rbp
sub rsp, 0x130
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xc0], rcx
mov rcx, qword [rbp + 0xc0]
call sym.strlen
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 0
mov rax, qword [rbp + 0xa8]
cmp rax, qword [rbp + 0xa0]
jae 0x431120
mov rdx, qword [rbp + 0xc0]
mov rax, qword [rbp + 0xa8]
add rax, rdx
movzx eax, byte [rax]
cmp al, 0x2f
je 0x4310d5
mov rdx, qword [rbp + 0xc0]
mov rax, qword [rbp + 0xa8]
add rax, rdx
movzx eax, byte [rax]
cmp al, 0x5c
jne 0x431113
mov rdx, qword [rbp + 0xa8]
lea rax, [rbp - 0x60]
mov r8, rdx
mov rdx, qword [rbp + 0xc0]
mov rcx, rax
call sym.strncpy
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xa8]
add rax, rdx
mov byte [rax], 0
lea rax, [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__mkdir]
call rax
add qword [rbp + 0xa8], 1
jmp 0x431095
mov rcx, qword [rbp + 0xc0]
mov rax, qword [sym.imp.msvcrt.dll__mkdir]
call rax
mov eax, 0
add rsp, 0x130
pop rbp
ret

Function at 0x431140
Capabilities:
Get common file path

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov rax, qword [0x00432210]
test rax, rax
jne 0x43119a
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rax
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
add eax, 1
mov eax, eax
mov rcx, rax
call sym.malloc
mov qword [0x00432210], rax
mov rax, qword [0x00432210]
mov edx, dword [rbp - 4]
lea ecx, [rdx + 1]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rax
mov rax, qword [0x00432210]
add rsp, 0x30
pop rbp
ret

Function at 0x4311b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0xffffffff
setne al
add rsp, 0x30
pop rbp
ret
Function at 0x431230
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
mov eax, 0x1040
call fcn.0042b700
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xfd0], rcx
mov qword [rbp + 0xfd8], rdx
lea rdx, [0x0043300e]
mov rcx, qword [rbp + 0xfd0]
call sym.fopen
mov qword [rbp + 0xfb8], rax
cmp qword [rbp + 0xfb8], 0
je 0x43136d
mov rax, qword [rbp + 0xfd8]
lea rdx, [0x00433011]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0xfb0], rax
cmp qword [rbp + 0xfb0], 0
je 0x431370
mov rdx, qword [rbp + 0xfb8]
lea rax, [rbp - 0x60]
mov r9, rdx
mov r8d, 0x1000
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp + 0xfa8], rax
cmp qword [rbp + 0xfa8], 0
setne al
test al, al
je 0x43134d
mov rcx, qword [rbp + 0xfb0]
mov rdx, qword [rbp + 0xfa8]
lea rax, [rbp - 0x60]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
cmp qword [rbp + 0xfa8], rax
setne al
test al, al
je 0x431331
mov rax, qword [rbp + 0xfb8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xfb0]
mov rcx, rax
call sym.fclose
jmp 0x431371
lea rax, [rbp - 0x60]
mov r8d, 0x1000
mov edx, 0
mov rcx, rax
call sym.memset
jmp 0x4312a7
mov rax, qword [rbp + 0xfb8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xfb0]
mov rcx, rax
call sym.fclose
jmp 0x431371
nop
jmp 0x431371
nop
add rsp, 0x1040
pop rbp
ret