Function at 0x408190
Capabilities:
Copy file
Delete file
Get common file path
Move file
Read .ini file

Disassembly:
sub esp, 0x6ac
push ebx
push ebp
push esi
lea eax, [esp + 0x5b4]
push edi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x5b8]
push str.upgradeupdatefiles.ini
push ecx
lea edx, [esp + 0x4bc]
push str._s_s
push edx
call esi
add esp, 0x10
lea eax, [esp + 0x4b4]
push eax
push 0
push str.MaxFileNo
push str.FILES
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x10], eax
jle 0x408389
lea edi, [ebx + 1]
lea ecx, [esp + 0x14]
push edi
push str.File_d
push ecx
call esi
add esp, 0xc
lea edx, [esp + 0x4b4]
lea eax, [esp + 0x3b4]
lea ecx, [esp + 0x14]
push edx
push 0xff
push eax
push 0x4131b0
push ecx
push str.FILES
call ebp
test eax, eax
je 0x40837b
lea edx, [esp + 0x28]
push 0x412354
lea eax, [esp + 0x3b8]
push edx
push eax
call fcn.004043f0
lea ecx, [esp + 0x34]
push str.UPGRADE_
lea edx, [esp + 0x2c0]
push ecx
push edx
call fcn.00404520
lea eax, [esp + 0x2c8]
push eax
call fcn.00404950
add esp, 0x1c
test eax, eax
je 0x40837b
lea ecx, [esp + 0x28]
push 0x412344
lea edx, [esp + 0xac]
push ecx
push edx
call fcn.00404520
lea eax, [esp + 0xb4]
push eax
call fcn.00404950
add esp, 0x10
test eax, eax
je 0x408326
lea ecx, [esp + 0xa8]
lea edx, [esp + 0x1ac]
push ecx
push str._s.bak
push edx
call esi
lea eax, [esp + 0x1b8]
push eax
call fcn.00404950
add esp, 0x10
test eax, eax
je 0x4082eb
lea ecx, [esp + 0x1ac]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x1ac]
lea eax, [esp + 0xa8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x408438
lea ecx, [esp + 0x1ac]
lea edx, [esp + 0xa8]
push ecx
push edx
push 0x4129a4
call fcn.004047c0
add esp, 0xc
push ecx
lea ecx, [esp + 0xac]
mov eax, esp
mov dword [esp + 0x28], esp
push ecx
push eax
call fcn.00404660
add esp, 8
call fcn.00404550
add esp, 4
lea edx, [esp + 0xa8]
lea eax, [esp + 0x2b0]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0xa8]
test eax, eax
push ecx
je 0x408457
push 0x412994
call fcn.004047c0
add esp, 8
mov eax, dword [esp + 0x10]
mov ebx, edi
cmp ebx, eax
jl 0x408200
xor edi, edi
test eax, eax
jle 0x408428
inc edi
lea eax, [esp + 0x14]
push edi
push str.File_d
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x4b4]
lea edx, [esp + 0x3b4]
lea eax, [esp + 0x14]
push ecx
push 0xff
push edx
push 0x4131b0
push eax
push str.FILES
call ebp
test eax, eax
je 0x40841e
lea ecx, [esp + 0x28]
push 0x412354
lea edx, [esp + 0x3b8]
push ecx
push edx
call fcn.004043f0
lea eax, [esp + 0x34]
push str.UPGRADE_
lea ecx, [esp + 0x2c0]
push eax
push ecx
call fcn.00404520
lea edx, [esp + 0x2c8]
push edx
call fcn.00404950
add esp, 0x1c
test eax, eax
je 0x40841e
lea eax, [esp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp edi, dword [esp + 0x10]
jl 0x408393
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6ac
ret
lea edx, [esp + 0x1ac]
lea eax, [esp + 0xa8]
push edx
push eax
push 0x412980
call fcn.004047c0
add esp, 0xc
jmp 0x408464
push 0x412970
call fcn.004047c0
add esp, 8
push ebx
push 0x41294c
call fcn.004047c0
add esp, 8
xor edi, edi
test ebx, ebx
jle 0x40858a
inc edi
lea edx, [esp + 0x14]
push edi
push str.File_d
push edx
call esi
add esp, 0xc
lea eax, [esp + 0x4b4]
lea ecx, [esp + 0x3b4]
lea edx, [esp + 0x14]
push eax
push 0xff
push ecx
push 0x4131b0
push edx
push str.FILES
call ebp
lea eax, [esp + 0x28]
push 0x412354
lea ecx, [esp + 0x3b8]
push eax
push ecx
call fcn.004043f0
lea edx, [esp + 0x34]
push str.UPGRADE_
lea eax, [esp + 0x2c0]
push edx
push eax
call fcn.00404520
lea ecx, [esp + 0x2c8]
push ecx
call fcn.00404950
add esp, 0x1c
test eax, eax
je 0x408582
lea edx, [esp + 0x28]
push 0x412344
lea eax, [esp + 0x1b0]
push edx
push eax
call fcn.00404520
lea ecx, [esp + 0x1b8]
lea edx, [esp + 0xb4]
push ecx
push str._s.bak
push edx
call esi
lea eax, [esp + 0xc0]
push eax
call fcn.00404950
add esp, 0x1c
test eax, eax
je 0x408582
lea ecx, [esp + 0x1ac]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x1ac]
lea eax, [esp + 0xa8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x1ac]
push edx
push 0x412944
call fcn.004047c0
add esp, 8
cmp edi, ebx
jl 0x40847c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x6ac
ret