joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180010920
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x20
mov r8, qword [rcx]
mov rbp, rcx
movabs rcx, 0xffffffff00000000
mov rsi, qword [r8 + 0x30]
movzx eax, word [r8 + 0x14]
xor edi, edi
and rsi, rcx
cmp di, word [r8 + 6]
jae 0x180010a1f
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], r12
lea r12, [0x18003fa80]
lea rbx, [rax + r8 + 0x3c]
nop word [rax + rax]
mov r9d, dword [rbx]
mov eax, r9d
mov edx, r9d
mov r10d, r9d
shr eax, 0x1d
shr edx, 0x1e
shr r10d, 0x1f
and eax, 1
and edx, 1
bt r9d, 0x19
jae 0x1800109aa
mov ecx, dword [rbx - 0x1c]
mov edx, dword [rbx - 0x14]
mov r8d, 0x4000
or rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x1800109fe
movsxd rcx, eax
movsxd rax, edx
lea rdx, [rax + rcx*2]
lea rcx, [r10 + rdx*2]
mov r10d, dword [r12 + rcx*4]
bt r9d, 0x1a
jae 0x1800109c8
bts r10d, 9
mov eax, dword [rbx - 0x14]
test eax, eax
jne 0x1800109e8
test r9b, 0x40
je 0x1800109db
mov eax, dword [r8 + 0x20]
jmp 0x1800109e4
test r9b, r9b
jns 0x1800109fe
mov eax, dword [r8 + 0x24]
test eax, eax
je 0x1800109fe
mov ecx, dword [rbx - 0x1c]
lea r9, [rsp + 0x40]
mov edx, eax
or rcx, rsi
mov r8d, r10d
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8, qword [rbp]
inc edi
add rbx, 0x28
movzx eax, word [r8 + 6]
cmp edi, eax
jl 0x180010970
mov r12, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret

Function at 0x180011080
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x640
mov rax, qword [0x18003d020]
xor rax, rsp
mov qword [rsp + 0x630], rax
mov rdi, rcx
mov rbx, rdx
lea rcx, [rsp + 0x31]
xor edx, edx
mov r8d, 0x1ff
mov byte [rsp + 0x30], 0
call fcn.180016520
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
mov dword [rsp + 0x20], 0x200
call qword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x1800110ea
lea rdx, str.UnKnow
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rcx, [rsp + 0x230]
xor edx, edx
mov r8d, 0x400
call fcn.180016520
lea r8, [rsp + 0x30]
lea rdx, str.SOFTWARE_s_
lea rcx, [rsp + 0x230]
call qword [sym.imp.USER32.dll_wsprintfA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [rsp + 0x230]
mov r8, rbx
mov r9d, eax
mov rdx, rdi
call fcn.180001c10
test eax, eax
setne al
mov rcx, qword [rsp + 0x630]
xor rcx, rsp
call fcn.180011250
mov rbx, qword [rsp + 0x660]
add rsp, 0x640
pop rdi
ret
Function at 0x180011160
Capabilities:
Get hostname

Disassembly:
push rbx
sub rsp, 0x640
mov rax, qword [0x18003d020]
xor rax, rsp
mov qword [rsp + 0x630], rax
mov rbx, rcx
lea rcx, [0x180042910]
xor edx, edx
mov r8d, 0x400
call fcn.180016520
lea rcx, [rsp + 0x31]
xor edx, edx
mov r8d, 0x1ff
mov byte [rsp + 0x30], 0
call fcn.180016520
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
mov dword [rsp + 0x20], 0x200
call qword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x1800111d7
lea rdx, str.UnKnow
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rcx, [rsp + 0x230]
xor edx, edx
mov r8d, 0x400
call fcn.180016520
lea r8, [rsp + 0x30]
lea rdx, str.SOFTWARE_s_
lea rcx, [rsp + 0x230]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rcx, [rsp + 0x230]
mov rdx, rbx
call fcn.1800018f0
lea rax, [0x180042910]
mov rcx, qword [rsp + 0x630]
xor rcx, rsp
call fcn.180011250
add rsp, 0x640
pop rbx
ret

Function at 0x180012c23
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x18003d020]
jne 0x18001126a
rol rcx, 0x10
test cx, 0xffff
jne 0x180011266
repz ret
ror rcx, 0x10
jmp 0x180012b7c
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x180040ea0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x180040f98]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180012c01
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x180040ea0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x180012c23
mov rax, qword [rsp + 0x88]
mov qword [0x180040f98], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x180040f38], rax
mov rax, qword [0x180040f98]
mov qword [0x180040e10], rax
mov rax, qword [rsp + 0x90]
mov qword [0x180040f20], rax
mov dword [0x180040e00], 0xc0000409
mov dword [0x180040e04], 1
mov rax, qword [0x18003d020]
mov qword [rsp + 0x68], rax
mov rax, qword [0x18003d028]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x180040e98], eax
mov ecx, 1
call fcn.18001820c
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x18002d640]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x180040e98], 0
jne 0x180012caa
mov ecx, 1
call fcn.18001820c
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
Function at 0x180017430
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, edx
test rcx, rcx
jne 0x18001745a
call fcn.180014188
and dword [rax], 0
call fcn.180014168
mov ebx, socket
mov dword [rax], ebx
call fcn.180014100
mov eax, ebx
jmp 0x1800174aa
test edx, 0xfffffff9
jne 0x18001743d
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x180017483
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1800141a8
call fcn.180014168
mov eax, dword [rax]
jmp 0x1800174aa
test al, 0x10
jne 0x1800174a8
test al, 1
je 0x1800174a8
test bl, 2
je 0x1800174a8
call fcn.180014188
mov dword [rax], 5
call fcn.180014168
mov dword [rax], select
jmp 0x18001747a
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x18001ca08
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rax, qword [0x18003d020]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.180012e00
xor ebx, ebx
cmp qword [0x180041f18], rbx
mov rdi, rax
jne 0x18001cb1b
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x18001cbf2
lea rdx, str.MessageBoxW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x18001cbf2
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x180041f18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x180041f20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetUserObjectInformationW
mov rcx, rsi
mov qword [0x180041f28], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x180041f38], rax
test rax, rax
je 0x18001cb12
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov qword [0x180041f30], rax
jmp 0x18001cb22
mov rax, qword [0x180041f30]
jmp 0x18001cb29
mov rax, qword [0x180041f30]
mov r11, qword [0x180041f38]
cmp rax, rdi
je 0x18001cb90
cmp r11, rdi
je 0x18001cb90
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x180041f38]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x18001cb90
test rax, rax
je 0x18001cb90
call rsi
test rax, rax
je 0x18001cb8a
lea rcx, [rsp + 0x30]
mov r9d, recv
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x18001cb8a
test byte [rsp + 0x40], 1
jne 0x18001cb90
bts ebp, 0x15
jmp 0x18001cbd0
mov rcx, qword [0x180041f20]
cmp rcx, rdi
je 0x18001cbd0
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x18001cbd0
call rax
mov rbx, rax
test rax, rax
je 0x18001cbd0
mov rcx, qword [0x180041f28]
cmp rcx, rdi
je 0x18001cbd0
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x18001cbd0
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x180041f18]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x18001cbf2
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x18001cbf4
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180011250
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
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.00409ae0
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.00409b80
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.00402b10
mov rcx, rbp
call fcn.0040b7d0
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.00402c90
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.00402c90
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.00402b10
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 rsi, rcx
mov rcx, qword [rcx]
mov rbp, rdx
test rcx, rcx
je 0x401a40
mov edx, dword [rbp + 4]
xor r8d, r8d
add edx, dword [rsi + 8]
call fcn.0040e920
test eax, eax
js 0x401a54
mov ebx, dword [rbp + 0xc]
mov rcx, rbx
call sub.msvcrt.dll_malloc
test rax, rax
mov r12, rax
je 0x401a73
cmp byte [rbp + 0x10], 1
je 0x401a10
test rbx, rbx
mov r13, rax
mov r14d, 0x2000
jne 0x4019b8
mov rcx, qword [rsi]
test rcx, rcx
je 0x401999
call sub.msvcrt.dll_fclose
mov qword [rsi], 0
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
add r13, rdi
sub rbx, rdi
je 0x401985
cmp rbx, 0x2000
mov rdi, r14
mov r9, qword [rsi]
mov rcx, r13
cmovbe rdi, rbx
mov r8d, 1
mov rdx, rdi
call sub.msvcrt.dll_fread
test rax, rax
jne 0x4019b0
lea r8, [rbp + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
lea rcx, str.fread
call fcn.00402c90
mov rcx, r12
xor r12d, r12d
call sub.msvcrt.dll_free
mov rcx, qword [rsi]
test rcx, rcx
jne 0x40198d
jmp 0x401999
xor r8d, r8d
mov r9, rax
mov rdx, rbp
mov rcx, rsi
call fcn.004015e0
test eax, eax
jne 0x4019f6
mov rcx, qword [rsi]
test rcx, rcx
jne 0x40198d
jmp 0x401999
mov rcx, rsi
call fcn.004015b0
test eax, eax
jne 0x401a92
mov rcx, qword [rsi]
jmp 0x401940
lea r8, [rbp + 0x12]
xor r12d, r12d
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
lea rcx, str.fseek
call fcn.00402c90
jmp 0x401999
lea r8, [rbp + 0x12]
mov r9d, ebx
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
lea rcx, str.malloc
call fcn.00402c90
jmp 0x401985
lea rdx, [rbp + 0x12]
xor r12d, r12d
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
call fcn.00402b10
jmp 0x401999
Function at 0x401ab0
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.00407400
cmp eax, 0xffffffff
mov edi, eax
je 0x401bf1
lea r12, [rsi + 0x12]
lea rcx, [rbx + 0x3078]
mov rdx, r12
call fcn.00407640
test rax, rax
mov rbp, rax
je 0x401c7d
mov rcx, qword [rbx]
test rcx, rcx
je 0x401c10
mov edx, dword [rsi + 4]
xor r8d, r8d
add edx, dword [rbx + 8]
call fcn.0040e920
test eax, eax
js 0x401c44
cmp byte [rsi + 0x10], 1
je 0x401bc2
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov r13, rax
je 0x401c9d
mov esi, dword [rsi + 0xc]
mov r14d, 0x2000
test rsi, rsi
jne 0x401b76
jmp 0x401c02
mov r9, rbp
mov r8d, 1
mov rdx, rdi
mov rcx, r13
call sub.msvcrt.dll_fwrite
test rax, rax
je 0x401c24
sub rsi, rdi
je 0x401c02
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 0x401b50
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.00402c90
mov rcx, r13
call sub.msvcrt.dll_free
jmp 0x401bd5
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 0x401be9
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 0x401bb8
mov rcx, rbx
call fcn.004015b0
test eax, eax
jne 0x401c64
mov rcx, qword [rbx]
jmp 0x401aff
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.00402c90
jmp 0x401bb8
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.00402c90
jmp 0x401bd5
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov rdx, r12
mov edi, 0xffffffff
call fcn.00402b10
jmp 0x401bd5
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.00402c90
jmp 0x401bf1
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.00402c90
jmp 0x401bd5
Function at 0x401cc0
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 0x401e51
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.00407db0
test rax, rax
mov rsi, rax
je 0x401e78
mov rcx, qword [rbx]
xor r8d, r8d
mov edx, eax
call fcn.0040e920
test eax, eax
js 0x401e65
mov r9, qword [rbx]
lea rcx, [rbx + 0x20]
mov r8d, 1
mov edx, 0x58
call sub.msvcrt.dll_fread
test rax, rax
je 0x401e80
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.0040e920
movsxd rsi, dword [rbx + 0x30]
mov rcx, rsi
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rbx + 0x10], rax
je 0x401ec7
mov r9, qword [rbx]
mov r8d, 1
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_fread
test rax, rax
je 0x401e9a
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 0x401eb4
mov rax, qword [rbx + 0x10]
lea rdi, str.Cannot_read_Table_of_Contents._n
mov r8, qword [rbx + 0x18]
nop
cmp rax, r8
jae 0x401e33
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 0x401df0
mov rcx, rdi
call fcn.00402b10
mov rax, qword [rbx + 0x18]
mov r8, rax
cmp rax, r8
jb 0x401df5
mov rcx, qword [rbx]
test rcx, rcx
je 0x401e47
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 0x401e78
mov rcx, qword [rbx]
jmp 0x401cd6
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.00402c90
mov esi, 0xffffffff
jmp 0x401e47
lea rdx, str.Failed_to_read_cookie__n
mov esi, 0xffffffff
lea rcx, str.fread
call fcn.00402c90
jmp 0x401e47
lea rdx, str.Could_not_read_full_TOC__n
mov esi, 0xffffffff
lea rcx, str.fread
call fcn.00402c90
jmp 0x401e47
lea rcx, str.Error_on_file._n
mov esi, 0xffffffff
call fcn.00402b10
jmp 0x401e47
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
mov esi, 0xffffffff
lea rcx, str.malloc
call fcn.00402c90
jmp 0x401e47
Function at 0x405c30
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 0x405c52
jmp 0x405c65
call fcn.004018e0
cmp qword [rbx + 0x18], rax
mov rdx, rax
jbe 0x405c65
cmp byte [rdx + 0x11], 0x6c
mov rcx, rbx
jne 0x405c44
add rsp, 0x20
pop rbx
jmp fcn.00401920
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x406ff0
Capabilities:
Query environment variable

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

Function at 0x4070d0
Capabilities:
Set environment variable

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

Disassembly:
push rbp
mov eax, 0x4028
push rdi
push rsi
push rbx
call fcn.0040dd10
sub rsp, rax
xor r8d, r8d
mov rdx, rcx
xor ecx, ecx
call fcn.00408270
test rax, rax
mov rsi, rax
je 0x407240
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 0x407221
mov rcx, rbx
call fcn.004086b0
test eax, eax
jne 0x407210
mov r8d, 0x1000
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__wfullpath]
mov rsi, rax
test rsi, rsi
je 0x40724e
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 0x4071f9
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 0x4071c4
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 0x407187
lea rcx, str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
xor esi, esi
call fcn.00402b10
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.00402b10
jmp 0x407200
lea rcx, str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00402b10
jmp 0x407200