Function at 0x4c9190
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [0x5bc684]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [str._rename_]
mov ecx, dword [0x5775ec]
mov dl, byte [0x5775f0]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0x103
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x113]
push 0
push eax
mov dword [ebp - 0x624], 0xffffffff
mov dword [ebp - 0xc], ecx
mov byte [ebp - 8], dl
mov byte [ebp - 0x114], 0
call fcn.004ff6f0
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x114]
push ecx
push esi
call edi
test eax, eax
jne 0x4c926a
test ebx, ebx
jne 0x4c9253
push eax
push 0x80
push 1
push eax
push eax
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x4c922c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea edx, [ebp - 0x114]
push edx
push esi
call edi
test eax, eax
jne 0x4c926a
lea ecx, [ebp - 0x114]
sub ecx, esi
mov al, byte [esi]
mov byte [ecx + esi], al
inc esi
test al, al
jne 0x4c9247
jmp 0x4c926a
lea ecx, [ebp - 0x114]
sub ecx, esi
jmp 0x4c9260
mov al, byte [esi]
mov byte [ecx + esi], al
inc esi
test al, al
jne 0x4c9260
push 0x400
lea eax, [ebp - 0x618]
push 0
push eax
call fcn.004ff6f0
add esp, 0xc
test ebx, ebx
jne 0x4c929e
lea ecx, [ebp - 0x114]
push ecx
push 0x5775e4
push str._hs_hs
lea edx, [ebp - 0x618]
push edx
jmp 0x4c92b2
lea eax, [ebp - 0x114]
push eax
push ebx
push str._hs_hs
lea ecx, [ebp - 0x618]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [ebp - 0x618]
add esp, 0x10
push edx
call fcn.00530199
add esp, 4
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x218]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4c92e3
mov ecx, dword [str.wininit.ini]
mov edx, dword [0x5775d0]
push 0
push 0x80
mov dword [eax], ecx
mov ecx, dword [0x5775d4]
push 4
mov dword [eax + 4], edx
mov dl, byte [0x5775d8]
push 0
mov dword [eax + 8], ecx
push 0
mov byte [eax + 0xc], dl
push 0xc0000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x628], edi
cmp edi, 0xffffffff
je 0x4c95ff
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x4c95f8
lea ebx, [esi + 1]
push ebx
mov dword [ebp - 0x61c], 0
call fcn.00480850
push ebx
push 0
push eax
mov dword [ebp - 0x620], eax
call fcn.004ff6f0
lea eax, [esi + 0x1000]
push eax
call fcn.00480850
mov ebx, eax
lea eax, [esi + 0x1000]
push eax
push 0
push ebx
call fcn.004ff6f0
mov edx, dword [ebp - 0x620]
add esp, 0x20
push 0
lea ecx, [ebp - 0x61c]
push ecx
push esi
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4c95dd
cmp dword [ebp - 0x61c], esi
jne 0x4c95dd
mov esi, dword [ebp - 0x620]
mov edx, ebx
mov eax, esi
sub edx, esi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4c93d0
push esi
call fcn.00530199
lea eax, [ebp - 0x10]
push eax
push esi
call fcn.004fee10
add esp, 0xc
test eax, eax
je 0x4c94dd
inc eax
push 0x5b
push eax
call fcn.005014d0
add esp, 8
test eax, eax
je 0x4c949b
mov ecx, eax
sub ecx, esi
mov byte [ecx + ebx], 0
lea ecx, [ebp - 0x618]
mov esi, ecx
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x4c9420
sub ecx, esi
mov edx, ecx
lea edi, [ebx - 1]
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4c9430
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebx - 1]
lea esp, [esp]
mov dl, byte [ecx + 1]
inc ecx
test dl, dl
jne 0x4c9450
mov dx, word [0x560e54]
mov word [ecx], dx
mov dl, byte [0x560e56]
mov byte [ecx + 2], dl
mov esi, eax
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c9470
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4c9480
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4c957b
lea eax, [ebp - 0x618]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c94a3
sub eax, esi
lea edi, [ebx - 1]
nop
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4c94b0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx - 1]
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4c94d0
jmp 0x4c9568
lea eax, [ebp - 0x10]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c94e2
sub eax, esi
lea edi, [ebx - 1]
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4c94f0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx - 1]
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4c9510
mov cx, word [0x560e54]
mov word [eax], cx
mov dl, byte [0x560e56]
mov byte [eax + 2], dl
lea eax, [ebp - 0x618]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c9533
sub eax, esi
lea edi, [ebx - 1]
nop
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4c9540
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx - 1]
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4c9560
mov cx, word [0x560e54]
mov word [eax], cx
mov dl, byte [0x560e56]
mov byte [eax + 2], dl
mov eax, ebx
mov dword [ebp - 0x61c], 0
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c9590
mov esi, dword [ebp - 0x628]
push 0
push 0
push 0
sub eax, edx
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
lea eax, [ebp - 0x61c]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c95dd
cmp dword [ebp - 0x61c], edi
jne 0x4c95dd
mov dword [ebp - 0x624], 0
push ebx
call fcn.004808a0
mov ecx, dword [ebp - 0x620]
push ecx
call fcn.004808a0
mov edi, dword [ebp - 0x628]
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x624]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004fe1f5
mov esp, ebp
pop ebp
ret