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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x93c
mov eax, dword [0x527064]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x108]
mov dword [ebp - 0x934], edx
push 0
push eax
mov dword [ebp - 0x930], ecx
call fcn.00496490
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x46eb29
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004908ad
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
lea eax, [ebp - 0x92c]
mov esi, 0x104
push eax
mov edx, esi
lea ecx, [ebp - 0x108]
call fcn.0046e240
test eax, eax
js 0x46eb69
sub esi, dword [ebp - 0x92c]
push ecx
push str.WinInit.Ini
push ecx
lea ecx, [ebp - 0x108]
mov edx, esi
add ecx, dword [ebp - 0x92c]
call fcn.0046e290
push 0
push 0x8000080
push 4
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x46eb96
xor ebx, ebx
jmp 0x46ecb7
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x46ec37
xor esi, esi
lea eax, [ebx + 1]
xor ecx, ecx
ja 0x46ed78
jb 0x46ebc1
cmp eax, 0xffffffff
ja 0x46ed78
push eax
call fcn.004a3e8e
mov esi, eax
add esp, 4
test esi, esi
je 0x46ed78
push 0
lea eax, [ebp - 0x92c]
mov dword [ebp - 0x92c], 0
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46ed78
mov eax, dword [ebp - 0x92c]
push str._Rename_
push esi
mov byte [eax + esi], 0
call fcn.00495a20
add esp, 8
test eax, eax
jne 0x46ecd1
push str._rename_
push esi
call fcn.00495a20
add esp, 8
test eax, eax
jne 0x46ecd1
push esi
call fcn.004a2e5c
add esp, 4
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x410
lea eax, [ebp - 0x928]
push 0
push eax
call fcn.00496490
push dword [ebp - 0x930]
lea eax, [ebp - 0x928]
push dword [ebp - 0x934]
push str._r_n_rename__r_n_s_s_r_n
push 0x410
push eax
call fcn.0046e130
lea ecx, [ebp - 0x928]
mov dword [ebp - 0x93c], 0
add esp, 0x20
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46ec90
push 0
lea eax, [ebp - 0x93c]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x928]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
test edi, edi
je 0x46ecbe
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004908ad
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x410
lea eax, [ebp - 0x518]
push 0
push eax
call fcn.00496490
add esp, 0xc
lea eax, [ebp - 0x518]
cmp byte [esi + ebx - 1], 0xa
push dword [ebp - 0x930]
push dword [ebp - 0x934]
jne 0x46ed14
push str._s_s_r_n
jmp 0x46ed19
push str._r_n_s_s_r_n
push 0x410
push eax
call fcn.0046e130
lea ecx, [ebp - 0x518]
mov dword [ebp - 0x938], 0
add esp, 0x14
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46ed40
push 0
lea eax, [ebp - 0x938]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x518]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46ed78
push esi
mov ebx, 1
call fcn.004a2e5c
add esp, 4
jmp 0x46ecb3
push esi
xor ebx, ebx
call fcn.004a2e5c
add esp, 4
jmp 0x46ecb3