Function at 0x404228
Capabilities:
Connect to http server
Get file size
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x52c
mov eax, dword [0x40b034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0xf
mov dword [ebp - 0x4e4], eax
pop eax
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x494], eax
xor eax, eax
mov esi, ecx
xor ecx, ecx
push 0x206
mov word [ebp - 0x470], ax
mov word [ebp - 0x41c], ax
push ecx
lea eax, [ebp - 0x41a]
push eax
mov dword [ebp - 0x4ec], esi
mov dword [ebp - 0x428], ecx
mov byte [ebp - 0x438], cl
mov dword [ebp - 0x498], ecx
mov byte [ebp - 0x4a8], cl
mov dword [ebp - 0x45c], 7
mov dword [ebp - 0x460], ecx
call sub.MSVCR100.dll_memset
lea eax, [esi + 0x1c]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x4042b8
mov eax, dword [eax]
cmp dword [esi + 0x14], 8
jb 0x4042c0
mov esi, dword [esi]
push eax
push esi
push str.index_ssekey_s
lea eax, [ebp - 0x41c]
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll_swprintf_s]
lea eax, [ebp - 0x41c]
push eax
lea ecx, [ebp - 0x4e0]
call fcn.00402fd1
mov ebx, eax
add esp, 0x18
lea eax, [ebp - 0x438]
call fcn.0040339d
push 1
xor edi, edi
lea esi, [ebp - 0x4e0]
call fcn.004033ec
cmp dword [ebp - 0x424], 0x10
mov eax, dword [ebp - 0x438]
jae 0x40431f
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x4e0]
push eax
mov eax, dword [ebp - 0x428]
call fcn.00402c7a
pop ecx
mov ebx, eax
pop ecx
lea eax, [ebp - 0x4a8]
call fcn.0040339d
push 1
xor edi, edi
lea esi, [ebp - 0x4e0]
call fcn.004033ec
cmp dword [ebp - 0x494], 0x10
mov eax, dword [ebp - 0x4a8]
jae 0x404365
lea eax, [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x4e0]
push eax
call fcn.00402d9c
pop ecx
mov ebx, eax
pop ecx
lea eax, [ebp - 0x470]
call fcn.0040225c
xor ebx, ebx
inc ebx
push ebx
xor edi, edi
lea esi, [ebp - 0x4e0]
call fcn.00402702
xor eax, eax
push 0x206
mov word [ebp - 0x214], ax
xor esi, esi
lea eax, [ebp - 0x212]
push esi
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0x470]
add esp, 0xc
cmp dword [ebp - 0x45c], 8
jae 0x4043c7
lea eax, [ebp - 0x470]
push eax
push str.pfrt.qq.com
push str.http:___s_reason__p_s
lea eax, [ebp - 0x214]
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll_swprintf_s]
add esp, 0x14
push 7
pop eax
mov dword [ebp - 0x4b0], eax
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x478], eax
xor eax, eax
mov word [ebp - 0x48c], ax
xor ecx, ecx
lea eax, [ebp - 0x4f4]
push eax
lea eax, [ebp - 0x214]
mov word [ebp - 0x4c4], cx
mov word [ebp - 0x454], cx
push eax
lea edx, [ebp - 0x48c]
lea ecx, [ebp - 0x454]
mov dword [ebp - 0x4b4], esi
mov dword [ebp - 0x444], esi
mov dword [ebp - 0x47c], esi
mov dword [ebp - 0x4f4], 0x50
call fcn.0040472a
test eax, eax
je 0x4044b6
mov eax, dword [ebp - 0x4ec]
cmp dword [eax + 0x38], esi
je 0x4044b6
mov eax, dword [ebp - 0x4e4]
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x4fc], esi
jb 0x404473
mov eax, dword [eax]
push esi
push esi
push 3
push esi
push esi
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x4e4], edi
cmp edi, esi
je 0x4044b6
cmp edi, 0xffffffff
je 0x4044b6
lea eax, [ebp - 0x4fc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x4f8], eax
cmp eax, 0xffffffff
jne 0x404513
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
xor edi, edi
lea esi, [ebp - 0x48c]
call fcn.00402702
push ebx
lea esi, [ebp - 0x454]
call fcn.00402702
push ebx
lea esi, [ebp - 0x4c4]
call fcn.00402702
push ebx
lea esi, [ebp - 0x470]
call fcn.00402702
push ebx
lea esi, [ebp - 0x4a8]
call fcn.004033ec
push ebx
lea esi, [ebp - 0x438]
call fcn.004033ec
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004080ae
leave
ret 4
mov eax, dword [0x4098f8]
mov dword [ebp - 0xc], eax
mov eax, dword [0x4098fc]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push 0x400000
mov dword [ebp - 0x504], eax
mov dword [ebp - 0x500], esi
xor ebx, ebx
call dword [sym.imp.MSVCR100.dll_malloc]
pop ecx
mov dword [ebp - 0x4e8], eax
cmp eax, esi
jne 0x404550
inc ebx
jmp 0x4044b6
cmp dword [ebp - 0x440], 8
mov ecx, dword [ebp - 0x454]
mov dword [ebp - 0x4f0], esi
jae 0x40456b
lea ecx, [ebp - 0x454]
push esi
push esi
push 3
mov eax, 0x409624
push eax
push eax
push dword [ebp - 0x4f4]
mov eax, dword [ebp - 0x4ec]
push ecx
push dword [eax + 0x38]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x4ec], eax
cmp eax, esi
je 0x4046ba
cmp dword [ebp - 0x478], 8
mov ecx, dword [ebp - 0x48c]
jae 0x4045af
lea ecx, [ebp - 0x48c]
push esi
push 0x84000000
lea edx, [ebp - 0x504]
push edx
push esi
push esi
push ecx
push str.POST
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
cmp edi, esi
je 0x4046ae
mov eax, dword [ebp - 0x4f8]
push esi
push esi
mov dword [ebp - 0x510], eax
push esi
lea eax, [ebp - 0x52c]
push eax
push edi
mov dword [ebp - 0x52c], 0x28
mov dword [ebp - 0x528], esi
mov dword [ebp - 0x524], esi
mov dword [ebp - 0x520], esi
mov dword [ebp - 0x51c], esi
mov dword [ebp - 0x518], esi
mov dword [ebp - 0x514], esi
mov dword [ebp - 0x50c], esi
mov dword [ebp - 0x508], esi
call dword [sym.imp.WININET.dll_HttpSendRequestExW]
mov ebx, eax
cmp ebx, esi
je 0x4046a7
push dword [ebp - 0x4f8]
push dword [ebp - 0x4e4]
push edi
call fcn.00404b42
mov ebx, eax
cmp ebx, esi
je 0x4046a7
push esi
push esi
push esi
push edi
call dword [sym.imp.WININET.dll_HttpEndRequestW]
mov ebx, eax
cmp ebx, esi
je 0x4046a7
push 0x400000
push esi
push dword [ebp - 0x4e8]
call dword [sym.imp.MSVCR100.dll_memset]
add esp, 0xc
lea eax, [ebp - 0x4f0]
push eax
push 0x3fffff
push dword [ebp - 0x4e8]
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, eax
cmp ebx, esi
je 0x4046a7
push dword [ebp - 0x4f0]
lea eax, [ebp - 0x4c4]
push dword [ebp - 0x4e8]
call fcn.00404958
mov ebx, eax
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x4ec]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x4e4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x4e8]
call dword [sym.imp.MSVCR100.dll_free]
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x48c]
call fcn.00402702
push 1
lea esi, [ebp - 0x454]
call fcn.00402702
push 1
lea esi, [ebp - 0x4c4]
call fcn.00402702
push 1
lea esi, [ebp - 0x470]
call fcn.00402702
push 1
lea esi, [ebp - 0x4a8]
call fcn.004033ec
push 1
lea esi, [ebp - 0x438]
call fcn.004033ec
mov eax, ebx
jmp 0x404502