Function at 0x431c70
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 [0x61094c]
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.005561e0
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x431cc9
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00553d2a
mov esp, ebp
pop ebp
ret
mov ecx, 0x104
lea eax, [ebp - 0x108]
cmp byte [eax], 0
je 0x431cdf
inc eax
sub ecx, 1
jne 0x431cd4
push ebx
push esi
mov edx, 0x104
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x431d2f
lea ecx, [ebp - 0x108]
lea ecx, [ecx + esi]
sub edx, esi
je 0x431d24
mov esi, str.WinInit.Ini
mov eax, SysReAllocString
sub esi, ecx
nop
test eax, eax
je 0x431d24
mov bl, byte [esi + ecx]
test bl, bl
je 0x431d24
mov byte [ecx], bl
dec eax
inc ecx
sub edx, 1
jne 0x431d10
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
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 esi, eax
cmp esi, 0xffffffff
jne 0x431d5c
xor ebx, ebx
jmp 0x431e68
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x431de5
lea ecx, [ebx + 1]
push ecx
call fcn.005602f1
mov edi, eax
add esp, 4
test edi, edi
je 0x431f1f
push 0
lea eax, [ebp - 0x92c]
mov dword [ebp - 0x92c], 0
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x431f1f
mov eax, dword [ebp - 0x92c]
push str._Rename_
push edi
mov byte [eax + edi], 0
call fcn.00556dc0
add esp, 8
test eax, eax
jne 0x431e81
push str._rename_
push edi
call fcn.00556dc0
add esp, 8
test eax, eax
jne 0x431e81
push edi
call fcn.0055e84d
add esp, 4
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x410
lea eax, [ebp - 0x928]
push 0
push eax
call fcn.005561e0
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.00434f90
lea ecx, [ebp - 0x928]
mov dword [ebp - 0x93c], 0
add esp, 0x20
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x431e40
push 0
lea eax, [ebp - 0x93c]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x928]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
pop edi
test esi, esi
je 0x431e6f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop esi
xor ecx, ebp
pop ebx
call fcn.00553d2a
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x410
lea eax, [ebp - 0x518]
push 0
push eax
call fcn.005561e0
push dword [ebp - 0x930]
cmp byte [edi + ebx - 1], 0xa
mov ecx, str._s_s_r_n
push dword [ebp - 0x934]
mov eax, str._r_n_s_s_r_n
cmove eax, ecx
push eax
lea eax, [ebp - 0x518]
push 0x410
push eax
call fcn.00434f90
lea ecx, [ebp - 0x518]
mov dword [ebp - 0x938], 0
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x431ee7
push 0
lea eax, [ebp - 0x938]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x518]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x431f1f
push edi
mov ebx, 1
call fcn.0055e84d
add esp, 4
jmp 0x431e63
push edi
xor ebx, ebx
call fcn.0055e84d
add esp, 4
jmp 0x431e63