joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000bb50
Capabilities:
Get common file path

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x478
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3f0], 0xfffffffffffffffe
mov qword [rbp + 0x3e0], rcx
mov qword [rbp + 0x3c8], 2
xorps xmm0, xmm0
movups xmmword [rbp + 0x3d0], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x3e8], rax
xor edi, edi
xor ebx, ebx
xor r12d, r12d
cmp r8, 0x201
jae 0x14000bbe0
jmp 0x14000bbcf
jae 0x14000bca0
cmp r8, 0x201
jae 0x14000bbe0
mov esi, 0x200
lea r13, [rbp - 0x58]
mov r15, r8
jmp 0x14000bc38
sub r8, r12
sub rbx, r12
cmp rbx, r8
jae 0x14000bc0f
lea rcx, [rbp + 0x3c8]
mov rdx, r12
call fcn.140029780
mov rax, qword [rbp + 0x3c8]
mov qword [rbp + 0x3e8], rax
mov rdi, qword [rbp + 0x3d0]
mov eax, 0xffffffff
cmp rdi, rax
mov r12d, 0xffffffff
cmovb r12, rdi
mov qword [rbp + 0x3d8], r12
mov rbx, rdi
mov rsi, r12
mov r13, qword [rbp + 0x3e8]
mov r15, r12
xor ecx, ecx
call qword [sym.imp.kernel32.dll_SetLastError]
mov ecx, r15d
mov rdx, r13
call qword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov r14d, eax
test eax, eax
jne 0x14000bc61
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x14000bd08
mov r8d, r14d
cmp r15, r8
jne 0x14000bbc0
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000bd2b
add r15, r15
mov eax, 0xffffffff
cmp r15, rax
cmovae r15, rax
mov r8, r15
cmp r8, 0x201
jb 0x14000bbcf
jmp 0x14000bbe0
cmp rsi, r8
jb 0x14000bd45
lea rcx, [rbp + 0x3a8]
mov rdx, r13
call fcn.140010260
movups xmm0, xmmword [rbp + 0x3a8]
movups xmm1, xmmword [rbp + 0x3b8]
mov rsi, qword [rbp + 0x3e0]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
test rdi, rdi
je 0x14000bcf1
add rdi, rdi
mov r8d, 2
mov rcx, qword [rbp + 0x3e8]
mov rdx, rdi
call fcn.1400084b0
mov rax, rsi
add rsp, 0x478
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov rsi, qword [rbp + 0x3e0]
mov qword [rsi], rax
mov byte [rsi + 0x18], 2
test rdi, rdi
jne 0x14000bcd9
jmp 0x14000bcf1
lea rcx, str.internal_error:_entered_unreachable_code_rustc_d12c6e947ceacf3b22c154caf9532b390d8dc88alibrary_alloc_src_vecmod.rs
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.14002a400
jmp 0x14000bd5a
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call fcn.14002a850
ud2
Function at 0x140010ac0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rdi, rdx
mov rsi, rcx
movzx ebp, byte [rdx + 0x38]
cmp bpl, 1
ja 0x140010b1d
movzx ebx, byte [rdi + 0x3a]
mov rcx, rdi
call fcn.1400109a0
test bpl, bpl
jne 0x140010b21
lea rcx, [rdi + 0x10]
xor r8d, r8d
cmp byte [rdi + 0x10], 6
cmove rcx, r8
je case.0x140010b11.2
movzx edx, byte [rcx]
mov r8d, 6
lea r9, [0x140010c94]
movsxd rdx, dword [r9 + rdx*4]
add rdx, r9
jmp rdx
mov r8, qword [rcx + 0x10]
add r8, 4
jmp case.0x140010b11.2
xor eax, eax
xor ebx, ebx
xor r8d, r8d
movzx r10d, bl
movzx ebx, al
lea rcx, [r10 + rbx]
add rcx, r8
mov rdx, qword [rdi + 8]
cmp rdx, rcx
jb 0x140010c78
mov r11, qword [rdi]
lea rax, [r11 + rcx]
cmp rdx, rcx
jne 0x140010b58
movzx r9d, byte [rdi + 0x10]
xor r10d, r10d
jmp 0x140010bd9
movzx r9d, byte [rdi + 0x10]
add r8, rbx
add r8, r10
sub r8, rdx
inc r8
lea rdi, [rdx + r11]
dec rdi
xor r10d, r10d
cmp r9b, 3
jae 0x140010ba0
nop dword [rax]
cmp byte [rdi], 0x5c
je 0x140010bbb
inc r8
dec rdi
cmp r8, 1
jne 0x140010b80
jmp 0x140010bd9
movzx ebx, byte [rdi]
cmp ebx, 0x2f
je 0x140010bbb
cmp ebx, 0x5c
je 0x140010bbb
inc r8
dec rdi
cmp r8, 1
jne 0x140010ba0
jmp 0x140010bd9
neg r8
add rcx, r8
inc rcx
cmp rdx, rcx
jb 0x140010c86
add r11, rcx
mov r10d, 1
mov rax, r11
sub rdx, rcx
je 0x140010c02
mov cl, 9
cmp rdx, 2
je 0x140010c06
cmp rdx, 1
jne 0x140010c15
cmp byte [rax], 0x2e
jne 0x140010c15
xor ecx, ecx
cmp r9b, 3
setae cl
lea ecx, [rcx + rcx*2]
add ecx, 7
jmp 0x140010c15
mov cl, 0xa
jmp 0x140010c15
cmp byte [rax], 0x2e
jne 0x140010c15
cmp byte [rax + 1], 0x2e
sete cl
xor cl, 9
add r10, rdx
mov qword [rsi], r10
mov byte [rsi + 8], cl
mov qword [rsi + 0x10], rax
mov qword [rsi + 0x18], rdx
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
ret
mov rdx, qword [rcx + 0x10]
mov rcx, qword [rcx + 0x20]
lea r8, [rcx + 1]
test rcx, rcx
cmove r8, rcx
add r8, rdx
add r8, 8
jmp case.0x140010b11.2
mov rdx, qword [rcx + 0x10]
mov rcx, qword [rcx + 0x20]
lea r8, [rcx + 1]
test rcx, rcx
cmove r8, rcx
add r8, rdx
add r8, 2
jmp case.0x140010b11.2
mov r8d, 2
jmp case.0x140010b11.2
lea r8, str.library_std_srcpath.rs
call fcn.14002a7d0
ud2
lea r8, str.library_std_srcpath.rs
call fcn.14002a7d0
ud2
Function at 0x140017da0
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
mov rcx, qword [rsp + 0xe0]
movups xmm0, xmmword [0x14002d778]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
test rcx, rcx
je 0x140017de4
mov rdx, qword [rsp + 0xe8]
mov qword [rsp + 0x80], rdx
test rcx, rcx
mov qword [rsp + 0x78], rcx
lea rdx, [rsp + 0x80]
cmove rdx, rcx
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], 0
mov rcx, rdi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, 0x103
jne 0x140017e43
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0xc0000011
jne 0x140017e52
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x140017e8a
cmp eax, 0x103
je 0x140017e94
test eax, eax
js 0x140017e6f
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x140017e8a
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0xa8
pop rdi
pop rsi
ret
mov byte [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
lea rax, [0x14002d7d8]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.14000fd10
mov rcx, rax
call fcn.1400096a0
mov ecx, 7
int 0x29
ud2

Function at 0x140017f00
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
mov rcx, qword [rsp + 0xe0]
movups xmm0, xmmword [0x14002d778]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
test rcx, rcx
je 0x140017f44
mov rdx, qword [rsp + 0xe8]
mov qword [rsp + 0x80], rdx
test rcx, rcx
mov qword [rsp + 0x78], rcx
lea rdx, [rsp + 0x80]
cmove rdx, rcx
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], 0
mov rcx, rdi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x140017faa
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x140017fe1
test eax, eax
js 0x140017fbb
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x140017fd4
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
add rsp, 0xa8
pop rdi
pop rsi
ret
mov byte [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
lea rax, [0x14002d7d8]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.14000fd10
mov rcx, rax
call fcn.1400096a0
mov ecx, 7
int 0x29
ud2
Function at 0x140027540
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
test r8, r8
je 0x1400275ba
mov rax, rdx
mov rdx, qword [rsp + 0x70]
mov esi, ecx
shr esi, 8
lea r8, [rax + r8*2]
xor r11d, r11d
mov rbx, rax
movzx edi, byte [rax + 1]
add rax, 2
lea r10, [r11 + rdi]
cmp byte [rbx], sil
jne 0x1400275b0
cmp r10, r11
jb 0x140027653
cmp r10, rdx
ja 0x140027667
add r11, r9
xor ebx, ebx
nop dword [rax]
cmp rdi, rbx
je 0x1400275b2
lea r14, [rbx + 1]
cmp byte [r11 + rbx], cl
mov rbx, r14
jne 0x140027590
jmp 0x140027627
ja 0x1400275ba
mov r11, r10
cmp rax, r8
jne 0x140027562
mov rdx, qword [rsp + 0x80]
test rdx, rdx
je 0x14002762b
mov r8, qword [rsp + 0x78]
add rdx, r8
movzx ecx, cx
mov al, 1
nop word cs:[rax + rax]
lea r10, [r8 + 1]
movzx r9d, byte [r8]
test r9b, r9b
js 0x140027600
mov r8, r10
sub ecx, r9d
jns 0x14002761e
jmp 0x14002762d
cmp r10, rdx
je 0x140027639
movzx r10d, byte [r8 + 1]
add r8, 2
and r9d, 0x7f
shl r9d, 8
or r9d, r10d
sub ecx, r9d
js 0x14002762d
xor al, 1
cmp r8, rdx
jne 0x1400275e0
jmp 0x14002762d
xor eax, eax
jmp 0x14002762d
mov al, 1
and al, 1
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
lea rcx, str.called__Option::unwrap____on_a__None__valuelibrarycore_src_nummod.rsfrom_str_radix_int:_must_lie_in_the_range___2__36_____found
lea r8, str.librarycore_srcunicodeprintable.rs
mov edx, 0x2b
call fcn.14002a400
ud2
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r11
mov rdx, r10
call fcn.14002a8d0
ud2
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r10
call fcn.14002a850
ud2

Function at 0x14002911c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.kernel32.dll_GetModuleHandleW]
test rax, rax
je 0x140029166
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140029166
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140029166
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140029166
cmp dword [rcx + 0x84], 0xe
jbe 0x140029166
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140029168
xor al, al
add rsp, 0x28
ret
Function at 0x401610
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 0x401670
lea rsi, [rbx + 0x20]
mov r9, qword [rbx]
mov r8d, 1
mov edx, 0x58
mov rcx, rsi
call sub.msvcrt.dll_fread
test rax, rax
je 0x401670
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 0x4016c0
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 0x401803
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]
lea edx, [rsi + rax]
xor r8d, r8d
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 0x401853
mov r12, qword [rbx]
mov ecx, dword [rdi + 8]
call rbp
mov r8d, 1
mov edx, eax
mov rcx, rsi
mov r9, r12
call sub.msvcrt.dll_fread
test rax, rax
je 0x401840
cmp byte [rdi + 0x10], 1
je 0x401760
mov rcx, qword [rbx]
test rcx, rcx
je 0x40174d
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.00408230
mov ecx, dword [rdi + 0xc]
call rbp
mov ecx, eax
call sub.msvcrt.dll_malloc
test rax, rax
mov r12, rax
je 0x4018ad
mov ecx, dword [rdi + 8]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x20], rsi
call rbp
mov ecx, dword [rdi + 0xc]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x30], r12
call rbp
lea rbp, [rsp + 0x20]
lea rdx, [0x0040c0cf]
mov r8d, 0x58
mov dword [rsp + 0x38], eax
mov rcx, rbp
call fcn.00405a40
test eax, eax
js 0x401866
mov edx, 4
mov rcx, rbp
call fcn.00405ac0
test eax, eax
js 0x401898
mov rcx, rbp
call fcn.00407680
mov rcx, rsi
mov rsi, r12
call sub.msvcrt.dll_free
jmp 0x401739
lea rcx, [rcx + 0x78]
lea rdx, [0x0040c060]
call fcn.00402e60
test rax, rax
mov qword [rbx], rax
jne 0x4016da
lea rcx, str.Cannot_open_archive_file_n
xor esi, esi
call fcn.00401e30
mov rax, rsi
sub rsp, 0xffffffffffffff80
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rcx, str.Could_not_read_from_file_n
xor esi, esi
call fcn.00401e30
jmp 0x40174d
lea rcx, str.Could_not_allocate_read_buffer_n
xor esi, esi
call fcn.00401e30
jmp 0x40174d
mov r8, qword [rsp + 0x40]
lea rcx, str.Error__d_from_inflateInit:__s_n
mov edx, eax
call fcn.00401e30
mov rcx, rsi
xor esi, esi
call sub.msvcrt.dll_free
lea rdx, [rdi + 0x12]
lea rcx, str.Error_decompressing__s_n
call fcn.00401e30
jmp 0x40174d
mov r8, qword [rsp + 0x40]
lea rcx, str.Error__d_from_inflate:__s_n
mov edx, eax
call fcn.00401e30
jmp 0x401879
lea rcx, str.Error_allocating_decompression_buffer_n
call fcn.00401e30
jmp 0x401879
Function at 0x4018c0
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.004016c0
mov rcx, rbx
mov rbp, rax
call fcn.004046b0
cmp eax, 0xffffffff
je 0x40193c
lea r12, [rsi + 0x12]
lea rcx, [rbx + 0x2078]
mov rdx, r12
call fcn.00404a00
mov rdi, rax
mov ecx, dword [rsi + 0xc]
call qword [sym.imp.WS2_32.dll_ntohl]
test rdi, rdi
mov ebx, eax
je 0x401966
mov r9, rdi
mov r8d, 1
mov rdx, rbx
mov rcx, rbp
call sub.msvcrt.dll_fwrite
cmp rax, 1
je 0x40192a
test rbx, rbx
jne 0x401950
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.00401dc0
mov eax, 0xffffffff
jmp 0x40193c
lea rcx, str._s_could_not_be_extracted__n
mov rdx, r12
call fcn.00401dc0
mov eax, 0xffffffff
jmp 0x40193c
Function at 0x401980
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 0x401b90
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.00401610
test eax, eax
js 0x401a70
mov rdi, qword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [rbx + 0x28]
mov dword [rbx + 0x407c], 0
call rdi
sub esi, eax
mov ecx, dword [rbx + 0x2c]
mov dword [rbx + 8], esi
call rdi
mov rcx, qword [rbx]
lea edx, [rsi + rax]
xor r8d, r8d
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 0x401bf0
mov rsi, qword [rbx]
mov ecx, dword [rbx + 0x30]
call rdi
mov rcx, qword [rbx + 0x10]
mov edx, eax
mov r8d, 1
mov r9, rsi
call sub.msvcrt.dll_fread
test rax, rax
je 0x401bb1
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 0x401bd0
mov rcx, qword [rbx]
test rcx, rcx
je 0x401a63
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 r8d, 2
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
cmp byte [rsp + 0x20], 0x4d
jne 0x401b7b
cmp byte [rsp + 0x21], 0x5a
jne 0x401b7b
mov rcx, qword [rbx]
xor r8d, r8d
mov edx, 0x3c
lea rdi, [rsp + 0x2c]
call sub.msvcrt.dll_fseek
mov r9, qword [rbx]
mov r8d, 1
mov edx, 4
mov rcx, rdi
call sub.msvcrt.dll_fread
mov eax, dword [rsp + 0x2c]
mov rcx, qword [rbx]
xor r8d, r8d
lea edx, [rax + 0x18]
call sub.msvcrt.dll_fseek
mov r9, qword [rbx]
mov rcx, rsi
mov r8d, 1
mov edx, 2
mov esi, 0xffffffff
call sub.msvcrt.dll_fread
cmp byte [rsp + 0x20], 0xb
jne 0x401a63
movzx eax, byte [rsp + 0x21]
cmp al, 1
je 0x401be6
cmp al, 2
jne 0x401b7b
mov edx, 0xa8
add edx, dword [rsp + 0x2c]
mov rcx, qword [rbx]
xor r8d, r8d
call sub.msvcrt.dll_fseek
mov r9, qword [rbx]
mov r8d, 1
mov edx, 4
mov rcx, rdi
call sub.msvcrt.dll_fread
mov esi, dword [rsp + 0x2c]
cmp esi, 0
je 0x401b7b
jle 0x401b7b
lea edi, [rsi - 8]
mov edx, esi
mov rcx, rbx
call fcn.00401610
test eax, eax
jns 0x4019bf
sub esi, 1
cmp esi, edi
jne 0x401b62
mov esi, 0xffffffff
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
lea rcx, [rbx + 0x78]
lea rdx, [0x0040c060]
call fcn.00402e60
test rax, rax
mov rcx, rax
mov qword [rbx], rax
jne 0x401996
jmp 0x401b7b
lea rcx, str.Could_not_read_from_file.
mov esi, 0xffffffff
call fcn.00401dc0
jmp 0x401a63
lea rcx, str.Error_on_file
mov esi, 0xffffffff
call fcn.00401dc0
jmp 0x401a63
mov edx, 0x98
jmp 0x401b2f
lea rcx, str.Could_not_allocate_buffer_for_TOC.
mov esi, 0xffffffff
call fcn.00401dc0
jmp 0x401a63
Function at 0x4044a0
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 0x4044c0
Capabilities:
Query environment variable

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

Function at 0x404540
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.004051d0
xor r8d, r8d
mov rsi, rax
mov rdx, rbx
xor ecx, ecx
call fcn.004051d0
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 0x4045a0
Capabilities:
Set environment variable

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.004051d0
mov rbx, rax
xor edx, edx
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 0x4045e0
Capabilities:
Create directory
Get common file path

Disassembly:
push r12
push rbp
mov eax, 0x2030
push rdi
push rsi
push rbx
call fcn.0040a7e0
sub rsp, rax
lea rbx, [rsp + 0x30]
mov rdi, rcx
lea rbp, [rsp + 0x20]
mov ecx, 0x1000
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rdx, rbx
mov r8d, 0x1000
mov rcx, rdi
call fcn.00405010
call sub.msvcrt.dll__getpid
lea rdx, str._MEI_d
mov r8d, eax
mov rcx, rbp
mov ebx, 5
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 0x404680
mov rcx, rsi
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x404642
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
Function at 0x404710
Capabilities:
Delete directory

Disassembly:
push r15
push r14
mov eax, 0x13e8
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.0040a7e0
sub rsp, rax
lea r13, [rsp + 0x3d0]
mov qword [rsp + 0x1430], rcx
mov rdx, rcx
mov rbp, r13
mov rcx, r13
call sub.msvcrt.dll_strcpy
mov edx, dword [rbp]
add rbp, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x404747
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [rbp + 2]
cmove rbp, rdx
add al, al
sbb rbp, 3
sub rbp, r13
movzx eax, byte [rsp + rbp + 0x3cf]
cmp al, 0x2f
je 0x404791
cmp al, 0x5c
jne 0x404940
mov rax, rbp
lea r14, [rsp + 0x2a0]
mov edx, 0x2a
mov rcx, r13
mov word [r13 + rax], dx
mov rdx, r14
call qword [sym.imp.msvcrt.dll__findfirst64]
cmp rax, 0xffffffffffffffff
mov r15, rax
je 0x404917
mov eax, dword [rsp + 0x2a0]
lea r9, [r14 + 0x28]
lea r12, [rsp + 0x194]
lea rsi, [rsp + 0x170]
mov r8d, 0x104
lea rdi, [rsp + 0x40]
mov rdx, r9
mov rcx, r12
mov qword [rsp + 0x30], r9
mov dword [rsp + 0x170], eax
mov rax, qword [rsp + 0x2a8]
lea rbx, [rsp + 0x40]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x178], rax
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x180], rax
mov rax, qword [rsp + 0x2b8]
mov qword [rsp + 0x188], rax
mov rax, qword [rsp + 0x2c0]
mov dword [rsp + 0x190], eax
call sub.msvcrt.dll_strncpy
mov ecx, 0x25
mov r8, rbx
mov rdx, rbp
rep movsq qword [rdi], qword [rsi]
mov rcx, r13
call fcn.00404960
mov qword [rsp + 0x38], r12
mov r12, rbx
jmp 0x4048f7
mov eax, dword [rsp + 0x2a0]
mov rdx, qword [rsp + 0x30]
mov r8d, 0x104
mov rcx, qword [rsp + 0x38]
mov dword [rsp + 0x170], eax
mov rax, qword [rsp + 0x2a8]
mov qword [rsp + 0x178], rax
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x180], rax
mov rax, qword [rsp + 0x2b8]
mov qword [rsp + 0x188], rax
mov rax, qword [rsp + 0x2c0]
mov dword [rsp + 0x190], eax
call sub.msvcrt.dll_strncpy
test esi, esi
jne 0x40490e
mov rdi, rbx
mov ecx, 0x25
mov rsi, qword [rsp + 0x28]
rep movsq qword [rdi], qword [rsi]
mov r8, r12
mov rdx, rbp
mov rcx, r13
mov rbx, r12
call fcn.00404960
mov rdx, r14
mov rcx, r15
call qword [sym.imp.msvcrt.dll__findnext64]
cmp eax, 0xffffffff
mov esi, eax
jne 0x404870
mov rcx, r15
call qword [sym.imp.msvcrt.dll__findclose]
mov rcx, qword [rsp + 0x1430]
call sub.msvcrt.dll__rmdir
nop
add rsp, 0x13e8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x5c
mov word [r13 + rbp], cx
add rbp, 1
mov rax, rbp
jmp 0x404794

Function at 0x404960
Capabilities:
Delete file

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
lea rdi, [0x0040d43c]
lea rax, [r8 + 0x24]
mov rbx, rcx
mov ecx, 2
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
je 0x404994
lea rdi, [0x0040d43e]
mov ecx, 3
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
jne 0x4049a0
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov byte [rbx + rdx], 0
mov rcx, rbx
mov rdx, rax
mov qword [rsp + 0x28], r8
call sub.msvcrt.dll_strcat
mov r8, qword [rsp + 0x28]
mov rcx, rbx
test byte [r8], 0x10
jne 0x4049d5
call sub.msvcrt.dll_remove
test eax, eax
je 0x404994
mov rcx, rbx
call fcn.004044a0
jmp 0x404994
call fcn.00404710
jmp 0x404994