Function at 0x405210
Capabilities:
Check if file exists
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov eax, dword [0x4899f8]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
je 0x405247
mov eax, dword [ebp + 0xc]
push eax
call fcn.004482c0
add esp, 4
test eax, eax
je 0x405247
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40524e
xor eax, eax
jmp 0x4055e5
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0xffffffff
jne 0x405280
xor eax, eax
jmp 0x4055e5
mov byte [ebp - 0x818], 0
push 0x3ff
push 0
lea eax, [ebp - 0x817]
push eax
call fcn.004472f0
add esp, 0xc
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 0
push 0
lea ecx, [ebp - 0x418]
push ecx
push 0x400
lea edx, [ebp - 0x818]
push edx
mov eax, dword [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4052e0
cmp dword [ebp - 0x418], 0
jne 0x4052f4
mov ecx, dword [ebp - 0x40c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4055e5
mov byte [ebp - 0x408], 0
push 0x3ff
push 0
lea edx, [ebp - 0x407]
push edx
call fcn.004472f0
add esp, 0xc
mov dword [ebp - 0x410], 0
lea eax, [ebp - 0x818]
push eax
push 0x400
lea ecx, [ebp - 0x408]
push ecx
call fcn.0040c540
add esp, 0xc
mov dword [ebp - 0x410], eax
cmp dword [ebp - 0x410], 0
jg 0x405359
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4055e5
push 0
push 0
push 0
mov eax, dword [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x40c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
lea edx, [ebp - 0x414]
push edx
mov eax, dword [ebp - 0x410]
push eax
lea ecx, [ebp - 0x408]
push ecx
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4053af
mov eax, dword [ebp - 0x414]
cmp eax, dword [ebp - 0x410]
je 0x4053c3
mov ecx, dword [ebp - 0x40c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4055e5
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.Title
push str.info
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str.ActionID
push str.info
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ecx, dword [ebp + 0x20]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push str.SubKey
push str.info
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
push 0x475ba4
push str.info
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp + 0x18]
push eax
push 0x475ba0
push str.info
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [ebp + 0x1c], 0
je 0x405476
mov ecx, dword [ebp + 0x1c]
push ecx
call fcn.004482c0
add esp, 4
test eax, eax
jbe 0x405476
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp + 0x1c]
push eax
push str.Extend
push str.info
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0xffffffff
jne 0x4054a8
xor eax, eax
jmp 0x4055e5
push 0x400
push 0
lea edx, [ebp - 0x818]
push edx
call fcn.004472f0
add esp, 0xc
push 0
lea eax, [ebp - 0x418]
push eax
push 0x400
lea ecx, [ebp - 0x818]
push ecx
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4054ed
cmp dword [ebp - 0x418], 0
jne 0x405501
mov eax, dword [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4055e5
push 0x400
push 0
lea ecx, [ebp - 0x408]
push ecx
call fcn.004472f0
add esp, 0xc
mov dword [ebp - 0x410], 0
lea edx, [ebp - 0x818]
push edx
call fcn.004482c0
add esp, 4
push eax
lea eax, [ebp - 0x818]
push eax
push 0x400
lea ecx, [ebp - 0x408]
push ecx
call fcn.0040c300
add esp, 0x10
mov dword [ebp - 0x410], eax
cmp dword [ebp - 0x410], 0
jg 0x40556c
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4055e5
push 0
push 0
push 0
mov eax, dword [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x40c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
lea edx, [ebp - 0x414]
push edx
mov eax, dword [ebp - 0x410]
push eax
lea ecx, [ebp - 0x408]
push ecx
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4055c2
mov eax, dword [ebp - 0x414]
cmp eax, dword [ebp - 0x410]
je 0x4055d3
mov ecx, dword [ebp - 0x40c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4055e5
mov edx, dword [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004472d8
mov esp, ebp
pop ebp
ret