joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14007b084
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140063310
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14007b10e
cmp byte [rbp - 0x21], r15b
je 0x14007b109
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14007b144
call fcn.1400716e8
test eax, eax
jne 0x14007b130
cmp byte [rbp - 0x21], r15b
je 0x14007b128
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14007b144
cmp byte [rbp - 0x21], r15b
je 0x14007b141
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140074b68
test eax, eax
jne 0x14007b1e4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140063310
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14007b183
cmp byte [rbp - 0x21], r15b
je 0x14007b1b8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14007b1b8
call fcn.1400716e8
test eax, eax
jne 0x14007b1a4
cmp byte [rbp - 0x21], r15b
je 0x14007b19d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14007b1b8
cmp byte [rbp - 0x21], r15b
je 0x14007b1b5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140074b68
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14007b1e4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14007b1e7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14007b1f5
mov rcx, rdi
call fcn.14006ee94
cmp byte [rbp + 0x3f], r15b
je 0x14007b204
mov rcx, qword [rbp + 0x27]
call fcn.14006ee94
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x14007beb8
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.140070a38
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140070a38
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14007c008
cmp rax, 0xffffffffffffffff
je 0x14007c008
xor edi, edi
test rbp, rbp
jle 0x14007bfb3
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14006f59c
mov rbx, rax
test rax, rax
jne 0x14007bf40
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14007bfa9
mov edx, 0x8000
mov ecx, r14d
call fcn.14006eb40
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.1400726ec
cmp eax, 0xffffffff
je 0x14007bf89
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14007bf50
mov edx, r15d
mov ecx, r14d
call fcn.14006eb40
jmp 0x14007bfa9
cmp byte [rsi + 0x38], dil
je 0x14007bfa0
cmp dword [rsi + 0x34], 5
jne 0x14007bfa0
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14007bfa9
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14006ee94
jmp 0x14007c01c
jns 0x14007c01c
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140070a38
cmp rax, 0xffffffffffffffff
jne 0x14007bfd4
cmp byte [rsi + 0x30], dil
je 0x14007c01c
mov edi, dword [rsi + 0x2c]
jmp 0x14007c01c
mov ecx, r14d
call fcn.1400773b0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14007c01c
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 0x14007c01c
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14007c015
mov eax, dword [rsi + 0x2c]
jmp 0x14007c01a
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140070a38
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 0x6d88c730
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d8ad5e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d88c8b8
mov rax, qword [0x6d8ad5e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d88c77c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d88c805
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d88c760
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d88c8ed
mov rax, qword [0x6d8ad5e8]
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 [0x6d8ad5e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d88c8d0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d88c7fe
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d88c860
add dword [0x6d8ad5e4], 1
cmp edi, 8
jae 0x6d88c833
test dil, 4
jne 0x6d88c8a4
test edi, edi
je 0x6d88c828
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d88c8bf
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 0x6d88c828
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 0x6d88c84c
jmp 0x6d88c828
add rsi, qword [0x6d8ad5e8]
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 0x6d88c7fe
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 0x6d88c828
xor esi, esi
jmp 0x6d88c787
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d88c828
mov rax, qword [0x6d8ad5e8]
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 0x6d88d040
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6d8ad8c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6d8ad8a0]
test rbx, rbx
je 0x6d88d094
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 0x6d88d08b
test rsi, rsi
je 0x6d88d08b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d88d070
lea rcx, [0x6d8ad8c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6d88d2d0
Capabilities:
Parse pe header

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

Function at 0x6d88d2f0
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 0x6d88d331
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 0x6d88d328
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d88d333
add rax, 0x28
cmp rax, r9
jne 0x6d88d314
xor eax, eax
ret

Function at 0x6d88d3d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d8aa1f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x6d88d43d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d88d43d
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 0x6d88d43d
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 0x6d88d434
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d88d43f
add rax, 0x28
cmp rax, r9
jne 0x6d88d420
xor eax, eax
add rsp, 0x28
ret

Function at 0x6d88d540
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d8aa1f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d88d560
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d88d558
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 0x6d88d5bd
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 0x6d88d5b4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d88d5c4
add rax, 0x28
cmp rax, r9
jne 0x6d88d5a0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d88d5e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d8aa1f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d88d64e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d88d64e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d88d64e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d88d64e
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 0x6d88d645
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d88d655
add rcx, 0x28
cmp rcx, rax
jne 0x6d88d630
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d88d668
jmp 0x6d88d64e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d88d676
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d88d64e
test r9d, r9d
jg 0x6d88d660
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d88d9e0
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 sym.__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 sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x5fdc80
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x5fdc8d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x5fdc9d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x5fdc85
lea eax, [rcx + 1]
jmp 0x5fdcab
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x5fdcbe
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x5fdca4
sub eax, 3
jb 0x5fdcde
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x5fdd2d
sar eax, 1
movsxd rbp, eax
jb 0x5fdd14
jmp 0x5fdcec
add ebx, ebx
jne 0x5fdcea
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x5fdd14
inc ecx
add ebx, ebx
jne 0x5fdcfa
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x5fdd14
call r11
adc ecx, ecx
add ebx, ebx
jne 0x5fdd0d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x5fdcfc
add ecx, 2
jmp 0x5fdd19
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.005fdc42
jmp 0x5fdc8d
pop rsi
pop rdi
pop rax
mov dword [rdi], eax
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x12be00
mov dl, 0x15
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x5fdd7d
cmp rsi, rcx
jae 0x5fdd85
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x5fdd64
cmp al, 0x8f
ja 0x5fdd64
cmp byte [rsi - 2], 0xf
je 0x5fdd6a
sub al, 0xe8
cmp al, 1
ja 0x5fdd4e
cmp rsi, rcx
jae 0x5fdd85
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x5fdd54
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x5fdd85
lodsb al, byte [rsi]
jmp 0x5fdd64
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x1fb000]
mov eax, dword [rdi]
or eax, eax
je 0x5fdde2
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x1fd000]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x5fdd92
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x5fdddc
mov qword [rbx], rax
add rbx, 8
jmp 0x5fddb2
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
mov byte [fcn.005fde65], 0xfc
lea rcx, [rsi - 0x1000]
push 1
pop rdx
xor r8, r8
push rax
call fcn.005fde65
pop rax
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x5fde55
sub rsp, 0xffffffffffffff80
jmp 0x4014e0
Function at 0x401570
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov r14d, r9d
mov r15, r8
mov rbp, rdx
mov rdi, rcx
mov ecx, dword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rsp + 0x20], 0x40
xor esi, esi
mov rcx, 0xffffffffffffffff
xor edx, edx
mov r8, rbp
mov r9d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test rax, rax
je 0x40163b
mov rbx, rax
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov rcx, 0xffffffffffffffff
mov rdx, rbx
mov r8, rdi
mov r9, rbp
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x401639
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
xor esi, esi
mov rcx, 0xffffffffffffffff
xor edx, edx
xor r8d, r8d
mov r9, rbx
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [r15], rax
test rax, rax
je 0x40163b
test r14d, r14d
je 0x401634
mov rcx, rax
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rsi, rbx
jmp 0x40163b
xor esi, esi
mov rax, rsi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x401650
Capabilities:
Check for outputdebugstring error
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x4016e3
call fcn.00401710
cmp byte [rax + 2], 0
jne 0x4016e3
test byte [rax + 0xbc], 0x70
jne 0x4016e3
call fcn.00401d60
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x004a24b8]
mov edx, dword [rax]
mov rax, qword [0x004a2510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x004a24b0]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.00401570
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.00402760
nop
add rsp, 0x20
pop rbp
jmp 0x401650

Function at 0x4016f0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x38
mov ecx, 0x457
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str._api_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x457
jne 0x4016e3
call fcn.00401710
cmp byte [rax + 2], 0
jne 0x4016e3
test byte [rax + 0xbc], 0x70
jne 0x4016e3
call fcn.00401d60
mov qword [rsp + 0x30], 0xffffffffffffffff
mov rax, qword [0x004a24b8]
mov edx, dword [rax]
mov rax, qword [0x004a2510]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov rcx, qword [0x004a24b0]
lea r8, [rsp + 0x30]
mov r9d, 1
call fcn.00401570
test rax, rax
sete al
cmp qword [rsp + 0x30], 0xffffffffffffffff
sete cl
or cl, al
movzx eax, cl
neg eax
add rsp, 0x38
ret
xor ecx, ecx
call sub.msvcrt.dll_exit
int3
push rbp
sub rsp, 0x20
lea rbp, [rsp + 0x20]
call fcn.00402760
nop
add rsp, 0x20
pop rbp
jmp 0x401650
Function at 0x401720
Capabilities:
Access peb ldr_data

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

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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
test rcx, rcx
je 0x40261e
mov rsi, rdx
mov rbx, rcx
movsxd rax, dword [rcx + 0x3c]
mov edi, dword [rax + rcx + 0x88]
mov r13d, dword [rdi + rcx + 0x1c]
add r13, rcx
cmp esi, 0xffff
ja 0x4024a1
movzx eax, si
mov ecx, dword [rbx + rdi + 0x10]
sub rax, rcx
mov r12d, dword [r13 + rax*4]
add r12, rbx
jmp 0x402621
mov ebp, dword [rbx + rdi + 0x18]
test ebp, ebp
je 0x40261e
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r8
mov r14d, dword [rbx + rdi + 0x20]
mov r15d, dword [rbx + rdi + 0x24]
add r14, rbx
add r15, rbx
xor r12d, r12d
nop word [rax + rax]
mov ecx, dword [r14]
add rcx, rbx
mov rdx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4024f6
add ebp, 0xffffffff
add r14, 4
add r15, 2
test ebp, ebp
jne 0x4024d0
jmp 0x402621
movzx eax, word [r15]
mov r12d, dword [r13 + rax*4]
cmp edi, r12d
ja 0x402499
mov rax, qword [rsp + 0x38]
add edi, dword [rbx + rax + 0x8c]
cmp r12d, edi
jae 0x402499
add r12, rbx
mov rcx, r12
mov edx, 0x2e
call sub.msvcrt.dll_strchr
mov r14, rax
add r14, 1
mov rsi, r14
sub rsi, r12
lea rcx, [rsi + 4]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x40261e
mov rbx, rax
lea r8, [rsi + 1]
mov qword [rsp + 0x20], rsi
xor ecx, ecx
mov rdx, rax
mov r9, r12
call qword [sym.imp.msvcrt.dll_mbstowcs_s]
mov eax, dword [0x004a2016]
mov dword [rbx + rsi*2], eax
movzx eax, word [0x004a201a]
mov word [rbx + rsi*2 + 4], ax
lea rdx, [0x004a2002]
mov r8d, 4
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x4025ac
lea rdx, str.ext_
mov r8d, 4
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x4025fa
lea r8, [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rdx, rbx
call fcn.00401740
test rax, rax
je 0x4025fa
mov rsi, rax
mov rcx, rbx
call sub.msvcrt.dll_free
mov rdi, qword [rsp + 0x40]
lea rcx, [rdi + 1]
mov edx, 2
call sub.msvcrt.dll_calloc
test rax, rax
je 0x40261e
mov rbx, rax
add rdi, rdi
mov rcx, rax
mov rdx, rsi
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
mov rdx, r14
mov r8, rbx
call fcn.00402450
mov r12, rax
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x402621
xor r12d, r12d
mov rax, r12
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x402b60
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 fcn.00403d20
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.00403d20
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]