Function at 0x40f2cb
Capabilities:
Create directory
Download url
Move file
Read .ini file
Receive data
Set current directory

Disassembly:
push 0x3b0
mov eax, 0x45ee07
call fcn.00446e42
lea eax, [ebp - 0x150]
push eax
mov dword [ebp - 0x394], ecx
call dword [sym.imp.DuiLib.dll_public:_static_class_DuiLib::CDuiString___cdecl_DuiLib::CPaintManagerUI::GetInstancePath_void_]
pop ecx
xor ebx, ebx
mov ecx, eax
mov dword [ebp - 4], ebx
call dword [sym.imp.DuiLib.dll_public:_wchar_t_const____thiscall_DuiLib::CDuiString::GetData_void_const]
push eax
lea ecx, [ebp - 0x384]
call fcn.0040c78b
lea ecx, [ebp - 0x150]
mov byte [ebp - 4], 2
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_]
mov esi, 0x480074
push esi
lea ecx, [ebp - 0x388]
call fcn.0040c2ac
push esi
lea ecx, [ebp - 0x398]
mov byte [ebp - 4], 3
call fcn.0040c2ac
mov eax, dword [ebp - 0x384]
cmp dword [eax - 4], 1
mov byte [ebp - 4], 4
jle 0x40f35c
push dword [eax - 0xc]
lea ecx, [ebp - 0x384]
call fcn.0040c31a
mov eax, dword [ebp - 0x384]
push str.models
push eax
mov edi, str._s_s
lea eax, [ebp - 0x388]
push edi
push eax
call fcn.0040e462
mov eax, dword [ebp - 0x384]
add esp, 0x10
cmp dword [eax - 4], 1
jle 0x40f397
push dword [eax - 0xc]
lea ecx, [ebp - 0x384]
call fcn.0040c31a
mov eax, dword [ebp - 0x384]
push str.models.zip
push eax
lea eax, [ebp - 0x398]
push edi
push eax
call fcn.0040e462
add esp, 0x10
cmp dword [ebp + 0xc], ebx
jg 0x40f421
push esi
lea ecx, [ebp - 0x38c]
call fcn.0040c2ac
mov eax, dword [ebp - 0x388]
cmp dword [eax - 4], 1
mov byte [ebp - 4], 5
jle 0x40f3e2
push dword [eax - 0xc]
lea ecx, [ebp - 0x388]
call fcn.0040c31a
mov eax, dword [ebp - 0x388]
push str.ver.ini
push eax
lea eax, [ebp - 0x38c]
push edi
push eax
call fcn.0040e462
mov edi, dword [ebp - 0x38c]
add esp, 0x10
push edi
push dword [ebp + 0xc]
push 0x465c10
push str.Config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea ecx, [edi - 0x10]
mov dword [ebp + 0xc], eax
mov byte [ebp - 4], 4
call fcn.0040be22
push esi
lea ecx, [ebp - 0x3a0]
call fcn.0040c2ac
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x3a0]
push str.http:__httpres.bjcscn.com_modelVer.json_rand_d
push eax
call fcn.0040e462
mov eax, dword [ebp - 0x3a0]
pop ecx
pop ecx
add eax, 0xfffffff0
mov dword [ebp - 0x3a4], esp
mov edi, esp
push eax
mov dword [ebp - 0x3a4], eax
call fcn.0040cd69
add eax, 0x10
pop ecx
mov ecx, dword [ebp - 0x394]
mov dword [edi], eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040f0f4
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 7
call fcn.004135e1
push ebx
lea ecx, [ebp - 0x3bc]
mov byte [ebp - 4], 8
call fcn.00414b60
cmp dword [ebp - 0x34], 0x10
mov eax, dword [ebp - 0x48]
mov byte [ebp - 4], 9
jae 0x40f4ac
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040628b
push ebx
lea eax, [ebp - 0x3bc]
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 0xa
call fcn.00414131
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x38d], al
mov byte [ebp - 4], 9
call fcn.0040118d
cmp byte [ebp - 0x38d], bl
je 0x40f680
push str.modelVer
lea ecx, [ebp - 0x3bc]
call fcn.00415e07
mov ecx, eax
call fcn.00415144
mov edi, eax
lea eax, [ebp - 0x2c]
push eax
push str.downloadUrl
lea ecx, [ebp - 0x3bc]
call fcn.00415e07
mov ecx, eax
call fcn.00415048
mov byte [ebp - 4], 0xb
cmp edi, dword [ebp + 0xc]
jle 0x40f675
cmp dword [ebp - 0x1c], ebx
je 0x40f675
push esi
lea ecx, [ebp - 0x38c]
call fcn.0040c2ac
mov eax, dword [ebp - 0x384]
cmp dword [eax - 4], 1
mov byte [ebp - 4], 0xc
jle 0x40f56b
push dword [eax - 0xc]
lea ecx, [ebp - 0x384]
call fcn.0040c31a
mov eax, dword [ebp - 0x384]
push str.models.zip
push eax
lea eax, [ebp - 0x38c]
push str._s_s_temp
push eax
call fcn.0040e462
mov eax, dword [ebp - 0x2c]
add esp, 0x10
cmp dword [ebp - 0x18], 0x10
jae 0x40f591
lea eax, [ebp - 0x2c]
push ebx
push eax
call fcn.0040dde6
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x39c]
call fcn.0040c78b
push dword [ebp - 0x394]
mov byte [ebp - 4], 0xd
push ebx
push dword [ebp - 0x38c]
push dword [ebp - 0x39c]
push ebx
call sub.urlmon.dll_URLDownloadToFileW
test eax, eax
jne 0x40f659
push 1
push dword [ebp - 0x398]
push dword [ebp - 0x38c]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
push dword [ebp - 0x388]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push dword [ebp - 0x388]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
push dword [ebp - 0x398]
call fcn.0041b1cb
mov esi, eax
lea eax, [ebp - 0x380]
push eax
push 0xffffffffffffffff
push esi
call fcn.0041973b
mov eax, dword [ebp - 0x380]
add esp, 0x14
xor edi, edi
mov dword [ebp - 0x394], eax
cmp eax, ebx
jle 0x40f652
lea eax, [ebp - 0x380]
push eax
push edi
push esi
call fcn.0041973b
lea eax, [ebp - 0x37c]
push eax
push edi
push esi
call fcn.0041b21a
add esp, 0x18
inc edi
cmp edi, dword [ebp - 0x394]
jl 0x40f62a
push esi
call fcn.0041b234
pop ecx
mov ecx, dword [ebp - 0x39c]
add ecx, 0xfffffff0
call fcn.0040be22
mov ecx, dword [ebp - 0x38c]
add ecx, 0xfffffff0
call fcn.0040be22
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040118d
lea ecx, [ebp - 0x3bc]
mov byte [ebp - 4], 8
call fcn.00414d33
lea ecx, [ebp - 0xcc]
call fcn.0040f285
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.0040118d
mov ecx, dword [ebp - 0x3a4]
call fcn.0040be22
mov ecx, dword [ebp - 0x398]
add ecx, 0xfffffff0
call fcn.0040be22
mov ecx, dword [ebp - 0x388]
add ecx, 0xfffffff0
call fcn.0040be22
mov ecx, dword [ebp - 0x384]
add ecx, 0xfffffff0
call fcn.0040be22
call fcn.00446ec5
ret 8