Function at 0x4039d0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get file size
Read file on windows

Disassembly:
sub esp, 0x204
lea eax, [esp + 0x100]
push ebx
push ebp
push esi
push edi
push 0x104
mov ebx, ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str.Temp_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x110]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x400
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 + 0x114]
and ecx, 3
push 0x40
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x220]
or ecx, 0xffffffff
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
lea eax, [esp + 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403bf8
push 0
push 0x80
push 3
push 0
push 0
lea ecx, [esp + 0x124]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push eax
mov dword [ebx + 0x128], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebx + 0x130], eax
call sub.MSVCRT.dll_malloc
mov ecx, dword [ebx + 0x130]
add esp, 4
lea edx, [ebx + 0x134]
mov dword [ebx + 0x12c], eax
push 0
push edx
mov edx, dword [ebx + 0x128]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebx + 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x130]
mov edx, dword [ebx + 0x12c]
push 0x12bb00
push ecx
push edx
call fcn.004039a0
mov eax, dword [ebx + 0x12c]
push eax
call fcn.004031c0
mov edx, eax
add esp, 0x10
test edx, edx
mov dword [0x41a184], edx
je 0x403bf8
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.Version
push edx
stosb byte es:[edi], al
call fcn.00403640
add esp, 8
test eax, eax
je 0x403b69
call eax
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x41a184]
push ecx
call fcn.004036d0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 4
lea edx, [esp + 0x10]
mov byte [ebp], 0x92
push edx
call ebx
mov ecx, eax
lea esi, [esp + 0x10]
inc ecx
lea edi, [ebp + 1]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
call ebx
mov esi, dword [esp + 0x218]
mov ebx, eax
push esi
add ebx, 2
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
lea edi, [ebx + ebp]
inc ecx
mov eax, dword [esp + 0x218]
mov edx, ecx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push 0x42
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret 4
mov ebx, dword [esp + 0x218]
mov byte [ebp], 0x93
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
mov esi, ebx
inc ecx
lea edi, [ebp + 1]
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 2
push 0x42
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret 4