Function at 0x40c065
Capabilities:
Get common file path
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
and dword [ebp - 0x10], 0
push ebx
mov ebx, ecx
mov dword [ebp - 8], ebx
cmp dword [ebx + 0x1c], 0
jg 0x40c085
xor eax, eax
jmp 0x40c2c1
push esi
push edi
mov esi, str._Rename_
lea edi, [ebp - 0x2c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x130]
push 0x104
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x130]
push str.WinInit.Ini
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor esi, esi
cmp dword [ebx + 0x1c], esi
mov dword [ebp - 0xc], esi
jle 0x40c0e4
lea edi, [ebx + 0x14]
push esi
mov ecx, edi
call fcn.0040f763
mov ecx, eax
call fcn.0040ed91
mov ecx, dword [ebp - 0xc]
inc esi
cmp esi, dword [ebx + 0x1c]
lea eax, [ecx + eax + 1]
mov dword [ebp - 0xc], eax
jl 0x40c0c3
xor esi, esi
push esi
push 0x8000080
push 4
push esi
push esi
lea eax, [ebp - 0x130]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
je 0x40c2a5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [ebp - 0xc]
xor edi, edi
mov dword [ebp - 0x14], ebx
lea esi, [ebx + eax + 0xa]
push edi
push esi
push edi
push 4
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [ebp - 0x20], eax
je 0x40c279
push edi
push edi
push edi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x40c263
sub esi, ebx
lea eax, [edi + ebx]
push esi
push 0
push eax
call fcn.00411400
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.00412e50
add esp, 0x14
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x40c194
lea eax, [ebp - 0x2c]
push eax
lea eax, [edi + ebx]
push 0x429130
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebx, eax
mov dword [ebp - 0x14], ebx
mov esi, ebx
jmp 0x40c1ec
and byte [ebp - 1], 0
push 0xa
push eax
call fcn.00412d90
mov esi, eax
pop ecx
test esi, esi
pop ecx
jne 0x40c1bd
lea eax, [ebp - 0x2c]
push eax
call fcn.00412d00
mov esi, eax
pop ecx
add esi, dword [ebp - 0x1c]
mov byte [ebp - 1], 1
jmp 0x40c1be
inc esi
mov eax, edi
sub eax, esi
add eax, ebx
test eax, eax
jle 0x40c1e0
push eax
xor eax, eax
cmp byte [ebp - 1], al
push esi
setne al
add eax, esi
add eax, dword [ebp - 0xc]
push eax
call fcn.004129c0
add esp, 0xc
cmp byte [ebp - 1], 0
je 0x40c1ea
mov byte [esi], 0xa
inc esi
sub esi, edi
mov eax, dword [ebp - 8]
xor ebx, ebx
cmp dword [eax + 0x1c], ebx
jle 0x40c251
mov eax, dword [ebp - 8]
push ebx
lea ecx, [eax + 0x14]
call fcn.0040f763
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
push ebx
lea ecx, [eax + 0x14]
call fcn.0040f763
mov ecx, eax
call fcn.0040ed91
mov ecx, dword [ebp - 0x1c]
push eax
call fcn.0040ed7f
push eax
lea eax, [esi + edi]
push eax
call fcn.004121d0
mov eax, dword [ebp - 8]
add esp, 0xc
push ebx
lea ecx, [eax + 0x14]
call fcn.0040f763
mov ecx, eax
call fcn.0040ed91
add esi, eax
mov eax, dword [ebp - 8]
mov byte [esi + edi], 0xa
inc esi
inc ebx
cmp ebx, dword [eax + 0x1c]
jl 0x40c1f6
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x14], eax
mov ebx, dword [ebp - 0x14]
jmp 0x40c26c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
jmp 0x40c282
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push edi
push edi
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 8]
jmp 0x40c2ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
pop edi
pop esi
jne 0x40c2be
lea ecx, [ebx + 0x14]
call fcn.00402b85
mov eax, dword [ebp - 0x10]
pop ebx
leave
ret