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

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140008010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000251d
xor eax, eax
jmp 0x140002689
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002557
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002557
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140002689
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000267c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14000259a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1400025c5
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002681
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002634
sub eax, 1
je 0x140002634
cmp eax, 2
jne 0x14000267c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002681
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002662
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x14000267c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002681
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400035a0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140002a30
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140008010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140002b03
cmp byte [rcx + 0x71], 0
je 0x140002b03
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140002aff
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002ac4
sub eax, 1
je 0x140002ac8
cmp eax, 2
jne 0x140002aff
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400035a0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140002af6
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140002aff
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140002aac
xor al, al
jmp 0x140002aac
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400035a0
add rsp, 0x60
pop rbx
ret

Function at 0x140003f34
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140003f7e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140003f7e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003f7e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140003f7e
cmp dword [rcx + 0x84], 0xe
jbe 0x140003f7e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140003f80
xor al, al
add rsp, 0x28
ret
Function at 0x140001e90
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov eax, dword [0x140005004]
lea edx, [rax - 1]
imul edx, eax
test dl, 1
sete al
cmp dword [0x140005008], 0xa
setl dl
or dl, al
mov eax, 0xccf5b036
mov r8d, 0x8a2427f5
cmove eax, r8d
mov edx, 0xe351b6f6
cmove edx, r8d
mov r8d, 0x62ec5a2
jmp 0x140001ee0
mov r8d, 0xe4dd325b
nop dword [rax + rax]
cmp r8d, 0xe4dd325a
jg 0x140001f10
cmp r8d, 0x8a2427f5
je 0x140001f2d
cmp r8d, 0xccf5b036
je 0x140001f35
cmp r8d, 0xe351b6f6
jne 0x140001ee0
mov r8d, eax
jmp 0x140001ee0
cmp r8d, 0xe4dd325b
je 0x140001f3d
cmp r8d, 0x62ec5a2
je 0x140001ed2
cmp r8d, 0x2c79190f
jne 0x140001ee0
jmp 0x140001f42
mov r8d, 0xe351b6f6
jmp 0x140001ee0
mov r8d, 0x2c79190f
jmp 0x140001ee0
mov r8d, edx
jmp 0x140001ee0
mov dword [rsp + 0x24], ecx
mov ecx, dword [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x140001a40
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rax, qword [0x14003e018]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov rbx, rcx
lea rdx, [0x14002b834]
add rcx, 0x70
mov esi, 0xffffffff
call fcn.140003fc0
mov rdi, rax
test rax, rax
je 0x140001c29
mov rax, qword [0x14002da30]
lea r8d, [rsi + 9]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x20]
shr rax, 0x18
mov rcx, rdi
add al, 0xc
mov qword [rsp + 0x48], rbp
mov byte [rsp + 0x23], al
call fcn.1400082d0
mov rbp, rax
test rax, rax
je 0x140001c1c
xor r8d, r8d
mov rdx, rax
mov rcx, rdi
call fcn.140010884
test eax, eax
jns 0x140001ae4
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.1400027e0
jmp 0x140001c1c
mov edx, 0x58
lea rcx, [rbx + 0x18]
mov r9, rdi
lea r8d, [rdx - 0x57]
call fcn.14001054c
cmp rax, 1
jae 0x140001b17
lea rdx, str.Failed_to_read_cookie__n
lea rcx, str.fread
call fcn.1400027e0
jmp 0x140001c1c
mov ecx, dword [rbx + 0x20]
xor r8d, r8d
mov eax, dword [rbx + 0x24]
bswap eax
mov dword [rbx + 0x24], eax
mov eax, dword [rbx + 0x28]
bswap eax
mov dword [rbx + 0x28], eax
mov eax, dword [rbx + 0x2c]
bswap ecx
mov ecx, ecx
sub rbp, rcx
mov dword [rbx + 0x20], ecx
bswap eax
mov dword [rbx + 0x2c], eax
add rbp, 0x58
mov qword [rbx], rbp
mov rcx, rdi
mov dword [rbx + 0x5074], 0
mov dword [0x14003ec94], eax
mov edx, dword [rbx + 0x24]
add rdx, qword [rbx]
call fcn.140010884
movsxd rcx, dword [rbx + 0x28]
call fcn.140015000
mov qword [rbx + 8], rax
test rax, rax
jne 0x140001b8e
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
lea rcx, str.malloc
call fcn.1400027e0
jmp 0x140001c1c
movsxd rdx, dword [rbx + 0x28]
mov r9, rdi
mov r8d, 1
mov rcx, rax
call fcn.14001054c
cmp rax, 1
jae 0x140001bbe
lea rdx, str.Could_not_read_full_TOC__n
lea rcx, str.fread
call fcn.1400027e0
jmp 0x140001c1c
movsxd rax, dword [rbx + 0x28]
mov rcx, rdi
add rax, qword [rbx + 8]
mov qword [rbx + 0x10], rax
call fcn.1400102c0
test eax, eax
je 0x140001be4
lea rcx, str.Error_on_file._n
call fcn.140002a80
jmp 0x140001c1c
mov rax, qword [rbx + 8]
cmp rax, qword [rbx + 0x10]
jae 0x140001c1a
nop
mov ecx, dword [rax + 4]
mov edx, dword [rax]
bswap ecx
mov dword [rax + 4], ecx
mov ecx, dword [rax + 8]
bswap ecx
mov dword [rax + 8], ecx
mov ecx, dword [rax + 0xc]
bswap ecx
mov dword [rax + 0xc], ecx
bswap edx
mov dword [rax], edx
movsxd rcx, edx
add rax, rcx
cmp rax, qword [rbx + 0x10]
jb 0x140001bf0
xor esi, esi
mov rcx, rdi
call fcn.1400101fc
mov rbp, qword [rsp + 0x48]
mov eax, esi
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14000bd30
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret

Function at 0x140005200
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x20
lea rdx, str.Py_DecRef
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14003ec98], rax
test rax, rax
jne 0x140005240
lea rdx, str.Failed_to_get_address_for_Py_DecRef_n
lea rdx, str.Py_DecodeLocale
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
Function at 0x140006f10
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rbx, rcx
lea rdx, str.Tcl_Init

Function at 0x140007440
Capabilities:
Create directory
Query environment variable

Disassembly:
push rdi
mov eax, 0x4030
call fcn.14000bcd0
sub rsp, rax
mov rax, qword [0x14003e018]
xor rax, rsp
mov qword [rsp + 0x4020], rax
mov rdx, rcx
xor r8d, r8d
xor ecx, ecx
call fcn.140008b00
mov rdi, rax
test rax, rax
jne 0x140007489
lea rcx, str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.140002a80
xor eax, eax
jmp 0x140007598
mov r8d, 0x1000
mov qword [rsp + 0x4048], rbx
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rdi
mov ebx, eax
call fcn.140014fec
test ebx, ebx
jne 0x1400074c6
lea rcx, str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.140002a80
xor eax, eax
jmp 0x140007590
lea rcx, [rsp + 0x20]
call fcn.140008870
test eax, eax
je 0x1400074e0
lea rcx, [rsp + 0x20]
call fcn.140017914
jmp 0x1400074f2
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
xor ecx, ecx
call fcn.140016298
mov rbx, rax
test rax, rax
jne 0x14000750d
lea rcx, str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.140002a80
xor eax, eax
jmp 0x140007590
xor edx, edx
lea rcx, [rsp + 0x2020]
mov r8d, 0x2000
call fcn.14000d160
mov edx, 0x5c
mov rcx, rbx
call fcn.14000d6a4
mov rdi, rax
test rax, rax
je 0x140007582
nop word [rax + rax]
mov r8, rdi
lea rcx, [rsp + 0x2020]
sub r8, rbx
mov rdx, rbx
sar r8, 1
inc r8
call fcn.140017998
xor edx, edx
lea rcx, [rsp + 0x2020]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, 0x5c
lea rcx, [rdi + 2]
call fcn.14000d6a4
mov rdi, rax
test rax, rax
jne 0x140007540
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rax, rbx
mov rbx, qword [rsp + 0x4048]
mov rcx, qword [rsp + 0x4020]
xor rcx, rsp
call fcn.14000bd30
add rsp, 0x4030
pop rdi
ret
Function at 0x1400080a0
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
mov eax, 0x2110
call fcn.14000bcd0
sub rsp, rax
mov rax, qword [0x14003e018]
xor rax, rsp
mov qword [rsp + 0x2100], rax
mov rdx, rcx
xor edi, edi
lea rcx, [rsp + 0x100]
mov dword [rsp + 0x50], edi
mov r8d, 0x1000
call fcn.140008b00
mov ebx, 1
lea rcx, [0x140007420]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
lea rcx, [rsp + 0x90]
mov dword [rsp + 0x58], 0x18
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0x68], ebx
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
xorps xmm0, xmm0
mov qword [rsp + 0x98], rdi
xor ecx, ecx
movdqa xmmword [rsp + 0xa0], xmm0
mov dword [rsp + 0xcc], 0x101
mov word [rsp + 0xd0], bx
call fcn.1400151c0
mov rcx, rax
call fcn.14001a984
mov ecx, eax
call fcn.1400185a0
cmp rax, 0xffffffffffffffff
mov ecx, ebx
cmove rax, rdi
mov qword [rsp + 0xe0], rax
call fcn.1400151c0
mov rcx, rax
call fcn.14001a984
mov ecx, eax
call fcn.1400185a0
cmp rax, 0xffffffffffffffff
lea ecx, [rdi + 2]
cmove rax, rdi
mov qword [rsp + 0xe8], rax
call fcn.1400151c0
mov rcx, rax
call fcn.14001a984
mov ecx, eax
call fcn.1400185a0
cmp rax, 0xffffffffffffffff
cmove rax, rdi
mov qword [rsp + 0xf0], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor r9d, r9d
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rsp + 0x100]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140008220
mov rcx, qword [rsp + 0x70]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x70]
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [rsp + 0x50]
jmp 0x140008238
lea rdx, str.Error_creating_child_process__n
lea rcx, str.CreateProcessW
call fcn.140002930
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x2100]
xor rcx, rsp
call fcn.14000bd30
mov rbx, qword [rsp + 0x2128]
add rsp, 0x2110
pop rdi
ret
Function at 0x1400082d0
Capabilities:
Read file on windows

Disassembly:
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov r12, rcx
mov rsi, r8
mov ecx, 0x2000
mov r14, rdx
xor r13d, r13d
call fcn.140015000
mov r15, rax
test rax, rax
je 0x1400083e3
xor edx, edx
lea r8d, [r13 + 2]
mov rcx, r12
call fcn.140010884
test eax, eax
js 0x1400083e3
mov rcx, r12
mov qword [rsp + 0x50], rbx
call fcn.140018fe0
mov rbx, rax
cmp rax, rsi
jb 0x1400083de
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rdi
nop dword [rax]
cmp rbx, 0x2000
lea rbp, [rbx - 0x2000]
cmovb rbp, r13
sub rbx, rbp
cmp rbx, rsi
jb 0x1400083d4
xor r8d, r8d
mov rdx, rbp
mov rcx, r12
call fcn.140010884
test eax, eax
js 0x1400083d4
mov r9, r12
mov r8, rbx
mov edx, 1
mov rcx, r15
call fcn.14001054c
cmp rax, rbx
jne 0x1400083d4
sub rbx, rsi
add rbx, 1
je 0x1400083bb
lea rdi, [r15 - 1]
add rdi, rbx
nop dword [rax]
nop dword [rax + rax]
mov r8, rsi
mov rdx, r14
mov rcx, rdi
call fcn.14000d730
test eax, eax
je 0x1400083cd
dec rdi
sub rbx, 1
jne 0x1400083a0
lea rbx, [rsi - 1]
add rbx, rbp
test rbp, rbp
jne 0x140008340
jmp 0x1400083d4
lea r13, [rbp - 1]
add r13, rbx
mov rbp, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
mov rcx, r15
call fcn.140014fec
mov rax, r13
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rsi
ret

Function at 0x140008970
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
mov eax, 0x2070
call fcn.14000bcd0
sub rsp, rax
mov rax, qword [0x14003e018]
xor rax, rsp
mov qword [rsp + 0x2060], rax
xor ebx, ebx
mov qword [rsp + 0x38], 0xffffffffffffffff
mov qword [rsp + 0x40], rbx
mov rdi, rcx
mov dword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x38]
lea edx, [rbx + 8]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140008a41
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [rbx + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400089f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140008a41
mov edx, dword [rsp + 0x30]
mov ecx, 1
call fcn.140014fe4
mov rbx, rax
test rax, rax
je 0x140008a41
mov r9d, dword [rsp + 0x30]
lea rax, [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
mov r8, rbx
mov edx, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140008a41
mov rcx, qword [rbx]
lea rdx, [rsp + 0x40]
call fcn.14000bc38
mov rcx, rbx
call fcn.140014fec
mov rcx, qword [rsp + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x140008a5a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x40]
lea r9, str.S_1_3_4
test rbx, rbx
lea r8, str.D:_A__FA____s_
mov edx, 0x1000
lea rcx, [rsp + 0x60]
cmovne r9, rbx
call fcn.140008670
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor r9d, r9d
mov dword [rsp + 0x48], 0x18
lea r8, [rsp + 0x50]
mov dword [rsp + 0x58], 0
lea rcx, [rsp + 0x60]
lea edx, [r9 + 1]
call fcn.14000bc3e
test eax, eax
je 0x140008ace
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, 0xffffffff
Function at 0x1400223cc
Capabilities:
Enumerate files on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rax, qword [0x14003e018]
xor rax, rsp
mov qword [rbp + 0x1b8], rax
xor r12d, r12d
mov qword [rsp + 0x50], rdx
mov r15, rcx
test rdx, rdx
jne 0x140021eac
call fcn.140015394
lea ebx, [r12 + 0x16]
mov dword [rax], ebx
call fcn.14001ae14
mov eax, ebx
jmp 0x140022204
xorps xmm0, xmm0
mov qword [rdx], r12
mov rax, qword [rcx]
movdqu xmmword [rsp + 0x30], xmm0
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x30]
mov qword [rsp + 0x40], r12
jmp 0x140021e54

Function at 0x140022f0c
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 0x140022f3c
xor eax, eax
jmp 0x140022fff
mov rbp, rbx
cmp word [rax], si
je 0x140022f61
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140022f48
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140022f44
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.140020438
movsxd r14, eax
test eax, eax
jne 0x140022f9f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140022f35
mov rcx, r14
call fcn.14001db2c
mov rdi, rax
test rax, rax
jne 0x140022fb8
xor ecx, ecx
call fcn.14001ae7c
jmp 0x140022f94
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.140020438
test eax, eax
jne 0x140022fe9
mov rcx, rdi
call fcn.14001ae7c
jmp 0x140022ff3
xor ecx, ecx
call fcn.14001ae7c
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 0x14002301c
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]
Function at 0x406262
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
jmp 0x40626a
push rbx
sub rsp, 0x280
mov rax, qword gs:[0x60]
lea rdx, [rsp + 0x60]
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx + 0x10]
mov rbx, qword [rax + 0x30]
mov rcx, rbx
call fcn.0040622e
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x20]
mov eax, dword [rsp + 0xa8]
add rax, rbx
call rax
add rsp, 0x280
pop rbx
ret

Function at 0x4080c0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbp, rsp
mov rbx, rcx
mov rsi, rdx
cmp byte [0x0076d0a8], 0
je 0x408178
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle
mov rdi, rax
mov rcx, rsi
call fcn.00410450
mov rcx, rdi
mov rdx, rsi
mov r8d, eax
lea r9, [rbp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle
mov rsi, rax
mov rcx, qword [0x007250d8]
call fcn.00410450
mov rcx, rsi
mov rdx, qword [0x007250d8]
mov r8d, eax
lea r9, [rbp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle
mov rsi, rax
mov rcx, rbx
call fcn.00410450
mov rcx, rsi
mov rdx, rbx
mov r8d, eax
lea r9, [rbp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
jmp 0x40818b
xor ecx, ecx
mov rdx, rbx
mov r8, rsi
mov r9d, 0x2010
call sub.user32.dll_MessageBoxA
lea rsp, [rbp + 0x48]
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x409470
Capabilities:
Get common file path
Set current directory

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x440
mov rbp, rsp
mov ebx, ecx
mov rsi, rdx
test bl, bl
je 0x4094c1
movzx ax, bl
add ax, 0x40
mov word [rbp + 0x438], ax
mov word [rbp + 0x43a], 0x3a
mov word [rbp + 0x43c], 0
mov ecx, 0x105
lea rdx, [rbp + 0x24]
call sub.kernel32.dll_GetCurrentDirectoryW
lea rcx, [rbp + 0x438]
call sub.kernel32.dll_SetCurrentDirectoryW
mov ecx, 0x105
lea rdx, [rbp + 0x22e]
call sub.kernel32.dll_GetCurrentDirectoryW
test bl, bl
je 0x4094df
lea rcx, [rbp + 0x24]
call sub.kernel32.dll_SetCurrentDirectoryW
mov rcx, rsi
lea rdx, [rbp + 0x22e]
mov r8d, 0x105
call fcn.00410f90
lea rsp, [rbp + 0x440]
pop rbx
pop rsi
pop rbp
ret
Function at 0x440310
Capabilities:
Get file version info

Disassembly:
push rbp
sub rsp, 0x60
mov rbp, rsp
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x28], rbp
mov qword [rbp + 0x70], rcx
nop
mov dword [rbp + 0x54], 0xffffffff
lea rcx, [rbp + 0x48]
mov rdx, qword [rbp + 0x70]
call fcn.00410330
lea rcx, [rbp + 0x48]
call fcn.00410570
mov rcx, qword [rbp + 0x48]
call fcn.00410ed0
mov rcx, rax
lea rdx, [rbp + 0x40]
call sub.version.dll_GetFileVersionInfoSizeW
mov dword [rbp + 0x44], eax
cmp dword [rbp + 0x44], 0
je 0x4403c1
mov ecx, dword [rbp + 0x44]
call fcn.004090e0
mov qword [rbp + 0x58], rax
nop
mov rcx, qword [rbp + 0x48]
call fcn.00410ed0
mov rcx, rax
mov edx, dword [rbp + 0x40]
mov r8d, dword [rbp + 0x44]
mov r9, qword [rbp + 0x58]
call sub.version.dll_GetFileVersionInfoW
test eax, eax
je 0x4403b7
mov rcx, qword [rbp + 0x58]
lea rdx, [0x00440418]
lea r8, [rbp + 0x38]
lea r9, [rbp + 0x34]
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x4403b7
mov rax, qword [rbp + 0x38]
mov eax, dword [rax + 8]
mov dword [rbp + 0x54], eax
nop
mov rcx, qword [rbp + 0x58]
call fcn.00409110
nop
lea rcx, [rbp + 0x48]
call fcn.0040fc80
mov eax, dword [rbp + 0x54]
lea rsp, [rbp + 0x60]
pop rbp
ret

Function at 0x440420
Capabilities:
Get file version info

Disassembly:
push rbp
sub rsp, 0x70
mov rbp, rsp
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x28], rbp
mov qword [rbp + 0x80], rcx
mov qword [rbp + 0x88], rdx
mov qword [rbp + 0x90], r8
mov qword [rbp + 0x98], r9
nop
mov byte [rbp + 0x67], 0
lea rcx, [rbp + 0x58]
mov rdx, qword [rbp + 0x80]
call fcn.00410330
lea rcx, [rbp + 0x58]
call fcn.00410570
mov rcx, qword [rbp + 0x58]
call fcn.00410ed0
mov rcx, rax
lea rdx, [rbp + 0x50]
call sub.version.dll_GetFileVersionInfoSizeW
mov dword [rbp + 0x54], eax
cmp dword [rbp + 0x54], 0
je 0x440530
mov ecx, dword [rbp + 0x54]
call fcn.004090e0
mov qword [rbp + 0x68], rax
nop
mov rcx, qword [rbp + 0x58]
call fcn.00410ed0
mov rcx, rax
mov edx, dword [rbp + 0x50]
mov r8d, dword [rbp + 0x54]
mov r9, qword [rbp + 0x68]
call sub.version.dll_GetFileVersionInfoW
test eax, eax
je 0x440526
mov rcx, qword [rbp + 0x68]
lea rdx, [0x00440588]
lea r8, [rbp + 0x48]
lea r9, [rbp + 0x44]
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x440526
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x10]
mov dword [rbp + 0x40], eax
mov rax, qword [rbp + 0x88]
mov ecx, dword [rbp + 0x40]
shr ecx, 0x10
movzx ecx, cx
mov dword [rax], ecx
mov rax, qword [rbp + 0x90]
mov rcx, qword [rbp + 0x48]
movzx ecx, word [rcx + 0x10]
mov dword [rax], ecx
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x14]
mov dword [rbp + 0x3c], eax
mov rax, qword [rbp + 0x98]
mov ecx, dword [rbp + 0x3c]
shr ecx, 0x10
movzx ecx, cx
mov dword [rax], ecx
mov byte [rbp + 0x67], 1
nop
mov rcx, qword [rbp + 0x68]
call fcn.00409110
nop
lea rcx, [rbp + 0x58]
call fcn.0040fc80
movzx rax, byte [rbp + 0x67]
lea rsp, [rbp + 0x70]
pop rbp
ret