Function at 0x404790
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x43018d
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x440de4]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x440de4]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
mov ebx, ecx
push str.CDownLoadManager::Init
push str._s_enter
mov dword [esp + 0x2c], ebx
call section..text
lea eax, [esp + 0x24]
push eax
call fcn.00402250
add esp, 0xc
lea edi, [ebx + 0x40]
push eax
mov ecx, edi
mov dword [esp + 0x144], 0
call fcn.00401db0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x140], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40482e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x103
lea ecx, [esp + 0x35]
push 0
push ecx
mov byte [esp + 0x3c], 0
call fcn.00419080
add esp, 0xc
lea edx, [esp + 0x30]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp + 0x30]
lea esi, [ebx + 0x34]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404861
sub eax, edx
push eax
lea eax, [esp + 0x34]
push eax
mov ecx, esi
call fcn.004019f0
push 0x11
push 0x433c10
mov ecx, esi
call fcn.00401cc0
push 1
push 0x433c0c
mov ecx, esi
call fcn.00401cc0
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4048c5
mov eax, dword [esi]
push ecx
sub eax, 0x10
mov dword [esp + 0x20], esp
mov ebp, esp
push eax
call fcn.00401780
add eax, 0x10
add esp, 4
mov dword [ebp], eax
call fcn.00401fd0
add esp, 4
mov esi, dword [esi]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x433652
lea ecx, [esp + 0x18]
call fcn.004023b0
push str.HiSuiteDownLoader.cfg
lea ecx, [esp + 0x20]
push edi
push ecx
mov dword [esp + 0x14c], 1
call fcn.00401e90
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x144], 2
call fcn.00401db0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x140], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404936
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
lea esi, [ebx + 0x20]
push esi
push 1
push str.Version
push str.Section_Hisuite
call fcn.00402470
mov edx, dword [esp + 0x28]
push edx
lea eax, [ebx + 0x14]
push eax
push 1
push str.Host
push str.Section_Server
call fcn.00402470
add esp, 0x28
push 0x433652
lea ecx, [esp + 0x24]
call fcn.004023b0
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x24]
push edx
push 1
push str.Port
push str.Section_Server
mov byte [esp + 0x154], 3
call fcn.00402470
mov eax, dword [esp + 0x34]
add esp, 0x14
cmp dword [eax - 0xc], 0
je 0x4049b8
push eax
call fcn.0041a86c
add esp, 4
mov word [ebx + 0x18], ax
push 0x433652
lea ecx, [esp + 0x1c]
call fcn.004023b0
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 1
push str.Object
push str.Section_Server
mov byte [esp + 0x154], 4
call fcn.00402470
mov edx, dword [esp + 0x2c]
add esp, 0x14
cmp dword [edx - 0xc], 0
je 0x404a92
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x30]
push 0x433bc8
push ecx
call fcn.00403d40
push str._UrlCommand_CheckNewVersion.aspx
push eax
lea edx, [esp + 0x3c]
mov bl, 5
push edx
mov byte [esp + 0x158], bl
call fcn.00401e90
add esp, 0x18
mov ecx, dword [esp + 0x24]
add ecx, 0x1c
push eax
mov byte [esp + 0x144], 6
call fcn.00401db0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x140], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x140], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a8e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x24]
mov ecx, dword [esi]
mov eax, dword [ecx - 0xc]
add eax, 1
push eax
call fcn.00409924
mov edx, dword [esi]
mov edi, eax
mov eax, dword [edx - 0xc]
add eax, 1
push eax
push 0
push edi
call fcn.00419080
mov eax, dword [esi]
mov ebp, dword [eax - 0xc]
sub eax, 0x10
add esp, 0x10
cmp dword [eax + 0xc], 1
jle 0x404acf
mov ecx, dword [eax + 4]
push ecx
mov ecx, esi
call fcn.00401420
mov eax, dword [esi]
push ebp
push eax
push edi
call fcn.0041a880
mov edx, dword [esi]
xor eax, eax
add esp, 0xc
xor ecx, ecx
cmp dword [edx - 0xc], eax
jle 0x404b06
cmp byte [eax + edi], 0x2e
jne 0x404af3
add ecx, 1
add eax, 1
cmp ecx, 2
jne 0x404afc
mov byte [eax + edi], 0x30
mov edx, dword [esi]
add eax, 1
cmp eax, dword [edx - 0xc]
jl 0x404ae7
add ebx, 0x24
test edi, edi
jne 0x404b11
xor eax, eax
jmp 0x404b21
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404b16
sub eax, edx
push eax
push edi
mov ecx, ebx
call fcn.004019f0
test edi, edi
je 0x404b37
push edi
call fcn.00409929
add esp, 4
mov eax, dword [esi]
push eax
push str.Local_version:__s_
call section..text
mov ecx, dword [ebx]
push ecx
push str.Base_version:__s_
call section..text
push str.CDownLoadManager::Init
push str._s_leave
call section..text
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 0x18
mov byte [esp + 0x140], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404b8b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x140], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404bb3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x140], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404bde
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.0041906b
add esp, 0x130
ret