Function at 0x403e80
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.00456fe0
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.00452270
add esp, 0xc
mov byte [ebp - 0x70], 0
lea eax, [ebp - 0x6f]
push 0x63
push 0
push eax
call fcn.00452270
add esp, 0xc
lea ecx, [ebp - 0xd8]
call fcn.00403c00
test eax, eax
je 0x4041c6
mov eax, dword [0x6b0430]
mov dword [ebp - 0x2598], eax
test eax, eax
je 0x4041c6
push 0x257
lea eax, [ebp - 0x587]
mov byte [ebp - 0x588], 0
push 0
push eax
call fcn.00452270
add esp, 0xc
call fcn.00403a90
push 0x4a8890
push 0x258
cmp eax, 1
lea eax, [ebp - 0x588]
push eax
push 0
jne 0x403f2f
push str.Start
jmp 0x403f34
push str.Game
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4041c6
lea eax, [ebp - 0x588]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4041c6
push 0x257
lea eax, [ebp - 0x32f]
mov byte [ebp - 0x330], 0
push 0
push eax
call fcn.00452270
lea edx, [ebp - 0x588]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x403f81
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403f91
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 0x403fb0
mov ax, word [0x482998]
mov edx, 0x6b05b0
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x403fd0
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403fe0
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, 0x6b0614
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404000
sub ecx, edx
je 0x404056
lea edi, [ebp - 0x330]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404012
mov ax, word [0x482a18]
mov edx, 0x6b0614
mov word [edi], ax
mov esi, edx
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x404030
lea edi, [ebp - 0x330]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404040
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.004024e0
cmp eax, 1
jne 0x404091
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xd8]
push eax
call fcn.004572e3
add esp, 8
test eax, eax
je 0x4041c6
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 0x4041c6
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x4041c6
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
test eax, eax
je 0x4041bf
mov esi, dword [ebp - 0x2598]
cmp eax, esi
jb 0x4041bf
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 0x4041bf
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.00452270
add esp, 0xc
mov eax, 0x2000
cmp edi, 0x2000
mov esi, edi
cmova esi, eax
xor ecx, ecx
test esi, esi
je 0x404181
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 0x404170
mov al, byte [edx]
lea edx, [edx - 1]
mov byte [ebp + ecx - 0x2588], al
inc ecx
cmp ecx, esi
jb 0x404170
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 0x4041bf
mov eax, 0x2000
sub edi, esi
jne 0x404142
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.00451570
mov esp, ebp
pop ebp
ret