Function at 0x40e8d0
Capabilities:
Get common file path
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.0040ace0
mov eax, dword [0x41a004]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x78
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.004010f0
add esp, 0xc
push 0x800
lea edx, [ebp - 0x1018]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.KERNEL32.DLL
lea eax, [ebp - 0x1018]
push eax
call fcn.0040116a
add esp, 8
lea ecx, [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40ebb9
push str.VirtualProtectEx
mov edx, dword [ebp + 8]
push edx
call fcn.004011c0
add esp, 8
push 0x41732c
mov eax, dword [ebp + 8]
add eax, 0x78
push eax
call fcn.004011c0
add esp, 8
push 0x41733c
mov ecx, dword [ebp + 8]
add ecx, 0xf0
push ecx
call fcn.004011c0
add esp, 8
push str.WriteProcessMemory
mov edx, dword [ebp + 8]
add edx, 0x168
push edx
call fcn.004011c0
add esp, 8
push 0x417364
mov eax, dword [ebp + 8]
add eax, 0x1e0
push eax
call fcn.004011c0
add esp, 8
push str.VirtualAllocEx
mov ecx, dword [ebp + 8]
add ecx, 0x258
push ecx
call fcn.004011c0
add esp, 8
push str.CreateThread
mov edx, dword [ebp + 8]
add edx, 0x2d0
push edx
call fcn.004011c0
add esp, 8
push str.CreateRemoteThread
mov eax, dword [ebp + 8]
add eax, 0x348
push eax
call fcn.004011c0
add esp, 8
push str.VirtualQuery
mov ecx, dword [ebp + 8]
add ecx, 0x3c0
push ecx
call fcn.004011c0
add esp, 8
push str.VirtualQueryEx
mov edx, dword [ebp + 8]
add edx, 0x438
push edx
call fcn.004011c0
add esp, 8
push 0x4173c8
mov eax, dword [ebp + 8]
add eax, 0x4b0
push eax
call fcn.004011c0
add esp, 8
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea ecx, [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1020], eax
cmp dword [ebp - 0x1020], 0xffffffff
je 0x40ebaf
push 0
mov edx, dword [ebp - 0x1020]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
push 0
mov eax, dword [ebp - 8]
push eax
push 0
push 0x1000002
push 0
mov ecx, dword [ebp - 0x1020]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x101c], eax
cmp dword [ebp - 0x101c], 0
je 0x40eba2
mov edx, dword [ebp - 8]
push edx
push 0
push 0
push 4
mov eax, dword [ebp - 0x101c]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40eb95
mov dword [ebp - 0x1024], 0
jmp 0x40eadc
mov ecx, dword [ebp - 0x1024]
add ecx, 1
mov dword [ebp - 0x1024], ecx
mov edx, dword [ebp - 0x1024]
cmp edx, dword [ebp + 0xc]
jge 0x40eb8b
mov eax, dword [ebp - 0x1024]
imul eax, eax, 0x78
add eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1024]
imul edx, edx, 0x78
mov ecx, dword [ebp + 8]
mov dword [ecx + edx + 0x74], eax
mov edx, dword [ebp - 0x1024]
imul edx, edx, 0x78
mov eax, dword [ebp + 8]
cmp dword [eax + edx + 0x74], 0
je 0x40eb86
mov ecx, dword [ebp - 0x1024]
imul ecx, ecx, 0x78
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x74]
sub eax, dword [ebp - 0xc]
add eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jb 0x40eb72
mov edx, dword [ebp - 4]
add edx, dword [ebp - 8]
cmp dword [ebp - 0x10], edx
jae 0x40eb72
push 0x10
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x1024]
imul ecx, ecx, 0x78
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x64]
push eax
call fcn.004012c0
add esp, 0xc
jmp 0x40eb86
mov ecx, dword [ebp - 0x1024]
imul ecx, ecx, 0x78
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x74], 0
jmp 0x40eacd
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x101c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1020]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004010d5
mov esp, ebp
pop ebp
ret