Function at 0x4a8447
Capabilities:
Check if file exists
Create thread
Delete directory
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x566ccc
mov eax, dword fs:[0]
push eax
sub esp, 0x510
mov eax, dword [0x5afee0]
xor eax, esp
mov dword [esp + 0x508], eax
push ebx
push esi
push edi
mov eax, dword [0x5afee0]
xor eax, esp
push eax
lea eax, [esp + 0x520]
mov dword fs:[0], eax
cmp dword [ebp + 8], 7
mov esi, ecx
mov dword [esp + 0x10], esi
jl 0x4a89a8
cmp dword [ebp + 8], 9
jg 0x4a89a8
lea eax, [esi + 0xa8]
xor ebx, ebx
mov dword [eax + 0x26a4], ebx
mov dword [eax + 0x26a0], ebx
call fcn.00490a9a
lea eax, [esi + 0x5d1f0]
push eax
lea ecx, [esp + 0x58]
call fcn.0040a8b0
cmp dword [ebp + 8], 7
mov dword [esp + 0x528], ebx
jne 0x4a8919
cmp dword [esp + 0x68], ebx
jbe 0x4a8919
mov eax, dword [esp + 0x58]
push 8
pop edi
cmp dword [esp + 0x6c], edi
jae 0x4a84f6
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a8919
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x90]
call fcn.004051c1
push str.temp_
lea ecx, [esp + 0x90]
mov byte [esp + 0x52c], 1
call fcn.0040a9e6
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0x74]
call fcn.004051c1
push str.update.ini
lea ecx, [esp + 0x74]
mov byte [esp + 0x52c], 2
call fcn.0040a9e6
mov ecx, dword [esp + 0x90]
cmp dword [esp + 0xa4], edi
jae 0x4a856d
lea ecx, [esp + 0x90]
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x6c], edi
jae 0x4a857b
lea eax, [esp + 0x58]
cmp eax, ebx
je 0x4a8588
push ecx
push eax
call fcn.004a9f97
jmp 0x4a858a
xor al, al
cmp al, bl
je 0x4a8880
lea ecx, [esp + 0x70]
call fcn.004a7bfd
test al, al
je 0x4a8880
mov eax, dword [esp + 0x74]
cmp dword [esp + 0x88], edi
jae 0x4a85b4
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x100]
push eax
call fcn.004a78a5
lea eax, [esp + 0xa8]
push eax
mov ebx, str.version
mov edi, 0x580e70
lea esi, [esp + 0x100]
call fcn.004aa9a4
lea eax, [esp + 0xc4]
push eax
mov ebx, 0x583f38
mov byte [esp + 0x52c], 3
call fcn.004aa9a4
mov byte [esp + 0x528], 4
cmp dword [esp + 0xd8], 0
jbe 0x4a8841
cmp dword [esp + 0xc0], 8
mov eax, dword [esp + 0xac]
jae 0x4a8628
lea eax, [esp + 0xac]
mov ecx, dword [esp + 0x10]
push eax
call fcn.004a8329
test eax, eax
je 0x4a8841
lea eax, [esp + 0xe0]
push eax
mov ebx, str.condition
mov edi, 0x580e70
lea esi, [esp + 0x100]
call fcn.004aa9a4
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0xe0]
mov edi, esi
mov byte [esp + 0x528], 5
call fcn.004a89ce
xor ebx, ebx
test al, al
je 0x4a882a
lea eax, [esp + 0xfc]
push eax
push ebx
push str.rate
mov edi, 0x580e70
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
call fcn.004a90ce
test al, al
je 0x4a882a
push 0xcc
mov byte [esi + 0xa0], 1
call fcn.0052fe0a
pop ecx
cmp eax, ebx
je 0x4a86c9
mov esi, eax
call fcn.004a78dc
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x4a86cf
mov dword [esp + 0x14], ebx
mov esi, ebx
xor eax, eax
mov byte [esi + 0xc9], bl
push 0x208
mov word [esp + 0x308], ax
lea eax, [esp + 0x30a]
push ebx
push eax
mov dword [esp + 0x24], esi
call fcn.00537010
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp dword [eax + 0x6c], 8
jb 0x4a8708
mov eax, dword [eax + 0x58]
jmp 0x4a870b
add eax, 0x58
push eax
push str._smain_setup
lea eax, [esp + 0x30c]
push 0x104
push eax
call fcn.00532a01
add esp, 0x10
lea eax, [esp + 0x304]
lea ecx, [esi + 0x38]
push eax
call fcn.00406430
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0xcc]
lea ecx, [esi + 0x1c]
push eax
call fcn.00405304
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0xb0]
lea ecx, [esi + 0x70]
push eax
call fcn.00405304
push edi
mov ecx, esi
call fcn.00406430
lea eax, [esp + 0x38]
push eax
mov ebx, 0x58cd78
lea esi, [esp + 0x100]
call fcn.004aa9a4
mov ecx, dword [esp + 0x14]
push 0xffffffffffffffff
push 0
add ecx, 0x8c
push eax
mov byte [esp + 0x534], 6
call fcn.00405304
push 0
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x530], 5
call fcn.004053e5
lea eax, [esp + 0x1c]
push eax
mov ebx, 0x58cd80
mov edi, 0x580e70
call fcn.004aa9a4
mov esi, dword [esp + 0x14]
push 0xffffffffffffffff
xor edi, edi
push edi
lea ecx, [esi + 0xa8]
push eax
mov byte [esp + 0x534], 7
call fcn.00405304
push edi
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x530], 5
call fcn.004053e5
lea eax, [esp + 0xfc]
push eax
push edi
push str.restart
push 0x580e70
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
sete al
mov byte [esi + 0xc8], al
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
add eax, 0xc5f78
call fcn.004aa0e3
xor ebx, ebx
push ebx
push 1
lea ecx, [esp + 0xe8]
mov byte [esp + 0x530], 4
call fcn.004053e5
mov eax, dword [esp + 0x10]
xor ebx, ebx
cmp byte [eax + 0xa0], bl
jne 0x4a885c
push eax
lea ecx, [esp + 0x100]
call fcn.004a9103
push ebx
push 1
lea ecx, [esp + 0xcc]
call fcn.004053e5
push ebx
push 1
lea ecx, [esp + 0xb0]
call fcn.004053e5
mov esi, dword [esp + 0x10]
xor ebx, ebx
cmp dword [esp + 0xa4], 8
mov eax, dword [esp + 0x90]
jae 0x4a8898
lea eax, [esp + 0x90]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
test eax, eax
je 0x4a88c4
cmp dword [esp + 0xa4], 8
mov eax, dword [esp + 0x90]
jae 0x4a88bd
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp dword [esp + 0x84], 0xa
jbe 0x4a88fe
cmp dword [esp + 0x88], 8
mov eax, dword [esp + 0x74]
jae 0x4a88e0
lea eax, [esp + 0x74]
push eax
call edi
test eax, eax
je 0x4a88fe
cmp dword [esp + 0x88], 8
mov ecx, dword [esp + 0x74]
jae 0x4a88f9
lea ecx, [esp + 0x74]
call fcn.00496aa0
push ebx
push 1
lea ecx, [esp + 0x78]
call fcn.004053e5
push ebx
push 1
lea ecx, [esp + 0x94]
call fcn.004053e5
cmp dword [esp + 0x68], 0xa
jbe 0x4a894e
cmp dword [esp + 0x6c], 8
mov eax, dword [esp + 0x58]
jae 0x4a892f
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a894e
cmp dword [esp + 0x6c], 8
mov ecx, dword [esp + 0x58]
jae 0x4a8949
lea ecx, [esp + 0x58]
call fcn.00496aa0
mov eax, dword [esi + 0xc5f88]
sub eax, dword [esi + 0xc5f84]
test eax, 0xfffffffc
jne 0x4a8968
call fcn.004a9f57
jmp 0x4a899c
lea eax, [esi + 0x9c]
cmp dword [eax], ebx
jne 0x4a899c
mov dword [eax], 1
lea eax, [esi + 0x98]
push eax
push ebx
push esi
push 0x4a98c0
push ebx
push ebx
mov byte [esi + 0xa1], bl
call fcn.0053364a
add esp, 0x18
mov dword [esi + 0x90], eax
push ebx
push 1
lea ecx, [esp + 0x5c]
call fcn.004053e5
mov ecx, dword [esp + 0x520]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x508]
xor ecx, esp
call fcn.0052f7d0
mov esp, ebp
pop ebp
ret 4