joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140015954
Capabilities:
Delete registry value

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x70
mov qword [rax - 0x48], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rdi, rdx
mov rcx, qword [rcx]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov ebx, eax
test eax, 0xfffffffd
jne 0x14001598b
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
ret
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
movups xmmword [rsp + 0x58], xmm0
lea rcx, [rsp + 0x48]
call fcn.1400015a4
nop
mov r9, rdi
lea r8, str.Failed_to_delete_the__s_setting_from_the_registry.
lea rdx, [rsp + 0x38]
mov rcx, rax
call fcn.140001cc0
movzx ecx, bx
or ecx, 0x80070000
test ebx, ebx
cmovle ecx, ebx
mov r9d, 0x20
lea r8, str.E:BA163_s_srcWex.ServicesTeServiceSettings.cpp
mov rdx, rax
call fcn.140001a0c
int3

Function at 0x1400159e0
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [r11 + 0x20], rbx
mov rax, qword [0x140031020]
xor rax, rsp
mov qword [rbp - 8], rax
mov rsi, r8
mov r10, rdx
mov rbx, rcx
mov dword [rbp - 0x18], 4
lea rax, [rbp - 0x18]
mov qword [r11 - 0x70], rax
lea rax, [rbp - 0x10]
mov qword [r11 - 0x78], rax
lea r9, [rbp - 0x14]
xor r8d, r8d
mov rdx, rsi
mov rcx, qword [r10]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp eax, 2
jne 0x140015a6b
xor eax, eax
mov qword [rbx], rax
mov rax, rbx
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140018430
mov rbx, qword [rsp + 0xb8]
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
test edi, edi
je 0x140015a79
cmp edi, 0xea
je 0x140015ae5
jmp 0x140015a8a
cmp dword [rbp - 0x14], 4
jne 0x140015ae5
mov eax, dword [rbp - 0x10]
mov dword [rbx], eax
mov byte [rbx + 4], 1
jmp 0x140015a49
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
lea rcx, [rbp - 0x50]
call fcn.1400015a4
nop
lea rcx, str.SoftwareMicrosoftTAEFService
mov qword [rsp + 0x20], rcx
mov r9, rsi
lea r8, str.Failed_to_query_for_the__s_value_in_HKLM_s.
lea rdx, [rbp - 0x28]
mov rcx, rax
call fcn.140001cc0
movzx ecx, di
or ecx, 0x80070000
test edi, edi
cmovle ecx, edi
mov r9d, 0x2f
lea r8, str.E:BA163_s_srcWex.ServicesTeServiceSettings.cpp
mov rdx, rax
call fcn.140001a0c
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
lea rcx, [rbp - 0x50]
call fcn.1400015a4
nop
lea rcx, str.SoftwareMicrosoftTAEFService
mov qword [rsp + 0x20], rcx
mov r9, rsi
lea r8, str.The__s_value_in_HKLM_s_must_be_a_DWORD_value.
lea rdx, [rbp - 0x28]
mov rcx, rax
call fcn.140001cc0
mov rdx, rax
mov r9d, 0x31
lea r8, str.E:BA163_s_srcWex.ServicesTeServiceSettings.cpp
lea ecx, [r9 - 0x24]
call fcn.140001a0c
int3
Function at 0x140001c00
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 dword [rax]

Function at 0x140001c70
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007094]
test esi, esi
mov rbx, rcx
jle 0x140001da0
mov rax, qword [0x140007098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001cbb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001d45
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001ca0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x140001dc2
mov rax, qword [0x140007098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140007098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001da7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001d3e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001d50
add dword [0x140007094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x140007098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001d3e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140001cc8
mov rax, qword [0x140007098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002330
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x14000238c
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 0x140002383
test rsi, rsi
je 0x140002383
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002368
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 0x1400025a0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop

Function at 0x1400025b0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop

Function at 0x1400025c0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400025d8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400025e0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400025f0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx r8d, word [rcx + 6]
movzx eax, word [rcx + 0x14]
test r8w, r8w
lea rax, [rcx + rax + 0x18]
je 0x14000263d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rdx, r8
mov rcx, r8
jb 0x140002634
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000263f
add rax, 0x28
cmp rax, r9
jne 0x140002620
xor eax, eax
ret

Function at 0x140002640
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400026d0
mov rdx, qword [0x1400044b0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400026be
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400026be
cmp word [rax + 0x18], 0x20b
jne 0x1400026be
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400026d0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x1400026a9
add rbx, 0x28
cmp rbx, rdi
je 0x1400026d0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x1400026a0
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x1400026e0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140002760
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400044b0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000277f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002788
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000277f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x1400027a0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400044b0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400027c0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400027c8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400027c0
movzx r8d, word [rdx + 6]
movzx eax, word [rdx + 0x14]
test r8w, r8w
lea rax, [rdx + rax + 0x18]
je 0x140002810
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140002807
test rcx, rcx
je 0x1400027c0
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400027f8
xor eax, eax
ret

Function at 0x140002820
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400044b0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000283f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002848
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140002860
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400044b0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002880
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002888
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002880
movzx r9d, word [r8 + 6]
sub rcx, rdx
movzx edx, word [r8 + 0x14]
test r9w, r9w
lea rdx, [r8 + rdx + 0x18]
je 0x140002880
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x1400028d4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400028e0
add rdx, 0x28
cmp r9, rdx
jne 0x1400028c0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x1400028f0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x1400044b0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002912
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002920
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002912
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002912
movzx r10d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
test r10w, r10w
lea rdx, [r8 + rdx + 0x18]
je 0x140002912
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
cmp rax, r9
mov r8, r9
jb 0x140002975
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002988
add rdx, 0x28
cmp rdx, r10
jne 0x140002960
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002997
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x1400029a7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000297e
test ecx, ecx
jg 0x140002990
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140009038
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, r8
mov r9, rcx
xor ecx, ecx
movabs r8, 0xcbf29ce484222325
mov rsi, rdx
movzx eax, byte [rbx + rcx + 0x10]
movabs rdx, 0x100000001b3
xor r8, rax
inc rcx
imul r8, rdx
cmp rcx, 4
jb 0x14000905c
mov rdx, qword [r9 + 0x30]
mov rcx, qword [r9 + 0x18]
and rdx, r8
add rdx, rdx
cmp qword [rcx + rdx*8 + 8], rbx
jne 0x1400090b3
cmp qword [rcx + rdx*8], rbx
jne 0x1400090a8
mov rax, qword [r9 + 8]
mov qword [rcx + rdx*8], rax
mov rcx, qword [r9 + 0x18]
mov rax, qword [r9 + 8]
jmp 0x1400090ac
mov rax, qword [rbx + 8]
mov qword [rcx + rdx*8 + 8], rax
jmp 0x1400090c0
cmp qword [rcx + rdx*8], rbx
jne 0x1400090c0
mov rax, qword [rbx]
mov qword [rcx + rdx*8], rax
mov rax, qword [rbx + 8]
mov rdi, qword [rbx]
mov qword [rax], rdi
mov rcx, qword [rbx]
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
dec qword [r9 + 0x10]
mov rdx, qword [rbx + 0x30]
cmp rdx, 8
jb 0x1400090f5
mov rcx, qword [rbx + 0x18]
inc rdx
mov r8d, 2
call fcn.1400020a4
mov edx, 1
mov rcx, rbx
lea r8d, [rdx + 0x37]
call fcn.1400020a4
mov rbx, qword [rsp + 0x30]
mov rax, rsi
mov qword [rsi], rdi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x14000b51c
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_1.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x1400148a0], eax
call fcn.14000b2a4
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_UnhandledExceptionFilter]
cmp dword [0x1400148a0], 0
jne case.default.0x14000b572
mov ecx, 1
call fcn.14000b2a4
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_TerminateProcess]
fcmovnu st(0), st(1)
or eax, 0xb6e20fdb
scasd eax, dword [rdi]
wait
xor eax, 0xa09c96cb
add ebp, dword [rdx + rdx]
movsb byte [rdi], byte [rsi]
sub byte [rbx], dl
movabs byte [0xaf4af3f9b9d1da3e], al
retf
Function at 0x401540
Capabilities:
Read file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
xor r8d, r8d
mov rbx, rcx
mov rcx, qword [rcx]
sub edx, 0x58
call sub.msvcrt.dll_fseek
test eax, eax
jne 0x4015a0
mov r9, qword [rbx]
lea rsi, [rbx + 0x20]
mov r8d, 1
mov edx, 0x58
mov rcx, rsi
call sub.msvcrt.dll_fread
test rax, rax
je 0x4015a0
lea rdi, str.MEI_f_v_n_v
mov ecx, 8
repe cmpsb byte [rsi], byte [rdi]
setne al
movzx eax, al
neg eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov eax, 0xffffffff
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x4015f0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
add rsp, 0xffffffffffffff80
cmp qword [rcx], 0
mov rbx, rcx
mov rdi, rdx
je 0x401733
mov esi, dword [rbx + 8]
mov ecx, dword [rdi + 4]
mov rbp, qword [sym.imp.WS2_32.dll_ntohl]
call rbp
mov rcx, qword [rbx]
xor r8d, r8d
lea edx, [rax + rsi]
call sub.msvcrt.dll_fseek
mov ecx, dword [rdi + 8]
call rbp
mov ecx, eax
call sub.msvcrt.dll_malloc
test rax, rax
mov rsi, rax
je 0x401775
mov r12, qword [rbx]
mov ecx, dword [rdi + 8]
call rbp
mov r8d, 1
mov rcx, rsi
mov edx, eax
mov r9, r12
call sub.msvcrt.dll_fread
test rax, rax
je 0x401762
cmp byte [rdi + 0x10], 1
je 0x401690
mov rcx, qword [rbx]
test rcx, rcx
je 0x40167d
call sub.msvcrt.dll_fclose
mov qword [rbx], 0
mov rax, rsi
sub rsp, 0xffffffffffffff80
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.004055e0
mov ecx, dword [rdi + 0xc]
call rbp
mov ecx, eax
call sub.msvcrt.dll_malloc
test rax, rax
mov r12, rax
je 0x4017cf
mov ecx, dword [rdi + 8]
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
call rbp
mov ecx, dword [rdi + 0xc]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], eax
call rbp
lea rbp, [rsp + 0x20]
mov r8d, 0x58
lea rdx, [0x0040c09f]
mov rcx, rbp
mov dword [rsp + 0x38], eax
call fcn.00405aa0
test eax, eax
js 0x401788
mov edx, 4
mov rcx, rbp
call fcn.00405b20
test eax, eax
js 0x4017ba
mov rcx, rbp
call fcn.00407670
mov rcx, rsi
mov rsi, r12
call sub.msvcrt.dll_free
jmp 0x401669
lea rcx, [rcx + 0x78]
lea rdx, [0x0040c030]
call fcn.00402d20
test rax, rax
mov qword [rbx], rax
jne 0x40160a
lea rcx, str.Cannot_open_archive_file_n
xor esi, esi
call fcn.00401d50
jmp 0x40167d
lea rcx, str.Could_not_read_from_file_n
xor esi, esi
call fcn.00401d50
jmp 0x40167d
lea rcx, str.Could_not_allocate_read_buffer_n
xor esi, esi
call fcn.00401d50
jmp 0x40167d
mov r8, qword [rsp + 0x40]
lea rcx, str.Error__d_from_inflateInit:__s_n
mov edx, eax
call fcn.00401d50
mov rcx, rsi
xor esi, esi
call sub.msvcrt.dll_free
lea rdx, [rdi + 0x12]
lea rcx, str.Error_decompressing__s_n
call fcn.00401d50
jmp 0x40167d
mov r8, qword [rsp + 0x40]
lea rcx, str.Error__d_from_inflate:__s_n
mov edx, eax
call fcn.00401d50
jmp 0x40179b
lea rcx, str.Error_allocating_decompression_buffer_n
call fcn.00401d50
jmp 0x40179b
Function at 0x4017e0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rsi, rdx
call fcn.004015f0
mov rcx, rbx
mov rbp, rax
call fcn.00404580
cmp eax, 0xffffffff
je 0x40185c
lea r12, [rsi + 0x12]
lea rcx, [rbx + 0x2078]
mov rdx, r12
call fcn.00404920
mov ecx, dword [rsi + 0xc]
mov rdi, rax
call qword [sym.imp.WS2_32.dll_ntohl]
test rdi, rdi
mov ebx, eax
je 0x401886
mov r9, rdi
mov r8d, 1
mov rdx, rbx
mov rcx, rbp
call sub.msvcrt.dll_fwrite
cmp rax, 1
je 0x40184a
test rbx, rbx
jne 0x401870
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov rcx, rbp
call sub.msvcrt.dll_free
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rcx, str.Failed_to_write_all_bytes_for__s_n
mov rdx, r12
call fcn.00401ce0
mov eax, 0xffffffff
jmp 0x40185c
lea rcx, str._s_could_not_be_extracted__n
mov rdx, r12
call fcn.00401ce0
mov eax, 0xffffffff
jmp 0x40185c
Function at 0x4018a0
Capabilities:
Read file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbx, rcx
mov rcx, qword [rcx]
test rcx, rcx
je 0x401ab0
xor edx, edx
mov r8d, 2
call sub.msvcrt.dll_fseek
mov rcx, qword [rbx]
call sub.msvcrt.dll_ftell
mov rcx, rbx
mov edx, eax
mov esi, eax
call fcn.00401540
test eax, eax
js 0x401990
mov dword [rbx + 0x407c], 0
mov ecx, dword [rbx + 0x28]
mov rdi, qword [sym.imp.WS2_32.dll_ntohl]
call rdi
mov ecx, dword [rbx + 0x2c]
sub esi, eax
mov dword [rbx + 8], esi
call rdi
mov rcx, qword [rbx]
xor r8d, r8d
lea edx, [rsi + rax]
call sub.msvcrt.dll_fseek
mov ecx, dword [rbx + 0x30]
call rdi
mov ecx, eax
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rbx + 0x10], rax
je 0x401b10
mov rsi, qword [rbx]
mov ecx, dword [rbx + 0x30]
call rdi
mov rcx, qword [rbx + 0x10]
mov r8d, 1
mov edx, eax
mov r9, rsi
call sub.msvcrt.dll_fread
test rax, rax
je 0x401ad1
mov rsi, qword [rbx + 0x10]
mov ecx, dword [rbx + 0x30]
call rdi
mov rcx, qword [rbx]
mov eax, eax
add rax, rsi
mov qword [rbx + 0x18], rax
call sub.msvcrt.dll_ferror
test eax, eax
mov esi, eax
jne 0x401af0
mov rcx, qword [rbx]
test rcx, rcx
je 0x401983
call sub.msvcrt.dll_fclose
mov qword [rbx], 0
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov rcx, qword [rbx]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x2c], 0
lea rsi, [rsp + 0x20]
call sub.msvcrt.dll_fseek
mov r9, qword [rbx]
mov edx, 1
mov rcx, rsi
mov r8d, 2
call sub.msvcrt.dll_fread
cmp byte [rsp + 0x20], 0x4d
jne 0x401a9b
cmp byte [rsp + 0x21], 0x5a
jne 0x401a9b
mov rcx, qword [rbx]
lea rdi, [rsp + 0x2c]
xor r8d, r8d
mov edx, 0x3c
call sub.msvcrt.dll_fseek
mov r9, qword [rbx]
mov edx, 4
mov rcx, rdi
mov r8d, 1
call sub.msvcrt.dll_fread
mov eax, dword [rsp + 0x2c]
xor r8d, r8d
mov rcx, qword [rbx]
lea edx, [rax + 0x18]
call sub.msvcrt.dll_fseek
mov r9, qword [rbx]
mov rcx, rsi
mov edx, 2
mov r8d, 1
mov esi, 0xffffffff
call sub.msvcrt.dll_fread
cmp byte [rsp + 0x20], 0xb
jne 0x401983
movzx eax, byte [rsp + 0x21]
cmp al, 1
je 0x401b06
cmp al, 2
jne 0x401a9b
mov edx, 0xa8
add edx, dword [rsp + 0x2c]
xor r8d, r8d
mov rcx, qword [rbx]
call sub.msvcrt.dll_fseek
mov r9, qword [rbx]
mov edx, 4
mov rcx, rdi
mov r8d, 1
call sub.msvcrt.dll_fread
mov esi, dword [rsp + 0x2c]
cmp esi, 0
je 0x401a9b
jle 0x401a9b
lea edi, [rsi - 8]
mov edx, esi
mov rcx, rbx
call fcn.00401540
test eax, eax
jns 0x4018df
sub esi, 1
cmp esi, edi
jne 0x401a82
mov esi, 0xffffffff
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
lea rcx, [rbx + 0x78]
lea rdx, [0x0040c030]
call fcn.00402d20
test rax, rax
mov rcx, rax
mov qword [rbx], rax
jne 0x4018b6
jmp 0x401a9b
lea rcx, str.Could_not_read_from_file.
mov esi, 0xffffffff
call fcn.00401ce0
jmp 0x401983
lea rcx, str.Error_on_file
mov esi, 0xffffffff
call fcn.00401ce0
jmp 0x401983
mov edx, 0x98
jmp 0x401a4f
lea rcx, str.Could_not_allocate_buffer_for_TOC.
mov esi, 0xffffffff
call fcn.00401ce0
jmp 0x401983
Function at 0x404370
Capabilities:
Delete file

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp sub.msvcrt.dll_remove

Function at 0x404390
Capabilities:
Query environment variable

Disassembly:
push rbx
mov eax, 0x4020
call fcn.0040a640
sub rsp, rax
xor r8d, r8d
lea rbx, [rsp + 0x20]
mov rdx, rcx
xor ecx, ecx
call fcn.00405120
mov r8d, 0x2000
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4043d1
xor eax, eax
add rsp, 0x4020
pop rbx
ret
lea rdx, [rsp + 0x2020]
mov r8d, 0x2000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
xor r8d, r8d
mov rdx, rbx
call fcn.00404f60
test rax, rax
mov rcx, rax
je 0x4043c6
cmp byte [rax], 0
je 0x4043c6
call sub.msvcrt.dll__strdup
add rsp, 0x4020
pop rbx
ret

Function at 0x404410
Capabilities:
Set environment variable

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
xor r8d, r8d
mov rbx, rdx
mov rdx, rcx
xor ecx, ecx
call fcn.00405120
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
mov rsi, rax
call fcn.00405120
mov rcx, rsi
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rsi
mov edi, eax
call sub.msvcrt.dll_free
mov rcx, rbx
call sub.msvcrt.dll_free
mov eax, edi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x404470
Capabilities:
Set environment variable

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.00405120
xor edx, edx
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x4044b0
Capabilities:
Create directory
Get common file path

Disassembly:
push r12
mov eax, 0x2030
push rbp
push rdi
push rsi
push rbx
call fcn.0040a640
sub rsp, rax
lea rbx, [rsp + 0x30]
mov rdi, rcx
mov ecx, 0x1000
lea rbp, [rsp + 0x20]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rdx, rbx
mov rcx, rdi
mov ebx, 5
mov r8d, 0x1000
call fcn.00404f60
call sub.msvcrt.dll__getpid
lea rdx, str._MEI_d
mov rcx, rbp
mov r8d, eax
call sub.msvcrt.dll_sprintf
mov r12, qword [sym.imp.msvcrt.dll__tempnam]
mov rdx, rbp
mov rcx, rdi
call r12
mov rcx, rax
mov rsi, rax
call sub.msvcrt.dll__mkdir
test eax, eax
je 0x404550
mov rcx, rsi
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x404512
xor eax, eax
add rsp, 0x2030
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_strcpy
mov rcx, rsi
call sub.msvcrt.dll_free
mov eax, 1
add rsp, 0x2030
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret