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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x30]
mov qword [rsp + 0xf0], r8
mov r14, rcx
mov r12, rdx
lea rdx, [0x00411003]
mov r8d, 0x58
mov rcx, rbp
mov qword [rsp + 0xf8], r9
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
call fcn.00409b20
test eax, eax
mov ebx, eax
jne 0x40187a
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov rsi, rax
je 0x401830
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov rdi, rax
je 0x401850
mov r15d, dword [r12 + 8]
cmp r15, 0x2000
mov r9, qword [r14]
mov edx, 1
mov rcx, rsi
mov r13d, 0x2000
cmovbe r13, r15
mov r8, r13
call sub.msvcrt.dll_fread
cmp r13, rax
jne 0x401870
mov rcx, qword [r14]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x401870
mov dword [rsp + 0x38], r13d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], eax
xor edx, edx
mov rcx, rbp
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x48], 0x2000
call fcn.00409bc0
cmp eax, 0xfffffffc
mov ebx, eax
jl 0x401755
cmp eax, 0xfffffffe
jle 0x401750
cmp eax, 2
jne 0x401755
mov r10d, 0xfffffffd
lea rdx, [r12 + 0x12]
mov r8d, r10d
mov ebx, 0xffffffff
lea rcx, str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
call fcn.00402b20
mov rcx, rbp
call fcn.0040b800
mov rcx, rsi
call sub.msvcrt.dll_free
mov rcx, rdi
call sub.msvcrt.dll_free
mov eax, ebx
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r10d, eax
jmp 0x401703
mov eax, dword [rsp + 0x48]
mov r11d, 0x2000
sub r11, rax
mov r9, rax
cmp qword [rsp + 0xf0], 0
je 0x4017f0
mov r8, r11
mov edx, 1
mov rcx, rdi
mov qword [rsp + 0x20], r11
mov r9, qword [rsp + 0xf0]
call sub.msvcrt.dll_fwrite
mov r11, qword [rsp + 0x20]
cmp r11, rax
jne 0x401898
mov rcx, qword [rsp + 0xf0]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x401898
mov r9d, dword [rsp + 0x48]
test r9d, r9d
je 0x4016d5
mov r10d, ebx
sub r15, r13
mov ebx, dword [rsp + 0x28]
cmp r10d, 1
je 0x4017db
test r15, r15
jne 0x40168a
cmp r10d, 1
je 0x40171c
jmp 0x401703
cmp qword [rsp + 0xf8], 0
je 0x4017b9
mov rcx, qword [rsp + 0xf8]
mov r8, r11
mov rdx, rdi
mov qword [rsp + 0x20], r11
mov dword [rsp + 0x2c], eax
call sub.msvcrt.dll_memcpy
mov r11, qword [rsp + 0x20]
mov r9d, dword [rsp + 0x2c]
add qword [rsp + 0xf8], r11
jmp 0x4017b9
lea r8, [r12 + 0x12]
xor edi, edi
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
lea rcx, str.malloc
call fcn.00402ca0
jmp 0x40171c
lea r8, [r12 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
lea rcx, str.malloc
call fcn.00402ca0
jmp 0x40171c
mov ebx, 0xffffffff
jmp 0x40171c
lea rdx, [r12 + 0x12]
mov r8d, eax
mov ebx, 0xffffffff
lea rcx, str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
call fcn.00402b20
jmp 0x401734
mov r10d, 0xffffffff
jmp 0x401703
Function at 0x401920
Capabilities:
Read file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [rcx]
test rbx, rbx
mov rdi, rcx
mov r12, rdx
je 0x401a50
mov edx, dword [r12 + 4]
xor r8d, r8d
mov rcx, rbx
add edx, dword [rdi + 8]
call fcn.0040e950
test eax, eax
js 0x401a61
mov esi, dword [r12 + 0xc]
mov rcx, rsi
call sub.msvcrt.dll_malloc
test rax, rax
mov rbx, rax
je 0x401a80
cmp byte [r12 + 0x10], 1
je 0x401a20
test rsi, rsi
mov r13, rax
mov r14d, 0x2000
jne 0x4019c8
nop
mov rcx, qword [rdi]
test rcx, rcx
je 0x4019a4
call sub.msvcrt.dll_fclose
mov qword [rdi], 0
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
add r13, rbp
sub rsi, rbp
je 0x401990
cmp rsi, 0x2000
mov rbp, r14
mov r9, qword [rdi]
mov rcx, r13
cmovbe rbp, rsi
mov r8d, 1
mov rdx, rbp
call sub.msvcrt.dll_fread
test rax, rax
jne 0x4019c0
lea r8, [r12 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
lea rcx, str.fread
call fcn.00402ca0
mov rcx, rbx
xor ebx, ebx
call sub.msvcrt.dll_free
mov rcx, qword [rdi]
test rcx, rcx
jne 0x401998
jmp 0x4019a4
xor r8d, r8d
mov r9, rax
mov rdx, r12
mov rcx, rdi
call fcn.004015e0
test eax, eax
jne 0x401a07
mov rcx, qword [rdi]
test rcx, rcx
jne 0x401998
jmp 0x4019a4
call fcn.004015b0
test eax, eax
jne 0x401aa0
mov rbx, qword [rdi]
jmp 0x401940
lea r8, [r12 + 0x12]
xor ebx, ebx
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
lea rcx, str.fseek
call fcn.00402ca0
jmp 0x4019a4
lea r8, [r12 + 0x12]
mov r9d, esi
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
lea rcx, str.malloc
call fcn.00402ca0
jmp 0x401990
lea rdx, [r12 + 0x12]
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
call fcn.00402b20
jmp 0x4019a4
Function at 0x401ac0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rsi, rdx
call fcn.00407420
cmp eax, 0xffffffff
mov edi, eax
je 0x401c01
lea r12, [rsi + 0x12]
lea rcx, [rbx + 0x3078]
mov rdx, r12
call fcn.00407660
test rax, rax
mov rbp, rax
je 0x401c8d
mov rcx, qword [rbx]
test rcx, rcx
je 0x401c20
mov edx, dword [rsi + 4]
xor r8d, r8d
add edx, dword [rbx + 8]
call fcn.0040e950
test eax, eax
js 0x401c54
cmp byte [rsi + 0x10], 1
je 0x401bd2
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov r13, rax
je 0x401cad
mov esi, dword [rsi + 0xc]
mov r14d, 0x2000
test rsi, rsi
jne 0x401b86
jmp 0x401c12
mov r9, rbp
mov r8d, 1
mov rdx, rdi
mov rcx, r13
call sub.msvcrt.dll_fwrite
test rax, rax
je 0x401c34
sub rsi, rdi
je 0x401c12
cmp rsi, 0x2000
mov rdi, r14
mov r9, qword [rbx]
mov rcx, r13
cmovbe rdi, rsi
mov r8d, 1
mov rdx, rdi
call sub.msvcrt.dll_fread
test rax, rax
jne 0x401b60
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
mov r8, r12
mov edi, 0xffffffff
lea rcx, str.fread
call fcn.00402ca0
mov rcx, r13
call sub.msvcrt.dll_free
jmp 0x401be5
xor r9d, r9d
mov r8, rbp
mov rdx, rsi
mov rcx, rbx
call fcn.004015e0
mov edi, eax
mov rcx, qword [rbx]
test rcx, rcx
je 0x401bf9
call sub.msvcrt.dll_fclose
mov qword [rbx], 0
mov rcx, rbp
call sub.msvcrt.dll_fclose
mov eax, edi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
xor edi, edi
jmp 0x401bc8
mov rcx, rbx
call fcn.004015b0
test eax, eax
jne 0x401c74
mov rcx, qword [rbx]
jmp 0x401b0f
lea rdx, str.Failed_to_extract__s:_failed_to_write_data_chunk__n
mov r8, r12
mov edi, 0xffffffff
lea rcx, str.fwrite
call fcn.00402ca0
jmp 0x401bc8
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
mov r8, r12
mov edi, 0xffffffff
lea rcx, str.fseek
call fcn.00402ca0
jmp 0x401be5
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov rdx, r12
mov edi, 0xffffffff
call fcn.00402b20
jmp 0x401be5
lea rdx, str.Failed_to_extract__s:_failed_to_open_target_file__n
mov r8, r12
mov edi, 0xffffffff
lea rcx, str.fopen
call fcn.00402ca0
jmp 0x401c01
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
mov r8, r12
mov edi, 0xffffffff
lea rcx, str.malloc
call fcn.00402ca0
jmp 0x401be5
Function at 0x401cd0
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 0x401e61
mov rax, qword [0x004177a0]
lea rdx, [rsp + 0x28]
mov r8d, 8
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
shr rax, 0x18
add eax, 0xc
mov byte [rsp + 0x2b], al
call fcn.00407dd0
test rax, rax
mov rsi, rax
je 0x401e88
mov rcx, qword [rbx]
xor r8d, r8d
mov edx, eax
call fcn.0040e950
test eax, eax
js 0x401e75
mov r9, qword [rbx]
lea rcx, [rbx + 0x20]
mov r8d, 1
mov edx, 0x58
call sub.msvcrt.dll_fread
test rax, rax
je 0x401e90
mov ecx, dword [rbx + 0x30]
add rsi, 0x58
xor r8d, r8d
mov dword [rbx + 0x507c], 0
mov eax, dword [rbx + 0x28]
mov edx, dword [rbx + 0x2c]
bswap ecx
mov dword [rbx + 0x30], ecx
mov ecx, dword [rbx + 0x34]
bswap eax
mov dword [rbx + 0x28], eax
mov eax, eax
sub rsi, rax
bswap edx
mov dword [rbx + 0x2c], edx
mov qword [rbx + 8], rsi
add edx, esi
bswap ecx
mov dword [rbx + 0x34], ecx
mov dword [0x0041b040], ecx
mov rcx, qword [rbx]
call fcn.0040e950
movsxd rsi, dword [rbx + 0x30]
mov rcx, rsi
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rbx + 0x10], rax
je 0x401ed7
mov r9, qword [rbx]
mov r8d, 1
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_fread
test rax, rax
je 0x401eaa
movsxd rax, dword [rbx + 0x30]
add rax, qword [rbx + 0x10]
mov rcx, qword [rbx]
mov qword [rbx + 0x18], rax
call sub.msvcrt.dll_ferror
test eax, eax
mov esi, eax
jne 0x401ec4
mov rax, qword [rbx + 0x10]
lea rdi, str.Cannot_read_Table_of_Contents._n
mov r8, qword [rbx + 0x18]
nop
cmp rax, r8
jae 0x401e43
mov ecx, dword [rax + 4]
mov edx, dword [rax]
bswap ecx
mov dword [rax + 4], ecx
mov ecx, dword [rax + 8]
bswap edx
mov dword [rax], edx
movsxd rdx, edx
bswap ecx
mov dword [rax + 8], ecx
mov ecx, dword [rax + 0xc]
bswap ecx
mov dword [rax + 0xc], ecx
add rax, rdx
cmp rax, qword [rbx + 0x10]
jae 0x401e00
mov rcx, rdi
call fcn.00402b20
mov rax, qword [rbx + 0x18]
mov r8, rax
cmp rax, r8
jb 0x401e05
mov rcx, qword [rbx]
test rcx, rcx
je 0x401e57
call sub.msvcrt.dll_fclose
mov qword [rbx], 0
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov rcx, rbx
call fcn.004015b0
test eax, eax
jne 0x401e88
mov rcx, qword [rbx]
jmp 0x401ce6
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.00402ca0
mov esi, 0xffffffff
jmp 0x401e57
lea rdx, str.Failed_to_read_cookie__n
mov esi, 0xffffffff
lea rcx, str.fread
call fcn.00402ca0
jmp 0x401e57
lea rdx, str.Could_not_read_full_TOC__n
mov esi, 0xffffffff
lea rcx, str.fread
call fcn.00402ca0
jmp 0x401e57
lea rcx, str.Error_on_file._n
mov esi, 0xffffffff
call fcn.00402b20
jmp 0x401e57
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
mov esi, 0xffffffff
lea rcx, str.malloc
call fcn.00402ca0
jmp 0x401e57
Function at 0x405c50
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rdx, qword [rcx + 0x10]
cmp rdx, qword [rcx + 0x18]
mov rbx, rcx
jb 0x405c72
jmp 0x405c85
call fcn.004018e0
cmp qword [rbx + 0x18], rax
mov rdx, rax
jbe 0x405c85
cmp byte [rdx + 0x11], 0x6c
mov rcx, rbx
jne 0x405c64
add rsp, 0x20
pop rbx
jmp fcn.00401920
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x407010
Capabilities:
Query environment variable

Disassembly:
push rbx
mov eax, 0x4020
call fcn.0040dd40
sub rsp, rax
xor r8d, r8d
lea rbx, [rsp + 0x20]
mov rdx, rcx
xor ecx, ecx
call fcn.00408290
mov r8d, 0x2000
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x407051
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.00407ff0
test rax, rax
mov rcx, rax
je 0x407046
cmp byte [rax], 0
je 0x407046
call sub.msvcrt.dll__strdup
add rsp, 0x4020
pop rbx
ret

Function at 0x4070f0
Capabilities:
Set environment variable

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.00408290
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 0x407130
Capabilities:
Create directory
Query environment variable

Disassembly:
push rbp
mov eax, 0x4028
push rdi
push rsi
push rbx
call fcn.0040dd40
sub rsp, rax
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.00408290
test rax, rax
mov rsi, rax
je 0x407260
lea rbx, [rsp + 0x20]
mov r8d, 0x1000
mov rcx, rax
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rsi
mov edi, eax
call sub.msvcrt.dll_free
test edi, edi
je 0x407241
mov rcx, rbx
call fcn.004086d0
test eax, eax
jne 0x407230
mov r8d, 0x1000
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__wfullpath]
mov rsi, rax
test rsi, rsi
je 0x40726e
lea rdi, [rsp + 0x2020]
xor edx, edx
mov r8d, 0x2000
mov rcx, rdi
call sub.msvcrt.dll_memset
mov edx, 0x5c
mov rcx, rsi
call sub.msvcrt.dll_wcschr
mov rbp, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test rax, rax
mov rbx, rax
je 0x407219
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
sub r8, rsi
sar r8, 1
add r8, 1
call sub.msvcrt.dll_wcsncpy
xor edx, edx
mov rcx, rdi
call rbp
lea rcx, [rbx + 2]
mov edx, 0x5c
call sub.msvcrt.dll_wcschr
test rax, rax
mov rbx, rax
jne 0x4071e4
xor edx, edx
mov rcx, rsi
call rbp
mov rax, rsi
add rsp, 0x4028
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsdup]
mov rsi, rax
jmp 0x4071a7
lea rcx, str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
xor esi, esi
call fcn.00402b20
mov rax, rsi
add rsp, 0x4028
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rcx, str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.00402b20
jmp 0x407220
lea rcx, str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00402b20
jmp 0x407220
Function at 0x407280
Capabilities:
Get common file path

Disassembly:
push r15
mov eax, 0x2048
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0040dd40
sub rsp, rax
test rdx, rdx
mov r15, rcx
mov r12, rdx
je 0x4073a0
lea rcx, [0x00413d23]
call fcn.00407010
mov rcx, r12
mov r14, rax
call fcn.00407130
test rax, rax
mov rbx, rax
je 0x40739c
lea rcx, [0x00413d28]
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
jne 0x4073f1
lea rbp, [rsp + 0x40]
mov ecx, 0x1000
mov ebx, 5
lea rdi, [rsp + 0x20]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.msvcrt.dll__getpid
lea r8, str._MEI_d
mov edx, 0x10
mov rcx, rdi
mov r9d, eax
call fcn.00406e90
mov r13, qword [sym.imp.msvcrt.dll__wtempnam]
mov rdx, rdi
mov rcx, rbp
call r13
mov rcx, rax
mov rsi, rax
call fcn.004084b0
test eax, eax
je 0x4073b0
mov rcx, rsi
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x40732d
test r12, r12
je 0x40739c
test r14, r14
je 0x407390
lea rcx, [0x00413d23]
mov rdx, r14
xor ebx, ebx
call fcn.00407090
mov rcx, r14
call sub.msvcrt.dll_free
mov eax, ebx
add rsp, 0x2048
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x00413d23]
call fcn.004070f0
xor ebx, ebx
jmp 0x407375
xor r14d, r14d
jmp 0x4072ed
mov r8d, 0x1000
mov rdx, rsi
mov rcx, r15
call fcn.00407ff0
mov rcx, rsi
mov ebx, 1
call sub.msvcrt.dll_free
test r12, r12
je 0x407375
test r14, r14
je 0x407404
lea rcx, [0x00413d23]
mov rdx, r14
call fcn.00407090
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x407375
lea rcx, str.LOADER:_Failed_to_set_the_TMP_environment_variable._n
xor ebx, ebx
call fcn.00402b20
jmp 0x407375
lea rcx, [0x00413d23]
call fcn.004070f0
jmp 0x407375

Function at 0x407490
Capabilities:
Delete directory

Disassembly:
push r13
mov eax, 0x44a8
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0040dd40
sub rsp, rax
mov r8d, 0x1000
lea r13, [rsp + 0x2490]
mov rdx, rcx
lea rsi, [rsp + 0x480]
mov rcx, r13
call fcn.00408290
mov rdx, r13
mov rcx, rsi
call sub.msvcrt.dll_wcscpy
mov rcx, rsi
call sub.msvcrt.dll_wcslen
mov rbp, rax
movzx eax, word [rsp + rax*2 + 0x47e]
cmp ax, 0x2f
je 0x4074f0
cmp ax, 0x5c
jne 0x407535
lea rdx, [0x00413db0]
mov rcx, rsi
call sub.msvcrt.dll_wcscat
lea rbx, [rsp + 0x250]
mov rcx, rsi
mov rdx, rbx
call fcn.0040e610
cmp rax, 0xffffffffffffffff
mov r12, rax
jne 0x407550
mov rcx, r13
call qword [sym.imp.msvcrt.dll__wrmdir]
nop
add rsp, 0x44a8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea rdx, [0x00413dac]
mov rcx, rsi
add rbp, 1
call sub.msvcrt.dll_wcscat
jmp 0x4074f0
lea rdi, [rsp + 0x20]
mov r8d, 0x230
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_memcpy
mov r8, rdi
mov rdx, rbp
mov rcx, rsi
call fcn.00407590
mov rdx, rbx
mov rcx, r12
call fcn.0040e6a0
test eax, eax
je 0x407555
mov rcx, r12
call qword [sym.imp.msvcrt.dll__findclose]
jmp 0x40751b
Function at 0x407590
Capabilities:
Delete directory
Delete file

Disassembly:
push rbp
mov eax, 0x1038
push rdi
push rsi
push rbx
call fcn.0040dd40
sub rsp, rax
lea rbx, [r8 + 0x24]
mov rdi, rcx
mov rbp, rdx
lea rdx, [0x00413db4]
mov rcx, rbx
mov rsi, r8
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x4075d0
add rsp, 0x1038
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rdx, [0x00413db8]
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x4075c1
xor eax, eax
mov rcx, rdi
mov rdx, rbx
mov word [rdi + rbp*2], ax
call sub.msvcrt.dll_wcscat
test byte [rsi], 0x10
mov rcx, rdi
je 0x407625
call fcn.00408660
test eax, eax
jne 0x407650
lea rbx, [rsp + 0x20]
mov r8d, 0x1000
mov rdx, rdi
mov rcx, rbx
call fcn.00407ff0
mov rcx, rbx
call fcn.00407490
jmp 0x4075c1
mov rbx, qword [sym.imp.msvcrt.dll__wremove]
call rbx
test eax, eax
je 0x4075c1
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rdi
call rbx
jmp 0x4075c1
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__wrmdir]
jmp 0x4075c1

Function at 0x4078c0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rdi
mov eax, 0x1020
push rsi
push rbx
call fcn.0040dd40
sub rsp, rax
mov rsi, rdx
mov rdi, r8
lea rdx, [0x00413e4c]
call fcn.00404220
mov rdx, rdi
mov rcx, rsi
mov rbx, rax
call fcn.00407660
test rbx, rbx
mov rdi, rax
je 0x4079b4
test rax, rax
je 0x4079b4
lea rsi, [rsp + 0x20]
nop word [rax + rax]
mov rcx, rbx
call sub.msvcrt.dll_feof
test eax, eax
jne 0x4079b0
mov r9, rbx
mov r8d, 0x1000
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
test rax, rax
jne 0x407960
mov rcx, rbx
call sub.msvcrt.dll_ferror
test eax, eax
je 0x407910
mov rcx, rbx
mov esi, 0xffffffff
call sub.msvcrt.dll_clearerr
jmp 0x407991
mov r9, rdi
mov r8, rax
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fwrite
test rax, rax
je 0x407984
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x407910
mov rcx, rdi
mov esi, 0xffffffff
call sub.msvcrt.dll_clearerr
mov rcx, rbx
call sub.msvcrt.dll_fclose
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov eax, esi
add rsp, 0x1020
pop rbx
pop rsi
pop rdi
ret
xor esi, esi
jmp 0x407991
test rbx, rbx
je 0x4079c1
mov rcx, rbx
call sub.msvcrt.dll_fclose
test rdi, rdi
mov esi, 0xffffffff
jne 0x407999
jmp 0x4079a1
Function at 0x407a40
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push rdi
mov eax, 0x2110
push rsi
push rbx
call fcn.0040dd40
sub rsp, rax
mov r8d, 0x1000
lea rsi, [rsp + 0x110]
mov rdx, rcx
mov dword [rsp + 0x5c], 0
lea rdi, [rsp + 0xa0]
mov rcx, rsi
call fcn.00408290
mov edx, 1
lea rcx, [0x00406e40]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
mov rcx, rdi
mov dword [rsp + 0x60], 0x18
mov qword [rsp + 0x68], 0
mov dword [rsp + 0x70], 1
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, 1
xor ecx, ecx
mov rbx, qword [fcn.0040f110]
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0xb8], 0
mov dword [rsp + 0xdc], 0x101
mov word [rsp + 0xe0], ax
call rbx
mov rcx, rax
call fcn.00406e60
mov ecx, 1
mov qword [rsp + 0xf0], rax
call rbx
mov rcx, rax
call fcn.00406e60
mov ecx, 2
mov qword [rsp + 0xf8], rax
call rbx
mov rcx, rax
call fcn.00406e60
mov qword [rsp + 0x100], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor r9d, r9d
mov qword [rsp + 0x40], rdi
mov rcx, rsi
lea rdx, [rsp + 0x80]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x48], rdx
lea r8, [rsp + 0x60]
mov rdx, rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x407bc0
mov rcx, qword [rsp + 0x80]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rdx, [rsp + 0x5c]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [rsp + 0x5c]
add rsp, 0x2110
pop rbx
pop rsi
pop rdi
ret
lea rdx, str.Error_creating_child_process__n
lea rcx, str.CreateProcessW
call fcn.00402c00
mov eax, 0xffffffff
add rsp, 0x2110
pop rbx
pop rsi
pop rdi
ret

Function at 0x407dd0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12, rcx
mov ecx, 0x2000
mov rbp, rdx
mov rsi, r8
call sub.msvcrt.dll_malloc
test rax, rax
mov rbx, rax
je 0x407ed2
xor edx, edx
mov r8d, 2
mov rcx, r12
call fcn.0040e950
test eax, eax
js 0x407ed2
mov rcx, r12
call fcn.0040ee40
movsxd rdi, eax
cmp rdi, rsi
jb 0x407ed2
lea rax, [rsi - 1]
mov qword [rsp + 0x28], rax
cmp rdi, 0x2000
mov r14d, 0x2000
cmovae r14, rdi
lea r13, [r14 - 0x2000]
sub rdi, r13
cmp rsi, rdi
ja 0x407ed2
xor r8d, r8d
mov edx, r13d
mov rcx, r12
call fcn.0040e950
test eax, eax
js 0x407ed2
mov r9, r12
mov r8, rdi
mov edx, 1
mov rcx, rbx
call sub.msvcrt.dll_fread
cmp rax, rdi
jne 0x407ed2
sub rax, rsi
add rax, 1
mov rdi, rax
jne 0x407e98
jmp 0x407ec0
test r15, r15
mov rdi, r15
je 0x407ec0
lea r15, [rdi - 1]
mov r8, rsi
mov rdx, rbp
lea rcx, [rbx + r15]
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x407e90
lea rsi, [r14 + rdi - 0x2001]
jmp 0x407ed4
mov rax, qword [rsp + 0x28]
test r13, r13
lea rdi, [rax + r13]
jne 0x407e34
xor esi, esi
mov rcx, rbx
call sub.msvcrt.dll_free
mov rax, rsi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x4084b0
Capabilities:
Create directory

Disassembly:
push r14
mov eax, 0x2060
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0040dd40
sub rsp, rax
mov dword [rsp + 0x3c], 0
mov r12, rcx
mov qword [rsp + 0x40], 0xffffffffffffffff
lea rsi, [rsp + 0x40]
mov qword [rsp + 0x60], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rsi
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4085b1
mov rbx, qword [rsp + 0x40]
lea rdi, [rsp + 0x60]
xor ebp, ebp
mov rcx, rbp
call sub.msvcrt.dll_free
cmp rbx, 0xffffffffffffffff
je 0x40852b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x60]
lea r9, str.S_1_3_4
mov edx, 0x1000
mov rcx, rdi
lea r8, str.D:_A__FA____s_
test rbx, rbx
cmovne r9, rbx
call qword [sym.imp.msvcrt.dll__snwprintf]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor r9d, r9d
mov edx, 1
mov rcx, rdi
mov dword [rsp + 0x40], 0x18
lea r8, [rsi + 8]
mov dword [rsp + 0x50], 0
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x408650
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
sete al
movzx eax, al
neg eax
add rsp, 0x2060
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
lea r13, [rsp + 0x3c]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x20], r13
mov edx, 1
mov rdi, qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call rdi
test eax, eax
jne 0x4085e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x408508
mov edx, dword [rsp + 0x3c]
mov ecx, 1
mov r14, rdx
call sub.msvcrt.dll_calloc
mov rbx, qword [rsp + 0x40]
test rax, rax
mov rbp, rax
je 0x408623
mov qword [rsp + 0x20], r13
mov r9d, r14d
mov r8, rax
mov edx, 1
mov rcx, rbx
call rdi
test eax, eax
jne 0x408630
mov rbx, qword [rsp + 0x40]
lea rdi, [rsp + 0x60]
jmp 0x408514
lea rdi, [rsp + 0x60]
mov rcx, qword [rbp]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov rbx, qword [rsp + 0x40]
jmp 0x408514
mov eax, 0xffffffff
jmp 0x40859f
Function at 0x408bf0
Capabilities:
Hash data with crc32

Disassembly:
push rsi
push rbx
mov eax, 0x80000000
test ecx, ecx
je 0x408c65
lea rsi, [0x00414100]
mov ebx, 3
jmp 0x408c17
add ebx, 1
sar ecx, 1
je 0x408c65
test cl, 1
je 0x408c10
mov edx, ebx
mov r8d, 0x80000000
and edx, 0x1f
mov r11d, dword [rsi + rdx*4]
mov edx, eax
xor eax, eax
jmp 0x408c4e
mov r10d, edx
shr edx, 1
mov r9d, edx
and r10d, 1
shr r8d, 1
xor r9d, 0xedb88320
test r10d, r10d
cmovne edx, r9d
test r11d, r8d
je 0x408c31
lea r9d, [r8 - 1]
xor eax, edx
test r9d, r11d
jne 0x408c31
add ebx, 1
sar ecx, 1
jne 0x408c17
pop rbx
pop rsi
ret