joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404680
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x1c
push esi
push edi
mov esi, ecx
mov ecx, dword [esi]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx edx, word [esp + 0x18]
movsx eax, word [esp + 0x1c]
sub eax, edx
lea ecx, [eax + 1]
movsx eax, word [esp + 0xc]
mov dword [esi + 0x18], eax
movsx eax, word [esp + 0xe]
sub eax, ecx
mov dword [esi + 0x14], ecx
mov cx, word [esp + 0x16]
xor edi, edi
cmp cx, di
mov dword [esi + 0x1c], eax
jne 0x4046c9
cmp edx, eax
je 0x4046fb
mov dx, word [esi + 0x1c]
sub word [esp + 0x1a], cx
xor eax, eax
mov ax, dx
add ax, word [esi + 0x14]
lea ecx, [esp + 0x16]
push ecx
mov word [esp + 0x1c], dx
mov edx, dword [esi]
push 1
push edx
mov word [esp + 0x22], di
dec eax
mov word [esp + 0x28], ax
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
mov eax, dword [esp + 0x16]
mov ecx, dword [esp + 0x1a]
push ebx
mov ebx, dword [esp + 0x30]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x14]
cmp eax, ebx
push ebp
mov dword [esi + 0x24], ecx
jbe 0x404723
mov ecx, dword [esi + 0x1c]
sub eax, ebx
add ecx, eax
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x14], ebx
movzx edx, word [esi + 0xa]
mov ecx, dword [esi + 0x14]
imul ecx, dword [esi + 0x18]
push edx
xor eax, eax
mov ax, word [esi + 8]
xor edx, edx
mov dx, word [esi + 0x1c]
push eax
mov eax, dword [esi]
push ecx
push edx
push edi
push eax
call fcn.00403a90
mov cx, word [esi + 0x1c]
add esp, 0x18
lea edx, [esp + 0x34]
push edx
xor edx, edx
mov dx, word [esi + 0x30]
mov word [esp + 0x3a], cx
mov ecx, dword [esi + 0x18]
mov word [esp + 0x38], di
mov eax, dword [esp + 0x38]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
mov edi, dword [esp + 0x30]
mov ecx, dword [esi + 0x14]
mov ebp, dword [esi + 0x1c]
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], ebx
mov dword [esp + 0x34], ecx
mov word [esp + 0x30], 0
mov ebx, dword [edi]
mov eax, dword [edi + 4]
mov dword [edi + 0xc], 0xffffffff
mov edx, dword [esi + 0x18]
push edx
push eax
mov ecx, ebx
push ecx
call fcn.004143d0
add esp, 0xc
lea edx, [esp + 0x10]
push edx
sub eax, ebx
mov word [esp + 0x36], bp
mov ecx, dword [esp + 0x34]
push ecx
sar eax, 1
push eax
mov dword [edi + 0xc], eax
mov edx, dword [esi]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
mov eax, dword [esp + 0x34]
add edi, 0x10
inc ebp
dec eax
mov dword [esp + 0x34], eax
jne 0x404791
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0x14]
pop ebp
pop ebx
je 0x4047fc
lea eax, [edi + 0xc]
lea ebx, [ebx]
mov dword [eax], 0xffffffff
add eax, 0x10
dec ecx
jne 0x4047f0
xor eax, eax
pop edi
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
pop esi
add esp, 0x1c
ret 8

Function at 0x404c20
Capabilities:
Manipulate console buffer

Disassembly:
mov ax, word [esp + 8]
mov cx, word [esp + 0xc]
mov word [esp + 8], ax
mov eax, dword [esp + 4]
mov word [esp + 0xa], cx
mov edx, dword [esp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov al, 1
ret
Function at 0x405130
Capabilities:
Create thread
Read file via mapping

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 8
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edx, dword [esp + 0x14]
push edx
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, dword [esp + 0x20]
push 0
mov ebx, eax
mov eax, dword [esi]
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ecx, dword [esi]
push ecx
push 0
push 0
mov ebp, eax
push 6
push ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [esi]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push 2
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
push 0
push ecx
push 0x4c9
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push eax
push esi
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
push eax
call esi
push ebp
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret

Function at 0x406470
Capabilities:
Get file size

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x48]
lea ecx, [esp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x406545
mov edx, dword [esp + 8]
or edx, dword [esp + 0xc]
mov bl, byte [esp + 0x14]
je 0x4064be
mov eax, dword [esi + 0x48]
xor ecx, ecx
test bl, bl
setne cl
push 0
lea ecx, [ecx + ecx + 2]
push ecx
push eax
lea ecx, [esi + 0x34]
call fcn.0040da10
test al, al
je 0x406545
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push edx
push eax
push 1
push 3
mov ecx, esi
call fcn.00406810
mov al, byte [esp + 0x18]
test al, al
je 0x40651b
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, eax
or edx, ecx
je 0x40651b
test ecx, ecx
ja 0x406545
jb 0x4064f4
cmp eax, 0xffffffff
ja 0x406545
push eax
push 0
push 0
lea ecx, [esi + 0x34]
call fcn.0040dab0
test eax, eax
mov dword [esi + 0x18], eax
je 0x406545
or byte [esi + 6], 4
mov dword [esi + 0x20], eax
mov eax, dword [esp + 8]
mov dword [esi + 0x24], eax
mov dword [esi + 0x1c], eax
jmp 0x406529
mov dword [esi + 0x1c], 0x40000
mov dword [esi + 0x24], 0
or byte [esi + 6], 2
xor eax, eax
test bl, bl
setne al
lea eax, [eax + eax + 4]
mov dword [esi + 0x38], eax
pop esi
mov al, 1
pop ebx
add esp, 8
ret 8
pop esi
xor al, al
pop ebx
add esp, 8
ret 8
Function at 0x407c30
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x453058
push 0x440f06
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
cmp word [ecx], 0x5a4d
jne 0x407cd9
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
jne 0x407cd9
mov edx, dword [eax + 0xd8]
lea edi, [edx + ecx]
mov esi, dword [ebp + 0xc]
cmp esi, edi
jb 0x407cd9
mov eax, dword [eax + 0xdc]
add eax, edx
add eax, ecx
cmp esi, eax
jae 0x407cd9
mov dword [ebp - 4], 0xffffffff
mov al, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x407d00
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ecx
mov eax, dword [0x571e80]
test eax, eax
je 0x407d11
mov eax, 0x10dd
pop ecx
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x571e80
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x407d30
mov eax, 0x10dd
pop ecx
ret
push esi
mov esi, dword [0x571e70]
test esi, esi
push edi
mov dword [0x571e90], 0
mov dword [0x571e8c], 0
mov dword [0x571e88], 0
je 0x407d7a
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [esp + 8]
push eax
push 0x40
push 0x10000
push esi
call edi
test eax, eax
je 0x407d85
mov esi, dword [esi + 4]
test esi, esi
jne 0x407d60
xor eax, eax
pop edi
mov dword [0x571e84], eax
pop esi
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
mov dword [0x571e84], eax
pop esi
pop ecx
ret
Function at 0x407da0
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x571e80], eax
je 0x407db6
mov eax, 0x10dd
pop ecx
ret
push ebx
push ebp
push esi
mov esi, dword [0x571e90]
xor ebp, ebp
cmp esi, ebp
push edi
je 0x407e1d
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
lea eax, [esp + 0x10]
push eax
movzx eax, byte [edx + 0x36]
push ecx
mov ecx, dword [esi + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebp
jne 0x407e0c
mov ebx, dword [esi + 0x10]
cmp ebx, ebp
je 0x407e0c
mov edx, ebx
and edx, 0xffff0000
xor eax, eax
mov ecx, 0x12
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [edx + 8]
mov dword [ebx + 0x40], eax
mov dword [edx + 8], ebx
mov dword [esi + 0x10], ebp
mov edi, dword [esi]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp edi, ebp
mov esi, edi
jne 0x407dc6
mov dword [0x571e90], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x571e70]
cmp esi, ebp
mov edi, eax
je 0x407e63
mov ebx, dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
nop
lea esp, [esp]
lea ecx, [esp + 0x10]
push ecx
push 0x20
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x10000
push esi
push edi
call ebx
mov esi, dword [esi + 4]
cmp esi, ebp
jne 0x407e40
mov esi, dword [0x571e8c]
cmp esi, ebp
je 0x407e8a
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edx, dword [esi + 4]
push edx
call ebx
mov edi, dword [esi]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp edi, ebp
mov esi, edi
jne 0x407e73
pop edi
pop esi
mov dword [0x571e8c], ebp
mov dword [0x571e80], ebp
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x408250
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x571e84]
test eax, eax
push esi
push edi
jne 0x4082c6
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 0xc]
cmp edi, eax
je 0x4082c4
push 8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
jne 0x408280
mov edi, 8
jmp 0x40829d
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x4082b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [0x571e84], edi
mov eax, edi
pop edi
mov dword [0x571e88], 0
pop esi
ret 4
mov dword [esi + 4], edi
mov eax, dword [0x571e8c]
mov dword [esi], eax
mov dword [0x571e8c], esi
xor eax, eax
pop edi
pop esi
ret 4
Function at 0x408af0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov eax, dword [esp + 4]
mov ecx, eax
sub esp, 0x1c
and ecx, 0xffff
je 0x408b08
sub eax, ecx
add eax, 0x10000
cmp eax, dword [esp + 0x24]
push ebx
push esi
push edi
mov esi, eax
jae 0x408baa
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea ecx, [ecx]
cmp esi, dword [0x45c6f0]
jb 0x408b38
cmp esi, dword [0x45c6f4]
ja 0x408b38
add esi, 0x8000000
jmp 0x408ba0
xor eax, eax
mov ecx, 7
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
push 0x1c
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x408baa
cmp dword [esp + 0x1c], 0x10000
mov eax, dword [esp + 0x18]
jne 0x408b87
cmp eax, 0x10000
jb 0x408b87
push 0x40
push 0x3000
push 0x10000
push esi
call ebx
test eax, eax
jne 0x408bac
add esi, 0x10000
jmp 0x408ba0
mov ecx, dword [esp + 0xc]
lea esi, [ecx + eax]
mov eax, esi
and eax, 0xffff
je 0x408ba0
mov edx, 0x10000
sub edx, eax
add esi, edx
cmp esi, dword [esp + 0x30]
jb 0x408b20
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x1c
ret

Function at 0x408bc0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x1c
push ebx
push ebp
push esi
lea esi, [eax - 0x10000]
mov eax, esi
and eax, 0xffff
push edi
je 0x408bdc
sub esi, eax
cmp esi, dword [esp + 0x30]
jbe 0x408c61
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebp, 0x10000
lea ecx, [ecx]
cmp esi, dword [0x45c6f0]
jb 0x408c08
cmp esi, dword [0x45c6f4]
ja 0x408c08
sub esi, 0x8000000
jmp 0x408c5b
xor eax, eax
mov ecx, 7
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
push 0x1c
lea ecx, [esp + 0x14]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x408c61
cmp dword [esp + 0x20], ebp
jne 0x408c46
cmp dword [esp + 0x1c], ebp
jb 0x408c46
push 0x40
push 0x3000
push ebp
push esi
call ebx
test eax, eax
jne 0x408c63
sub esi, ebp
jmp 0x408c5b
mov edx, dword [esp + 0x14]
lea esi, [edx - 0x10000]
mov eax, esi
and eax, 0xffff
je 0x408c5b
sub esi, eax
cmp esi, dword [esp + 0x30]
ja 0x408bf0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x408c70
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x571e80], eax
je 0x408c90
pop edi
pop esi
pop ebp
mov eax, 0x10dd
pop ebx
pop ecx
ret 8
mov eax, dword [0x571e84]
test eax, eax
jne 0x408e60
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jne 0x408cb2
pop edi
pop esi
pop ebp
mov eax, 0x57
pop ebx
pop ecx
ret 8
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x408cc7
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
pop ecx
ret 8
cmp dword [esi], 0
jne 0x408ce4
pop edi
mov dword [0x571e88], esi
pop esi
mov eax, 6
pop ebp
mov dword [0x571e84], eax
pop ebx
pop ecx
ret 8
push 0x18
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x408d00
mov esi, 8
jmp 0x408e3e
mov esi, dword [esi]
test esi, esi
jne 0x408d0a
xor ebp, ebp
jmp 0x408d63
cmp byte [esi], 0xff
jne 0x408d28
cmp byte [esi + 1], 0x25
jne 0x408d28
mov edi, dword [esi + 2]
push edi
push esi
call fcn.00407c30
add esp, 8
test al, al
je 0x408d28
mov esi, dword [edi]
cmp byte [esi], 0xeb
jne 0x408d61
movsx eax, byte [esi + 1]
lea esi, [esi + eax + 2]
mov al, byte [esi]
cmp al, 0xff
jne 0x408d56
cmp byte [esi + 1], 0x25
jne 0x408d56
mov edi, dword [esi + 2]
push edi
push esi
call fcn.00407c30
add esp, 8
test al, al
je 0x408d61
mov esi, dword [edi]
jmp 0x408d61
cmp al, 0xe9
jne 0x408d61
mov ecx, dword [esi + 1]
lea esi, [esi + ecx + 5]
mov ebp, esi
cmp byte [ebx], 0xff
mov edi, ebx
jne 0x408d83
cmp byte [ebx + 1], 0x25
jne 0x408d83
mov esi, dword [ebx + 2]
push esi
push ebx
call fcn.00407c30
add esp, 8
test al, al
je 0x408d83
mov edi, dword [esi]
cmp byte [edi], 0xeb
jne 0x408dbe
movsx edx, byte [edi + 1]
mov al, byte [edi + edx + 2]
cmp al, 0xff
lea edi, [edi + edx + 2]
jne 0x408db3
cmp byte [edi + 1], 0x25
jne 0x408db3
mov ebx, dword [edi + 2]
push ebx
push edi
call fcn.00407c30
add esp, 8
test al, al
je 0x408dbe
mov edi, dword [ebx]
jmp 0x408dbe
cmp al, 0xe9
jne 0x408dbe
mov eax, dword [edi + 1]
lea edi, [edi + eax + 5]
movzx eax, byte [ebp + 0x36]
mov ebx, dword [ebp + 0x40]
sub ebx, eax
test eax, eax
je 0x408e30
cmp eax, 0x1e
ja 0x408e30
cmp dword [ebp + 0x44], edi
jne 0x408e30
lea ecx, [esp + 0x10]
push ecx
push 0x40
push eax
push ebx
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x408dfa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x408e3e
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov dword [eax + 0x10], ebp
mov dword [eax + 0xc], ebx
mov dword [eax + 4], 1
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x10]
pop edi
mov dword [eax + 0x14], ecx
mov edx, dword [0x571e90]
pop esi
mov dword [eax], edx
pop ebp
mov dword [0x571e90], eax
xor eax, eax
pop ebx
pop ecx
ret 8
mov eax, dword [0x571e78]
test eax, eax
mov esi, 9
jne 0x408e44
mov dword [0x571e84], esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x408e55
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x18]
mov dword [0x571e88], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
Function at 0x409d50
Capabilities:
Get disk information

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x208
push esi
push 0x104
lea eax, [esp + 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
test eax, eax
je 0x409df8
mov esi, dword [esp + 0x214]
push 0
push 0x64
mov ecx, esi
call fcn.0040d3a0
test eax, eax
je 0x409df8
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push eax
push ecx
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x409dbd
mov al, byte [esp + 0x218]
test al, al
je 0x409db3
mov eax, dword [esi]
mov word [eax + 0x60], 0
mov eax, dword [esi]
pop esi
add esp, 0x208
ret
lea ecx, [esp + 4]
push 0
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea edx, [eax + eax + 2]
push edx
mov ecx, esi
call fcn.0040d3a0
test eax, eax
je 0x409df8
mov ecx, dword [esi]
lea eax, [esp + 4]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [esi]
add esp, 8
pop esi
add esp, 0x208
ret
xor eax, eax
pop esi
add esp, 0x208
ret

Function at 0x409ed0
Capabilities:
Get disk size

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44d50b
push eax
mov eax, dword [0x45c6e8]
mov dword fs:[0], esp
sub esp, 0x218
test eax, eax
je 0x409ef9
call fcn.00407620
push esi
push 0x571a54
push 0x208
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
call fcn.0040d460
mov edx, dword [esp + 0x22c]
push 0
lea ecx, [esp + 0xc]
push ecx
push edx
mov dword [esp + 0x230], 0
call fcn.00409d50
mov edx, dword [esp + 0x23c]
add esp, 0xc
push 0
push 0
lea ecx, [esp + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov esi, eax
mov eax, dword [esp + 4]
neg esi
sbb esi, esi
lea ecx, [esp + 8]
and esi, eax
mov dword [esp + 0x224], 0xffffffff
call fcn.0040d4b0
mov ecx, dword [esp + 0x21c]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x224
ret

Function at 0x409f90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x409faa
test al, 0x10
jne 0x409faa
mov eax, 1
ret
xor eax, eax
ret

Function at 0x40a190
Capabilities:
Create directory

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push ebp
call fcn.0040f4e0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [esp + 0x18]
add esp, 4
mov esi, eax
lea ecx, [ecx]
push 0x2f
push 0x5c
push esi
call fcn.004121b0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40a1cb
mov di, word [esi]
mov word [esi], 0
push 0
push ebp
call ebx
test eax, eax
jne 0x40a1e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40a1f8
test esi, esi
je 0x40a1f1
mov word [esi], di
add esi, 2
cmp word [esi], 0
jne 0x40a1b0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret
test esi, esi
je 0x40a1ff
mov word [esi], di
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret
Function at 0x40a490
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x44d568
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebp
push esi
push edi
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x30]
mov esi, dword [eax + 8]
push 0
push 0x8000000
push 3
push 7
test esi, esi
setne cl
push 1
mov byte [esp + 0x30], cl
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x40], 0
call fcn.00417760
test al, al
je 0x40a5d1
mov al, byte [esp + 0x1c]
test al, al
mov dword [esp + 0x30], 0
jne 0x40a538
mov eax, dword [esp + 0x14]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40a5d1
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x38]
xor eax, eax
cmp ecx, eax
mov eax, dword [esp + 0xc]
jb 0x40a534
ja 0x40a52a
cmp eax, ebp
jbe 0x40a534
mov dword [esp + 0x30], 1
jmp 0x40a53c
mov ebp, eax
jmp 0x40a53c
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x34]
mov edx, dword [esi + 4]
push 0
push 0
lea ecx, [eax + ebp]
push ecx
push esi
call dword [edx]
mov edi, eax
add esp, 0x10
test edi, edi
je 0x40a5d1
mov edx, dword [esp + 0x14]
push 0
push ebp
push edi
push edx
call fcn.00417620
add esp, 0x10
test al, al
je 0x40a5c5
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x40a586
mov eax, dword [esp + 0x14]
xor edx, edx
mov dword [esp + 0x14], edx
mov dword [ecx], eax
jmp 0x40a58a
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
test eax, eax
je 0x40a597
mov dword [eax], edi
mov dword [eax + 4], ebp
mov al, byte [esp + 0x1c]
test al, al
jne 0x40a5af
test edx, edx
je 0x40a5af
cmp edx, 0xffffffff
je 0x40a5af
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov eax, dword [esi + 4]
push 0
push esi
call dword [eax + 8]
add esp, 8
mov al, byte [esp + 0x1c]
test al, al
jne 0x40a5ed
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40a5ed
cmp eax, 0xffffffff
je 0x40a5ed
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x20]
pop edi
pop esi
or eax, 0xffffffff
pop ebp
mov dword fs:[0], ecx
add esp, 0x20
ret

Function at 0x40cb70
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 4]
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
push edi
push ebp
push 0
push 0
or eax, 0x8000
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x40cbfc
mov esi, dword [sym.imp.MSVCRT.dll_wcslen]
push ebp
call esi
mov ecx, dword [esp + 0x1c]
mov edi, eax
push ecx
lea ebx, [ebp + edi*2]
call esi
add esp, 8
cmp edi, 0x104
mov dword [esp + 0x1c], eax
jae 0x40cbfc
mov edx, 0x103
sub edx, edi
cmp edx, eax
jbe 0x40cbfc
mov esi, dword [esp + 0x18]
mov word [ebx], 0x5c
lea ecx, [eax + eax + 2]
mov eax, ecx
shr ecx, 2
add ebx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
call fcn.0040a190
add esp, 4
test al, al
je 0x40cbfc
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
lea eax, [ebx + ecx*2]
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40d9a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x44d6a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + 8]
push edi
mov dword [esp + 0x10], edi
call fcn.00441640
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esi + 0xc]
push ecx
push edx
push eax
add esi, 0x10
push esi
mov dword [esp + 0x30], 0
call fcn.00413be0
push edi
mov bl, al
call fcn.004416a0
mov ecx, dword [esp + 0x2c]
add esp, 0x1c
pop edi
pop esi
mov al, bl
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 0xc

Function at 0x40f710
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, dword [ebx + 4]
test esi, esi
push edi
je 0x40f729
mov eax, dword [ebx]
shr esi, 1
jmp 0x40f750
push ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
push 0
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea esi, [esi + eax + 1]
push 0
lea eax, [esi + esi]
push eax
mov ecx, ebx
call fcn.0040d3a0
mov edi, eax
test edi, edi
je 0x40f789
mov ecx, dword [esp + 0x1c]
push ecx
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x40f789
cmp eax, esi
jb 0x40f790
push 0
lea edx, [eax + eax]
push edx
mov ecx, ebx
mov esi, eax
call fcn.0040d3a0
mov edi, eax
test edi, edi
jne 0x40f756
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x40f79a
mov dword [ecx], eax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40fff0
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 0xc]
lea ecx, [eax + eax]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
mov edx, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x18]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410042
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x41002e
cmp eax, 2
jne 0x410042
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41003f
mov ecx, dword [esp + 0xc]
shr ecx, 1
dec ecx
mov dword [eax], ecx
mov al, 1
ret
xor al, al
ret