joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180042d8c
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 0x180042dbc
xor eax, eax
jmp 0x180042e7f
mov rbp, rbx
cmp word [rax], si
je 0x180042de1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x180042dc8
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x180042dc4
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.180041474
movsxd r14, eax
test eax, eax
jne 0x180042e1f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x180042db5
mov rcx, r14
call fcn.180038dbc
mov rdi, rax
test rax, rax
jne 0x180042e38
xor ecx, ecx
call fcn.180038d80
jmp 0x180042e14
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.180041474
test eax, eax
jne 0x180042e69
mov rcx, rdi
call fcn.180038d80
jmp 0x180042e73
xor ecx, ecx
call fcn.180038d80
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 0x180045a1c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.180037128
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x180045abd
cmp ebx, dword [rsp + 0x30]
je 0x180045ab6
test esi, esi
je 0x180045ab6
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x180045a91
sub r8w, 0x61
cmp r8w, 0x19
ja 0x180045a9e
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x180045a7b
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x180045aa2
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x180045abf
mov eax, 1
jmp 0x180045abf
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x18004a0ec
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.1800310b0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x18004a176
cmp byte [rbp - 0x21], r15b
je 0x18004a171
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x18004a1ac
call fcn.18003b9f8
test eax, eax
jne 0x18004a198
cmp byte [rbp - 0x21], r15b
je 0x18004a190
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x18004a1ac
cmp byte [rbp - 0x21], r15b
je 0x18004a1a9
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.1800357dc
test eax, eax
jne 0x18004a24c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1800310b0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x18004a1eb
cmp byte [rbp - 0x21], r15b
je 0x18004a220
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x18004a220
call fcn.18003b9f8
test eax, eax
jne 0x18004a20c
cmp byte [rbp - 0x21], r15b
je 0x18004a205
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x18004a220
cmp byte [rbp - 0x21], r15b
je 0x18004a21d
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.1800357dc
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x18004a24c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x18004a24f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x18004a25d
mov rcx, rdi
call fcn.180038d80
cmp byte [rbp + 0x3f], r15b
je 0x18004a26c
mov rcx, qword [rbp + 0x27]
call fcn.180038d80
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 0x18004b0e8
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.18003f9f4
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.18003f9f4
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x18004b238
cmp rax, 0xffffffffffffffff
je 0x18004b238
xor edi, edi
test rbp, rbp
jle 0x18004b1e3
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.180038d08
mov rbx, rax
test rax, rax
jne 0x18004b170
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x18004b1d9
mov edx, 0x8000
mov ecx, r14d
call fcn.18004af6c
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.18003cd54
cmp eax, 0xffffffff
je 0x18004b1b9
cdqe
sub rbp, rax
test rbp, rbp
jg 0x18004b180
mov edx, r15d
mov ecx, r14d
call fcn.18004af6c
jmp 0x18004b1d9
cmp byte [rsi + 0x38], dil
je 0x18004b1d0
cmp dword [rsi + 0x34], 5
jne 0x18004b1d0
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x18004b1d9
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.180038d80
jmp 0x18004b24c
jns 0x18004b24c
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.18003f9f4
cmp rax, 0xffffffffffffffff
jne 0x18004b204
cmp byte [rsi + 0x30], dil
je 0x18004b24c
mov edi, dword [rsi + 0x2c]
jmp 0x18004b24c
mov ecx, r14d
call fcn.1800479e0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x18004b24c
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 0x18004b24c
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x18004b245
mov eax, dword [rsi + 0x2c]
jmp 0x18004b24a
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.18003f9f4
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 0x18004ba90
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x18004bab8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x18004bab8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x1407ac058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1407ac1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1407ac089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1407ac06f
add dl, dl
jne 0x1407ac096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1407ac0f6
xor eax, eax
add dl, dl
jne 0x1407ac0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1407ac1ad
add dl, dl
jne 0x1407ac0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407ac0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407ac0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407ac0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1407ac0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1407ac07e
mov eax, 1
add dl, dl
jne 0x1407ac106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1407ac113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1407ac0fb
sub eax, ebx
mov ebx, 1
jne 0x1407ac14c
mov ecx, 1
add dl, dl
jne 0x1407ac12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1407ac13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1407ac123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1407ac07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1407ac168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1407ac175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1407ac15d
cmp eax, 0x7d00
jae 0x1407ac19b
cmp eax, 0x500
jb 0x1407ac196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1407ac07e
cmp eax, 0x7f
ja 0x1407ac19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1407ac07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1407ac1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1407ac07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140002f10
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 fcn.1400048a0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.1400048a0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140002f80
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000a0a4]
mov rbx, rcx
test esi, esi
jle 0x1400030b0
mov rax, qword [0x14000a0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002fcb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140003055
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002fb0
mov rcx, rbx
call fcn.1400039d0
mov rdi, rax
test rax, rax
je 0x1400030d2
mov rax, qword [0x14000a0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003b10
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000a0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400030b7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000304e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140003060
add dword [0x14000a0a4], 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 [0x14000a0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000304e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002f10
nop dword [rax]
xor esi, esi
jmp 0x140002fd8
mov rax, qword [0x14000a0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002f10
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002f10
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003640
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000a100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000a0e0]
test rbx, rbx
je 0x14000369c
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 0x140003693
test rsi, rsi
je 0x140003693
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003678
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 0x1400039d0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140003a50
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006ab0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140003a6f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003a78
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140003a6f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140003b10
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006ab0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003b2f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003b38
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x1400056d0
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], r9
push rdi
sub rsp, 0x40
mov rdi, r8
mov rsi, rdx
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x68], rbx
cmp dword [0x1400124d0], ebx
jne 0x140005793
mov eax, dword [0x1400124cc]
test eax, eax
jne 0x140005793
mov ecx, dword [0x1400124c4]
test ecx, ecx
je 0x140005733
lea rcx, str.IsolationAware_function_called_after_IsolationAwareCleanup_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x1400124cc]
mov ecx, dword [0x1400124c4]
test eax, eax
jne 0x140005793
test ecx, ecx
jne 0x140005744
call fcn.140002ee0
test eax, eax
je 0x14000575a
lea rdx, [rsp + 0x68]
mov rcx, qword [0x140010048]
call qword [sym.imp.KERNEL32.dll_ActivateActCtx]
test eax, eax
jne 0x140005793
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [rax - 0x7e]
cmp ecx, 1
jbe 0x140005789
cmp eax, 0x78
je 0x140005789
cmp eax, 1
je 0x140005789
cmp eax, 0x32
je 0x140005789
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov dword [0x1400124cc], 1
mov qword [rsp + 0x20], rbx
lea r9, [0x140004030]
mov r8, rdi
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.USER32.dll_CreateDialogIndirectParamW]
mov rsi, rax
mov qword [rsp + 0x30], rax
cmp dword [0x1400124d0], 0
je 0x1400057c7
cmp dword [0x1400124cc], 0
jne 0x1400057f5
mov edi, ebx
test rsi, rsi
sete dil
test edi, edi
je 0x1400057dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rdx, qword [rsp + 0x68]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_DeactivateActCtx]
test edi, edi
je 0x1400057f5
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00413730]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00413740]
mov dword [rax], 1
mov rax, qword [0x00413750]
mov dword [rax], 1
mov rax, qword [0x00413720]
mov dword [rax], 1
mov rax, qword [0x004135e0]
cmp word [rax], 0x5a4d
je 0x4010d0
mov rax, qword [0x00413710]
mov dword [0x00416008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010c2
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call dbg._encode_pointer
mov rdx, qword [0x00413670]
mov qword [rdx], rax
mov rdx, qword [0x00413660]
mov qword [rdx], rax
mov rax, qword [0x004136d0]
mov edx, dword [rax]
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov rax, qword [rax]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x00413590]
cmp dword [rax], 1
je 0x401120
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 0x401133
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, [dbg._matherr]
call dbg.__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 0x401530
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov eax, 0xf320
call fcn.00402ab0
sub rsp, rax
lea rbp, [rsp + 0x80]
call dbg.__main
lea rax, [rbp - 0x60]
lea rdx, section..rdata
mov ecx, 0xf2f1
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0xf2f1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0xf298], rax
mov rax, qword [rbp + 0xf298]
mov rcx, rax
lea rax, [rbp - 0x60]
mov edx, 0xf2f1
mov r8, rdx
mov rdx, rax
call sym.memcpy
mov rax, qword [rbp + 0xf298]
call rax
mov eax, 0
add rsp, 0xf320
pop rbp
ret
Function at 0x4017d0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movsxd rbp, dword [0x00416054]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x4018ea
mov rax, qword [0x00416058]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40181e
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x4018d0
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x401802
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x401922
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x00416058]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call dbg._GetPEImageBase
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x00416058]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401905
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4018c9
sub eax, 0x40
and eax, 0xffffffbf
je 0x4018c9
mov r9, rbp
add r9, qword [0x00416058]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4018f1
add dword [0x00416054], 1
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.memcpy
xor ebp, ebp
jmp 0x40182b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
mov rax, qword [0x00416058]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call dbg.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call dbg.__report_error
nop
nop word cs:[rax + rax]

Function at 0x402500
Capabilities:
Parse pe header

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

Function at 0x402520
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 0x402561
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 0x402558
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x402563
add rax, 0x28
cmp rax, r9
jne 0x402544
xor eax, eax
repz ret

Function at 0x402610
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x004135e0]
cmp word [rbx], 0x5a4d
je 0x402630
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402624
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp dbg._FindPESection
Function at 0x402880
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004169c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004169a0]
test rbx, rbx
je 0x4028d4
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 0x4028cb
test rsi, rsi
je 0x4028cb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4028b0
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x004169c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x1408f1058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1408f11df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1408f1089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408f106f
add dl, dl
jne 0x1408f1096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408f10f6
xor eax, eax
add dl, dl
jne 0x1408f10a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408f11ad
add dl, dl
jne 0x1408f10b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408f10c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408f10d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408f10dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1408f10ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1408f107e
mov eax, 1
add dl, dl
jne 0x1408f1106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408f1113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408f10fb
sub eax, ebx
mov ebx, 1
jne 0x1408f114c
mov ecx, 1
add dl, dl
jne 0x1408f112e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1408f113b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408f1123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408f107e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1408f1168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1408f1175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408f115d
cmp eax, 0x7d00
jae 0x1408f119b
cmp eax, 0x500
jb 0x1408f1196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408f107e
cmp eax, 0x7f
ja 0x1408f119e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408f107e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1408f11d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1408f107e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20