joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400f3c5c
Capabilities:
Read file on windows

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, 0x20
mov rbx, rcx
test rcx, rcx
jne 0x1400f397e
call fcn.1400d6544
mov dword [rax], 0x16
call fcn.1400d63d8
jmp 0x1400f3ace
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x1400f3ace
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x1400f3ace
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x1400f39ad
lock or dword [rcx + 0x14], 0x10
jmp 0x1400f3ace
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x1400f39c1
call fcn.1400f405c
mov ebp, dword [rbx + 0x10]
cmp ebp, 1
jne 0x1400f39d1
mov rax, qword [rbx]
mov r14b, byte [rax]
jmp 0x1400f39d4
xor r14b, r14b
mov rsi, qword [rbx + 8]
mov rcx, rbx
mov edi, dword [rbx + 0x20]
mov qword [rbx], rsi
call fcn.1400f20fc
mov r8d, edi
mov rdx, rsi
mov ecx, eax
call fcn.1400e9a20
mov dword [rbx + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 2
jbe 0x1400f3abc
mov eax, dword [rbx + 0x14]
test al, 6
jne 0x1400f3a67
mov rcx, rbx
call fcn.1400f20fc
cmp eax, 0xffffffff
je 0x1400f3a52
mov rcx, rbx
call fcn.1400f20fc
cmp eax, 0xfffffffe
je 0x1400f3a52
mov rcx, rbx
call fcn.1400f20fc
movsxd rdi, eax
lea rsi, [0x14030f260]
mov rcx, rbx
sar rdi, 6
call fcn.1400f20fc
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [rsi + rdi*8]
lea rdx, [rax + rcx*8]
jmp 0x1400f3a59
lea rdx, [0x14030afa0]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x1400f3a67
lock or dword [rbx + 0x14], 0x20
cmp dword [rbx + 0x20], 0x200
jne 0x1400f3a8b
mov eax, dword [rbx + 0x14]
shr eax, 6
test al, 1
je 0x1400f3a8b
mov eax, dword [rbx + 0x14]
shr eax, 8
test al, 1
jne 0x1400f3a8b
mov dword [rbx + 0x20], 0x1000
mov rdx, qword [rbx]
cmp ebp, 1
jne 0x1400f3aa9
movzx ecx, byte [rdx]
dec dword [rbx + 0x10]
shl cx, 8
movzx eax, r14b
or cx, ax
inc rdx
jmp 0x1400f3ab4
movzx ecx, word [rdx]
add dword [rbx + 0x10], 0xfffffffe
add rdx, 2
mov qword [rbx], rdx
movzx eax, cx
jmp 0x1400f3ad3
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rbx + 0x14], eax
and dword [rbx + 0x10], 0
mov eax, 0xffff
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
jmp 0x1400f3948
Function at 0x1400f4728
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.1400cffd0
sub rsp, rax
mov rax, qword [0x14030aae8]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.1400f20fc
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x1400f4777
mov rax, rbp
jmp 0x1400f487f
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 + 0x30f260]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.1400e94c8
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x30f260]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1400f487b
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 0x1400f487b
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.1400e94c8
test rax, rax
js 0x1400f487b
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1400f487b
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1400f486d
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x1400f486d
cmp byte [rcx], 0xd
jne 0x1400f4853
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x1400f4862
cmp byte [rcx + 1], 0xa
jne 0x1400f4862
inc rcx
jmp 0x1400f4862
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x30ad00]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400f4835
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400f487f
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.1400cfc50
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 0x1400f9a18
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 0x1400f9a48
xor eax, eax
jmp 0x1400f9b0b
mov rbp, rbx
cmp word [rax], si
je 0x1400f9a6d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400f9a54
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400f9a50
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.1400f70a8
movsxd r14, eax
test eax, eax
jne 0x1400f9aab
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400f9a41
mov rcx, r14
call fcn.1400f0d80
mov rdi, rax
test rax, rax
jne 0x1400f9ac4
xor ecx, ecx
call fcn.1400f038c
jmp 0x1400f9aa0
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.1400f70a8
test eax, eax
jne 0x1400f9af5
mov rcx, rdi
call fcn.1400f038c
jmp 0x1400f9aff
xor ecx, ecx
call fcn.1400f038c
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 0x1400f9b28
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 0x1400f9baf
mov rsi, rbx
cmp word [rax], bp
je 0x1400f9b6e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400f9b58
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400f9b54
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400f0d80
mov rdi, rax
test rax, rax
je 0x1400f9b9c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400d1770
mov rbp, rdi
xor ecx, ecx
call fcn.1400f038c
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 0x140001154
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x10], 0
mov dword [rbp - 0x1c], 0x30
mov eax, dword [rbp - 0x1c]
mov rax, qword gs:[rax]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 8]
mov qword [rbp - 0x18], rax
mov dword [rbp - 4], 0
jmp 0x1400011ac
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp - 0x18]
jne 0x14000119e
mov dword [rbp - 4], 1
jmp 0x1400011e3
mov ecx, 0x3e8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [0x1400ebd10]
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x30]
lock cmpxchg qword [rdx], rcx
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14000118b
mov rax, qword [0x1400ebd20]
mov eax, dword [rax]
cmp eax, 1
jne 0x1400011fd
mov ecx, 0x1f
call sym._amsg_exit
jmp 0x14000123c
mov rax, qword [0x1400ebd20]
mov eax, dword [rax]
test eax, eax
jne 0x140001232
mov rax, qword [0x1400ebd20]
mov dword [rax], 1
mov rax, qword [0x1400ebd60]
mov rdx, rax
mov rax, qword [0x1400ebd50]
mov rcx, rax
call sym._initterm
jmp 0x14000123c
mov dword [0x1400f0024], 1
mov rax, qword [0x1400ebd20]
mov eax, dword [rax]
cmp eax, 1
jne 0x140001270
mov rax, qword [0x1400ebd40]
mov rdx, rax
mov rax, qword [0x1400ebd30]
mov rcx, rax
call sym._initterm
mov rax, qword [0x1400ebd20]
mov dword [rax], 2
cmp dword [rbp - 4], 0
jne 0x140001294
mov rax, qword [0x1400ebd10]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp - 0x48]
xchg qword [rax], rdx
mov rax, qword [0x1400ebc70]
mov rax, qword [rax]
test rax, rax
je 0x1400012bf
mov rax, qword [0x1400ebc70]
mov rax, qword [rax]
mov r8d, 0
mov edx, 2
mov ecx, 0
call rax
call sym._pei386_runtime_relocator
mov rax, qword [sym._gnu_exception_handler]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rax
mov rdx, qword [0x1400ebd00]
mov qword [rdx], rax
lea rax, [sym.__mingw_invalidParameterHandler]
mov rcx, rax
call sym._set_invalid_parameter_handler
call sym._fpreset
mov eax, dword [0x1400f0004]
lea rdx, [0x1400f0008]
mov ecx, eax
call sym.duplicate_ppstrings
call sym.__main
mov rax, qword [0x1400ebc90]
mov rax, qword [rax]
mov rdx, qword [0x1400f0010]
mov qword [rax], rdx
mov rcx, qword [0x1400f0010]
mov rdx, qword [0x1400f0008]
mov eax, dword [0x1400f0004]
mov r8, rcx
mov ecx, eax
call dbg.main
mov dword [0x1400f001c], eax
mov eax, dword [0x1400f0020]
test eax, eax
jne 0x14000135d
mov eax, dword [0x1400f001c]
mov ecx, eax
call sym.exit
mov eax, dword [0x1400f0024]
test eax, eax
jne 0x14000136c
call sym._cexit
mov eax, dword [0x1400f001c]
add rsp, 0x70
pop rbp
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400ebcc0]
mov dword [rax], 1
mov rax, qword [0x1400ebcd0]
mov dword [rax], 1
mov rax, qword [0x1400ebce0]
mov dword [rax], 1
mov rax, qword [0x1400ebc40]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
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 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001d90
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 0x140002a62
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400f0168]
test eax, eax
je 0x140002afa
lea rax, [0x1400f0140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400f0170]
mov qword [rbp - 8], rax
jmp 0x140002ade
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 0x140002ad2
cmp qword [rbp - 0x10], 0
je 0x140002ad2
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 0x140002a98
lea rax, [0x1400f0140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140002afb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140002c00
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 0x140002c28
mov eax, 0
jmp 0x140002c76
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 0x140002c51
mov eax, 0
jmp 0x140002c76
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 0x140002c71
mov eax, 0
jmp 0x140002c76
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140002c7c
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 0x140002cfa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140002cf1
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 0x140002cf1
mov rax, qword [rbp - 8]
jmp 0x140002d0f
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 0x140002cc4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140013ec0
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140013cec

Function at 0x141004268
Capabilities:
Encode data using xor

Disassembly:
jmp 0x141004272
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x14100429b
pop rbp
sub rbp, 0x33
sub rbp, 0x1004268
sub rsp, 0x20
and byte [rax], al
add byte [rax], al
jmp 0x1410042ba
mov rax, 0x1004268
add rax, rbp
add rax, 0x84
mov rcx, 0x60b
mov rdx, 0xffffffffcfe4dab8
xor byte [rax], dl
inc rax
dec rcx
jne 0x1410042d9
jmp 0x1410042f0
lock xor dword [rcx + 0x33], edx
xor dword [rax + rdi*4 + 0x39f0b8b8], eax
jns 0x1410042ad
mov ecx, 0xb9f0b8b8
push rcx
invalid
Function at 0x40102c
Capabilities:
Create directory
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x270
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
call fcn.00401000
mov qword [rbp - 8], rax
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0x20], rax
mov rax, qword [rbp - 8]
mov r9, rax
lea rax, [0x00402008]
mov r8, rax
movabs rax, 0x104
mov r11, rax
lea rax, [rbp - 0x10c]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__snprintf
movabs rax, 0
mov r11, rax
lea rax, [rbp - 0x10c]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_CreateDirectoryA
mov rax, qword [rbp + 0x18]
mov qword [rsp + 0x20], rax
lea rax, [rbp - 0x10c]
mov r9, rax
lea rax, str._s_s
mov r8, rax
movabs rax, 0x104
mov r11, rax
lea rax, [rbp - 0x210]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__snprintf
lea rax, [0x0040201d]
mov r8, rax
lea rax, str.IDR_DLL1
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_FindResourceA
mov qword [rbp - 0x218], rax
mov rax, qword [rbp - 0x218]
cmp rax, 0
je 0x40112e
jmp 0x40114a
lea rax, str.Errore_nel_trovare_la_risorsa._n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 1
jmp 0x40128a
mov rax, qword [rbp - 0x218]
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LoadResource
mov qword [rbp - 0x220], rax
mov rax, qword [rbp - 0x220]
cmp rax, 0
je 0x401189
jmp 0x4011a5
lea rax, str.Errore_nel_caricare_la_risorsa._n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 1
jmp 0x40128a
mov rax, qword [rbp - 0x218]
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_SizeofResource
mov dword [rbp - 0x224], eax
mov rax, qword [rbp - 0x220]
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_LockResource
mov qword [rbp - 0x230], rax
lea rax, [0x00402062]
mov r11, rax
lea rax, [rbp - 0x210]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_fopen
mov qword [rbp - 0x238], rax
mov rax, qword [rbp - 0x238]
cmp rax, 0
je 0x401222
jmp 0x40123e
lea rax, str.Errore_nellaprire_il_file_per_scrivere._n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 1
jmp 0x40128a
mov eax, dword [rbp - 0x224]
mov rcx, qword [rbp - 0x238]
mov r9, rcx
mov r8, rax
movabs rax, 1
mov r11, rax
mov rax, qword [rbp - 0x230]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_fwrite
mov rax, qword [rbp - 0x238]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_fclose
mov eax, 0
leave
ret
Function at 0x401037
Capabilities:
Create directory
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x270
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
call fcn.00401000
mov qword [rbp - 8], rax
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0x20], rax
mov rax, qword [rbp - 8]
mov r9, rax
lea rax, [0x00402008]
mov r8, rax
movabs rax, 0x104
mov r11, rax
lea rax, [rbp - 0x10c]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__snprintf
movabs rax, 0
mov r11, rax
lea rax, [rbp - 0x10c]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_CreateDirectoryA
mov rax, qword [rbp + 0x18]
mov qword [rsp + 0x20], rax
lea rax, [rbp - 0x10c]
mov r9, rax
lea rax, str._s_s
mov r8, rax
movabs rax, 0x104
mov r11, rax
lea rax, [rbp - 0x210]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__snprintf
lea rax, [0x0040201d]
mov r8, rax
lea rax, str.IDR_DLL1
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_FindResourceA
mov qword [rbp - 0x218], rax
mov rax, qword [rbp - 0x218]
cmp rax, 0
je 0x40112e
jmp 0x40114a
lea rax, str.Errore_nel_trovare_la_risorsa._n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 1
jmp 0x40128a
mov rax, qword [rbp - 0x218]
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_LoadResource
mov qword [rbp - 0x220], rax
mov rax, qword [rbp - 0x220]
cmp rax, 0
je 0x401189
jmp 0x4011a5
lea rax, str.Errore_nel_caricare_la_risorsa._n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 1
jmp 0x40128a
mov rax, qword [rbp - 0x218]
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.kernel32.dll_SizeofResource
mov dword [rbp - 0x224], eax
mov rax, qword [rbp - 0x220]
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_LockResource
mov qword [rbp - 0x230], rax
lea rax, [0x00402062]
mov r11, rax
lea rax, [rbp - 0x210]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_fopen
mov qword [rbp - 0x238], rax
mov rax, qword [rbp - 0x238]
cmp rax, 0
je 0x401222
jmp 0x40123e
lea rax, str.Errore_nellaprire_il_file_per_scrivere._n
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_printf
mov eax, 1
jmp 0x40128a
mov eax, dword [rbp - 0x224]
mov rcx, qword [rbp - 0x238]
mov r9, rcx
mov r8, rax
movabs rax, 1
mov r11, rax
mov rax, qword [rbp - 0x230]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_fwrite
mov rax, qword [rbp - 0x238]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll_fclose
mov eax, 0
leave
ret
Function at 0x180835058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1808351df
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 0x180835089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x18083506f
add dl, dl
jne 0x180835096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1808350f6
xor eax, eax
add dl, dl
jne 0x1808350a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1808351ad
add dl, dl
jne 0x1808350b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1808350c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1808350d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1808350dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1808350ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x18083507e
mov eax, 1
add dl, dl
jne 0x180835106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x180835113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1808350fb
sub eax, ebx
mov ebx, 1
jne 0x18083514c
mov ecx, 1
add dl, dl
jne 0x18083512e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x18083513b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x180835123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18083507e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x180835168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x180835175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x18083515d
cmp eax, 0x7d00
jae 0x18083519b
cmp eax, 0x500
jb 0x180835196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18083507e
cmp eax, 0x7f
ja 0x18083519e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18083507e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1808351d2
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 0x18083507e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20