Function at 0x403e70
Capabilities:
Check if file exists
Delete file
Extract resource via kernel32 functions
Read .ini file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x259c
call fcn.00457150
mov eax, dword [0x4a4300]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x63
lea eax, [ebp - 0xd7]
mov byte [ebp - 0xd8], 0
push 0
push eax
call fcn.004523e0
add esp, 0xc
mov byte [ebp - 0x70], 0
lea eax, [ebp - 0x6f]
push 0x63
push 0
push eax
call fcn.004523e0
add esp, 0xc
lea ecx, [ebp - 0xd8]
call fcn.00403be0
test eax, eax
je 0x4041b6
mov eax, dword [0x6b0690]
mov dword [ebp - 0x2598], eax
test eax, eax
je 0x4041b6
push 0x257
lea eax, [ebp - 0x587]
mov byte [ebp - 0x588], 0
push 0
push eax
call fcn.004523e0
add esp, 0xc
call fcn.00403a70
push 0x4a8890
push 0x258
cmp eax, 1
lea eax, [ebp - 0x588]
push eax
push 0
jne 0x403f1f
push str.Start
jmp 0x403f24
push str.Game
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4041b6
lea eax, [ebp - 0x588]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4041b6
push 0x257
lea eax, [ebp - 0x32f]
mov byte [ebp - 0x330], 0
push 0
push eax
call fcn.004523e0
lea edx, [ebp - 0x588]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x403f71
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403f81
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 edi, [ebp - 0x330]
dec edi
mov edi, edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403fa0
mov ax, word [0x482998]
mov edx, 0x6b0810
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x403fc0
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403fd0
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]
mov ecx, 0x6b0874
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403ff0
sub ecx, edx
je 0x404046
lea edi, [ebp - 0x330]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404002
mov ax, word [0x482a18]
mov edx, 0x6b0874
mov word [edi], ax
mov esi, edx
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x404020
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404030
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 edx, [ebp - 0x70]
lea ecx, [ebp - 0x330]
call fcn.004024a0
cmp eax, 1
jne 0x404081
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xd8]
push eax
call fcn.00457453
add esp, 8
test eax, eax
je 0x4041b6
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 2
push 0x8b
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x4041b6
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x4041b6
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
test eax, eax
je 0x4041af
mov esi, dword [ebp - 0x2598]
cmp eax, esi
jb 0x4041af
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x330]
mov dword [ebp - 0x258c], 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2594], eax
cmp eax, 0xffffffff
je 0x4041af
push 0x1fff
lea eax, [ebp - 0x2587]
mov dword [ebp - 0x2590], 0
push 0
push eax
mov edi, esi
mov byte [ebp - 0x2588], 0
call fcn.004523e0
add esp, 0xc
mov eax, 0x2000
cmp edi, 0x2000
mov esi, edi
cmova esi, eax
xor ecx, ecx
test esi, esi
je 0x404171
mov edx, dword [ebp - 0x2598]
lea eax, [ebx + 0x28]
sub eax, dword [ebp - 0x2590]
dec edx
add edx, eax
add dword [ebp - 0x2590], esi
jmp 0x404160
mov al, byte [edx]
lea edx, [edx - 1]
mov byte [ebp + ecx - 0x2588], al
inc ecx
cmp ecx, esi
jb 0x404160
push 0
lea eax, [ebp - 0x258c]
push eax
push esi
lea eax, [ebp - 0x2588]
push eax
push dword [ebp - 0x2594]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4041af
mov eax, 0x2000
sub edi, esi
jne 0x404132
mov esi, dword [ebp - 0x2594]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004516e1
mov esp, ebp
pop ebp
ret