joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140018900
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x80
mov rbx, r8
mov edi, edx
test r8, r8
je 0x140018ad0
mov rax, qword [rcx]
call qword [rax]
mov rbp, rax
test edi, edi
je 0x140018970
cmp edi, 3
je 0x140018970
sub edi, 1
je 0x14001895f
cmp edi, 1
jne 0x140018ad0
movzx edx, bx
mov rcx, rax
call qword [sym.imp.USER32.dll_LoadIconW]
jmp 0x140018ad2
movzx edx, bx
mov rcx, rbp
call qword [sym.imp.USER32.dll_LoadCursorW]
jmp 0x140018ad2
movzx edx, bx
mov r8d, 0xa
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r15, rax
test rax, rax
je 0x140018ad0
xor ebx, ebx
mov esi, ebx
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r14, rax
test rax, rax
je 0x140018ad0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r12, rax
test rax, rax
je 0x140018a36
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov qword [rsp + 0x70], rbx
mov rdx, r15
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r8d, eax
mov rdx, r12
lea rcx, [rsp + 0x50]
call fcn.140016500
test rax, rax
je 0x140018a0f
mov rsi, qword [rsp + 0x50]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov qword [rsp + 0x70], rbx
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140018a36
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov qword [rsp + 0x70], rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeResource]
test rsi, rsi
je 0x140018ad0
cmp edi, 3
jne 0x140018acb
lea r8, [rsp + 0x30]
lea edx, [rdi + 0x1d]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x140018abd
mov edx, dword [rsp + 0x38]
test edx, edx
je 0x140018abd
lea ecx, [rdx + 1]
and ecx, 0xfffffffe
mov dword [rsp + 0x20], 1
xor r9d, r9d
lea r8d, [rdi + 0x1e]
call qword [sym.imp.COMCTL32.dll_ImageList_Create]
mov rdi, rax
test rax, rax
je 0x140018abd
mov r8d, 0xff00ff
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
test eax, eax
jns 0x140018aba
mov rcx, rdi
call qword [sym.imp.COMCTL32.dll_ImageList_Destroy]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rax, rbx
jmp 0x140018ad2
mov rbx, rdi
mov rcx, rsi
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rax, rbx
jmp 0x140018ad2
mov rax, rsi
jmp 0x140018ad2
xor eax, eax
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x140018b90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r14
sub rsp, 0x20
xor esi, esi
mov r14, r9
mov qword [r8 + 0x28], rsi
mov rbx, r8
mov rbp, rdx
test rdx, rdx
jne 0x140018bc2
lea eax, [rdx + 1]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret
mov rax, qword [rcx]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], r15
call qword [rax]
movzx edx, bp
mov r8, r14
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov r15, rax
test rax, rax
je 0x140018cb7
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
je 0x140018cb7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
je 0x140018cae
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov qword [rbx + 0x28], rsi
cmp qword [rbx + 0x20], rdi
jl 0x140018c8c
cmp rdi, 1
jne 0x140018c4a
movzx ecx, byte [r14]
mov rax, qword [rbx + 0x18]
mov byte [rax], cl
inc qword [rbx + 0x28]
jmp 0x140018ca9
cmp rdi, 2
jne 0x140018c61
movzx ecx, word [r14]
mov rax, qword [rbx + 0x18]
mov word [rax], cx
add qword [rbx + 0x28], rdi
jmp 0x140018ca9
cmp rdi, 4
jne 0x140018c76
mov ecx, dword [r14]
mov rax, qword [rbx + 0x18]
mov dword [rax], ecx
add qword [rbx + 0x28], rdi
jmp 0x140018ca9
cmp rdi, 8
jne 0x140018c8c
mov rcx, qword [r14]
mov rax, qword [rbx + 0x18]
mov qword [rax], rcx
add qword [rbx + 0x28], rdi
jmp 0x140018ca9
test eax, eax
je 0x140018ca9
mov rdx, rdi
mov rcx, rbx
call fcn.140019b40
mov r8, rdi
mov rdx, r14
mov rcx, rax
call fcn.140026830
mov esi, 1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov r15, qword [rsp + 0x48]
mov rax, rsi
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret
Function at 0x14001c230
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov r8, qword [rcx]
mov r14, rcx
movabs rcx, 0xffffffff00000000
movzx eax, word [r8 + 0x14]
mov r12, qword [r8 + 0x30]
mov r9d, dword [r14 + 0x68]
and r12, rcx
dec r9
mov r11d, dword [rax + r8 + 0x20]
not r9
mov ecx, dword [rax + r8 + 0x28]
or r11, r12
and r9, r11
mov qword [rsp + 0x20], r11
mov qword [rsp + 0x28], r9
test ecx, ecx
jne 0x14001c298
mov edx, dword [rax + r8 + 0x3c]
test dl, 0x40
je 0x14001c290
mov ecx, dword [r8 + 0x20]
jmp 0x14001c298
test dl, dl
jns 0x14001c298
mov ecx, dword [r8 + 0x24]
mov edx, dword [rax + r8 + 0x3c]
mov r13d, 1
mov r15d, r13d
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x80], rbp
mov r10d, ecx
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x3c], 0
cmp r13w, word [r8 + 6]
jae 0x14001c399
lea rdi, [r8 + 0x64]
add rdi, rax
nop word [rax + rax]
mov esi, dword [rdi - 0x1c]
mov ebx, dword [r14 + 0x68]
or rsi, r12
mov eax, dword [rdi - 0x14]
neg rbx
and rbx, rsi
test eax, eax
jne 0x14001c31c
mov ecx, dword [rdi]
test cl, 0x40
je 0x14001c314
mov eax, dword [r8 + 0x20]
jmp 0x14001c31c
test cl, cl
jns 0x14001c31c
mov eax, dword [r8 + 0x24]
mov ebp, eax
cmp r9, rbx
je 0x14001c360
lea rax, [r10 + r11]
cmp rax, rbx
ja 0x14001c360
lea rdx, [rsp + 0x20]
mov rcx, r14
call fcn.14001c170
test eax, eax
je 0x14001c43c
mov edx, dword [rdi]
mov r11, rsi
mov r8, qword [r14]
mov r9, rbx
mov qword [rsp + 0x20], rsi
mov r10d, ebp
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rbp
jmp 0x14001c380
mov ecx, dword [rdi]
mov eax, ecx
and eax, edx
or edx, ecx
bt eax, 0x19
jb 0x14001c372
btr edx, 0x19
mov r10, rbp
sub r10, r11
add r10, rsi
mov qword [rsp + 0x30], r10
movzx eax, word [r8 + 6]
inc r15d
add rdi, 0x28
mov dword [rsp + 0x38], edx
cmp r15d, eax
jl 0x14001c2f0
test r10, r10
je 0x14001c3bd
bt edx, 0x19
jae 0x14001c3e7
cmp r11, r9
jne 0x14001c3bd
mov r9, qword [r14 + 0x58]
mov r8d, 0x4000
mov rdx, r10
mov rcx, r11
call qword [r14 + 0x30]
mov eax, r13d
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x78]
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
ret
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0x70]
mov rax, rcx
shr rcx, 0x1e
shr rax, 0x1d
and ecx, r13d
and eax, r13d
lea rcx, [rcx + rax*2]
mov eax, edx
shr rax, 0x1f
lea rcx, [rax + rcx*2]
lea rax, [0x14004a9e0]
mov eax, dword [rax + rcx*4]
mov r8d, eax
bts r8d, 9
mov rcx, r11
and edx, 0x4000000
mov rdx, r10
cmove r8d, eax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001c3bd
xor eax, eax
jmp 0x14001c3c0
Function at 0x140027254
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 0x1400270b3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400270b3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400270b3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400270b3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400270b3
cmp dword [rcx + 0x84], 0xe
jbe 0x1400270b3
cmp dword [rcx + 0xf8], 0
je 0x1400270b3
mov ecx, ebx
call fcn.140027170
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.140026f40
nop
cmp dword [rbp + 0x20], 0
je 0x140027101
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14002710c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140027044

Function at 0x14002b888
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140038c40
sub rsp, rax
mov rax, qword [0x140283010]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14002da88
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x14002b8d7
mov rax, rbp
jmp 0x14002b9df
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x284f50]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14002e664
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x284f50]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x14002b9db
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14002b9db
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14002e664
test rax, rax
js 0x14002b9db
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x14002b9db
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x14002b9cd
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x14002b9cd
cmp byte [rcx], 0xd
jne 0x14002b9b3
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14002b9c2
cmp byte [rcx + 1], 0xa
jne 0x14002b9c2
inc rcx
jmp 0x14002b9c2
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x283330]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x14002b995
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x14002b9df
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140020e80
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140030f74
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x140284f50]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x140030fd2
cmp word [rdx], r12w
jne 0x140030fd2
or byte [rax + r8*8 + 0x38], cl
jmp 0x140030fd8
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x140031133
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14003110e
lea r9, [rcx + 2]
cmp ax, r13w
je 0x140031011
mov rcx, r9
jmp 0x140031034
cmp r9, rdx
jae 0x14003104b
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x140030ff5
jmp 0x140031133
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140031108
cmp dword [rsp + 0x80], edi
je 0x140031108
mov rdx, r14
lea r11, [0x140284f50]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x1400310e1
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x1400310b4
mov word [rbx], r12w
jmp 0x14003112f
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x1400310bd
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14003112f
cmp word [rsp + 0x70], r12w
jne 0x1400310ee
cmp rbx, rsi
je 0x1400310ae
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.14002e66c
cmp word [rsp + 0x70], r12w
je 0x140031133
mov word [rbx], r13w
jmp 0x14003112f
lea r11, [0x140284f50]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x14003112b
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x140031133
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140031988
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x1400319ba
call fcn.140027860
mov dword [rax], 0x16
call fcn.140027724
jmp 0x140031ad9
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x140031ad9
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x140031ad9
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x1400319e9
lock or dword [rcx + 0x14], 0x10
jmp 0x140031ad9
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x1400319fd
call fcn.140034ec8
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.14002da88
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.140031420
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x140031ac7
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x140031a92
mov rcx, rsi
call fcn.14002da88
cmp eax, edi
je 0x140031a7d
mov rcx, rsi
call fcn.14002da88
cmp eax, 0xfffffffe
je 0x140031a7d
mov rcx, rsi
call fcn.14002da88
movsxd rbx, eax
lea r14, [0x140284f50]
mov rcx, rsi
sar rbx, 6
call fcn.14002da88
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x140031a84
lea rdx, [0x1402832e0]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140031a92
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x140031ab6
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x140031ab6
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x140031ab6
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x140031adc
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x1400332d4
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14003335b
mov rsi, rbx
cmp word [rax], bp
je 0x14003331a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140033304
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140033300
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14002f9f4
mov rdi, rax
test rax, rax
je 0x140033348
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140026830
mov rbp, rdi
xor ecx, ecx
call fcn.14002da4c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140037d30
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.14002e66c
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14002e66c
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140037e80
cmp rax, 0xffffffffffffffff
je 0x140037e80
xor edi, edi
test rbp, rbp
jle 0x140037e2b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140032084
mov rbx, rax
test rax, rax
jne 0x140037db8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140037e21
mov edx, 0x8000
mov ecx, r14d
call fcn.14002cc88
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.14002f360
cmp eax, 0xffffffff
je 0x140037e01
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140037dc8
mov edx, r15d
mov ecx, r14d
call fcn.14002cc88
jmp 0x140037e21
cmp byte [rsi + 0x38], dil
je 0x140037e18
cmp dword [rsi + 0x34], 5
jne 0x140037e18
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140037e21
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14002da4c
jmp 0x140037e94
jns 0x140037e94
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14002e66c
cmp rax, 0xffffffffffffffff
jne 0x140037e4c
cmp byte [rsi + 0x30], dil
je 0x140037e94
mov edi, dword [rsi + 0x2c]
jmp 0x140037e94
mov ecx, r14d
call fcn.140033dcc
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140037e94
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 0x140037e94
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140037e8d
mov eax, dword [rsi + 0x2c]
jmp 0x140037e92
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14002e66c
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 0x140a0c0b0
Capabilities:
Decompress data using aplib

Disassembly:
call 0x140a0c237
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 0x140a0c0e1
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a0c0c7
add dl, dl
jne 0x140a0c0ee
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a0c14e
xor eax, eax
add dl, dl
jne 0x140a0c0fd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a0c205
add dl, dl
jne 0x140a0c10e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a0c11b
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a0c128
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a0c135
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140a0c142
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140a0c0d6
mov eax, 1
add dl, dl
jne 0x140a0c15e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a0c16b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a0c153
sub eax, ebx
mov ebx, 1
jne 0x140a0c1a4
mov ecx, 1
add dl, dl
jne 0x140a0c186
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a0c193
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a0c17b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0c0d6
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140a0c1c0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a0c1cd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a0c1b5
cmp eax, 0x7d00
jae 0x140a0c1f3
cmp eax, 0x500
jb 0x140a0c1ee
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0c0d6
cmp eax, 0x7f
ja 0x140a0c1f6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a0c0d6
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140a0c22a
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 0x140a0c0d6
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x2fc4cb940
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x2fc4cc342
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f0108]
test eax, eax
je 0x2fc4cc3da
lea rax, [0x2fc4f00e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f0110]
mov qword [rbp - 8], rax
jmp 0x2fc4cc3be
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x2fc4cc3b2
cmp qword [rbp - 0x10], 0
je 0x2fc4cc3b2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4cc378
lea rax, [0x2fc4f00e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4cc3db
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4cc4e0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x2fc4cc508
mov eax, 0
jmp 0x2fc4cc556
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x2fc4cc531
mov eax, 0
jmp 0x2fc4cc556
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x2fc4cc551
mov eax, 0
jmp 0x2fc4cc556
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4cc55c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x2fc4cc5da
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4cc5d1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x2fc4cc5d1
mov rax, qword [rbp - 8]
jmp 0x2fc4cc5ef
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4cc5a4
mov eax, 0
add rsp, 0x20
pop rbp
ret