Function at 0x408650
Capabilities:
Delete directory
Delete file
Get file size
Read .ini file
Read file on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x41b004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x41cd90]
push ebx
push esi
push edi
push 0
push 0x41d22c
push 0x418edc
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push 0x41d330
push 0x41d128
push 0x41d004
lea ecx, [ebp - 0x218]
push str._s_s_s
push ecx
call edi
add esp, 0x14
push str..ini
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionA]
lea eax, [ebp - 0x218]
push eax
push 0x104
push 0x41d434
push 0x417c64
push str.InstallFold
push str.INSTALL
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
call fcn.00407dd0
push str.Setup.dat
push 0x41d434
lea ecx, [ebp - 0x110]
push 0x417c5c
push ecx
call edi
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x408756
mov esi, dword [0x41cd90]
lea eax, [ebp - 0x110]
push eax
push str._0x20010001__n_s
push 0x30
mov edi, str.file_open_error
call fcn.0040aa70
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea ecx, [esi + 1]
push ecx
mov dword [ebp - 0x224], esi
call fcn.0040ae25
add esp, 4
mov dword [ebp - 0x21c], eax
test eax, eax
jne 0x4087b8
mov esi, dword [0x41cd90]
lea edx, [ebp - 0x110]
push edx
push str._0x20010002__n_s
push 0x30
mov edi, str.memory_allocate_error
call fcn.0040aa70
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 0x228]
push ecx
push esi
push eax
push ebx
mov byte [eax + esi], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40881c
mov esi, dword [0x41cd90]
lea edx, [ebp - 0x110]
push edx
push str._0x20010003__n_s
push 0x30
mov edi, str.read_error
call fcn.0040aa70
mov eax, dword [ebp - 0x21c]
add esp, 0xc
push eax
call fcn.0040adeb
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aabb
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x41d004
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test esi, esi
je 0x40899d
jmp 0x408840
mov esi, dword [ebp - 0x21c]
mov al, byte [ebx + esi]
xor ecx, ecx
cmp al, 0x3b
je 0x408860
nop
inc ebx
mov byte [ebp + ecx - 0x110], al
mov al, byte [ebx + esi]
inc ecx
cmp al, 0x3b
jne 0x408850
mov byte [ebp + ecx - 0x110], 0
mov cl, byte [ebx + esi]
inc ebx
cmp cl, 0xa
jne 0x408868
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
movsx eax, byte [ebp - 0x110]
sub eax, 0x44
je 0x408943
sub eax, 2
jne 0x408980
lea edx, [ebp - 0x10e]
push edx
push 0x41d434
lea eax, [ebp - 0x218]
push 0x417c5c
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x10
lea ecx, [ebp - 0x218]
push ecx
mov dword [ebp - 0x220], 0xa
call edi
test eax, eax
jne 0x40896d
dec dword [ebp - 0x220]
je 0x4088ef
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x218]
push edx
call edi
test eax, eax
je 0x4088d0
jmp 0x40896d
push 0
push 0x400
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov esi, dword [0x41cd90]
lea ecx, [ebp - 0x110]
push ecx
lea edx, [ebp - 0x218]
push edx
push 0x418f28
push 0x30
mov edi, 0x41d22c
call fcn.0040aa70
mov esi, dword [ebp - 0x21c]
add esp, 0x10
jmp 0x40896d
lea eax, [ebp - 0x10e]
push eax
push 0x41d434
lea ecx, [ebp - 0x218]
push 0x417c5c
push ecx
call edi
add esp, 0x10
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
cmp ebx, dword [ebp - 0x224]
je 0x4089a3
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
jmp 0x408840
mov ecx, dword [0x41cd90]
push 0x30
lea eax, [ebp - 0x110]
push eax
push 0x418f50
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4089a3
mov esi, dword [ebp - 0x21c]
push esi
call fcn.0040adeb
add esp, 4
mov esi, 0x41d434
call fcn.0040a670
mov edi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + 0x41d434], 0x5c
lea eax, [eax + 0x41d434]
je 0x4089de
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x4089d5
mov esi, 0x41d434
call fcn.0040a670
push esi
call edi
call fcn.00408430
call fcn.00407d10
call fcn.00408160
call fcn.004083c0
mov edx, dword [0x41cd90]
push 0
push 0x41d22c
push 0x418fb8
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0040aabb
mov esp, ebp
pop ebp
ret