Function at 0x438910
Capabilities:
Get common file path
Get file size
Read file on windows
Read file via mapping

Disassembly:
sub esp, 0x12c
push ebx
mov ebx, dword [esp + 0x134]
push ebp
push esi
mov al, byte [ebx + 1]
push edi
cmp al, 0x3a
jne 0x43894e
cmp byte [ebx + 2], 0x5c
jne 0x43894e
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x4389b0
lea ecx, [esp + 0x38]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x457164
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x38]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0
push 0x80
push 3
push 0
and ecx, 3
push 3
lea eax, [esp + 0x4c]
push SysReAllocStringLen
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x438b46
lea ecx, [esp + 0x14]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x438b32
mov eax, dword [esp + 0x144]
test eax, eax
je 0x438aaf
lea edx, [esp + 0x24]
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
lea eax, [esp + 0x2c]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov edx, dword [esp + 0x14]
push 0
push edi
push edx
lea eax, [esp + 0x24]
push 2
lea ecx, [esp + 0x34]
push eax
push ebx
mov dword [esp + 0x30], 0xc
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
test esi, esi
je 0x438b32
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x438a94
push 0x10
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [eax + 0xc], edi
mov dword [eax + 4], esi
pop edi
mov dword [eax + 8], ebp
pop esi
mov dword [eax], ebx
pop ebp
pop ebx
add esp, 0x12c
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x12c
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
je 0x438b32
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x10]
push 0
push ecx
push edi
push ebp
push ebx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x438b2c
cmp dword [esp + 0x10], edi
jne 0x438b2c
push 0x10
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push ebx
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], ebp
mov dword [esi + 0xc], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x12c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x12c
ret