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

Disassembly:
sub esp, 0x518
push ebx
push ebp
push esi
mov esi, dword [esp + 0x528]
test esi, esi
push edi
je 0x403524
mov ebx, dword [esp + 0x530]
test ebx, ebx
je 0x403524
mov al, byte [0x423318]
test al, al
jne 0x4032d1
push 0x104
push 0x423318
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push 0x423318
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x119]
mov byte [esp + 0x118], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21d]
mov byte [esp + 0x21c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x118]
push 0x104
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
call esi
test eax, eax
je 0x403524
lea ecx, [esp + 0x21c]
push 0x104
push ecx
push ebx
call esi
test eax, eax
je 0x403524
lea edx, [esp + 0x118]
lea eax, [esp + 0x21c]
push edx
push eax
push str._s_s_n
lea ecx, [esp + 0x20]
push 0x103
push ecx
call sub.MSVCRT.dll__snprintf
push 0x4212bc
push 0x423318
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x4033aa
push 0x4212b8
push 0x423318
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 8
test esi, esi
je 0x403524
push esi
call sub.MSVCRT.dll_rewind
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x325]
mov byte [esp + 0x324], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
lea edx, [esp + 0x328]
push 0x208
push edx
stosb byte es:[edi], al
call sub.MSVCRT.dll_fgets
add esp, 0x10
test eax, eax
je 0x403425
lea eax, [esp + 0x320]
push eax
call sub.MSVCRT.dll__strlwr
lea ecx, [esp + 0x324]
push str._rename_
push ecx
call sub.MSVCRT.dll_strstr
add esp, 0xc
test eax, eax
push esi
jne 0x403457
lea edx, [esp + 0x324]
push 0x208
push edx
call sub.MSVCRT.dll_fgets
add esp, 0xc
test eax, eax
jne 0x4033e5
push esi
push str._rename__n
call sub.MSVCRT.dll_fputs
lea eax, [esp + 0x1c]
push esi
push eax
call sub.MSVCRT.dll_fputs
add esp, 0x10
push esi
call sub.MSVCRT.dll_fclose
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x518
ret
call sub.MSVCRT.dll_ftell
push 2
push 0
push esi
mov ebx, eax
call sub.MSVCRT.dll_fseek
push esi
call sub.MSVCRT.dll_ftell
add esp, 0x14
cmp ebx, eax
jne 0x40349c
lea ecx, [esp + 0x14]
push esi
push ecx
call sub.MSVCRT.dll_fputs
add esp, 8
push esi
call sub.MSVCRT.dll_fclose
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x518
ret
sub eax, ebx
dec eax
mov edi, eax
push edi
mov dword [esp + 0x14], edi
call sub.MSVCRT.dll_malloc
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x403524
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
push ebx
rep stosb byte es:[edi], al
push esi
call sub.MSVCRT.dll_fseek
mov eax, dword [esp + 0x1c]
push esi
push eax
push 1
push ebp
call sub.MSVCRT.dll_fread
push 0
push ebx
push esi
mov edi, eax
call sub.MSVCRT.dll_fseek
lea ecx, [esp + 0x3c]
push esi
push ecx
call sub.MSVCRT.dll_fputs
push esi
push 1
push edi
push ebp
call sub.MSVCRT.dll_fwrite
add esp, 0x40
push ebp
call sub.MSVCRT.dll_free
add esp, 4
push esi
call sub.MSVCRT.dll_fclose
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x518
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x518
ret