Function at 0x40c262
Capabilities:
Check http status code
Connect to http server
Get http content length
Parse url
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x417018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x1cc], ecx
mov ecx, dword [ebp + 0x10]
xor esi, esi
push edi
mov dword [ebp - 0x1a4], eax
mov ebx, edx
mov dword [ebp - 0x1c4], ecx
cmp dword [eax], esi
je 0x40c3d6
push 0x3c
pop edi
push edi
lea eax, [ebp - 0x230]
push esi
push eax
call sub.MSVCR100.dll_memset
xor eax, eax
add esp, 0xc
inc eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x200], eax
mov eax, ebx
mov dword [ebp - 0x230], edi
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, si
jne 0x40c2ca
sub eax, ecx
lea ecx, [ebp - 0x230]
push ecx
push esi
sar eax, 1
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x40c3d6
push dword [ebp - 0x220]
mov ebx, dword [ebp - 0x21c]
lea eax, [ebp - 0x198]
call fcn.0040bb9c
mov ecx, dword [ebp - 0x21c]
push 6
xor eax, eax
mov word [ebp + ecx*2 - 0x198], ax
mov eax, dword [ebp - 0x204]
pop ecx
push esi
push esi
mov dword [ebp - 0x19c], eax
xor eax, eax
lea edi, [ebp - 0x1bc]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push esi
push esi
mov dword [ebp - 0x1a8], 2
call edi
push esi
push esi
push esi
push esi
mov dword [ebp - 0x1b4], eax
call edi
push esi
push esi
push esi
push esi
mov dword [ebp - 0x1b0], eax
call edi
mov dword [ebp - 0x1ac], eax
cmp dword [ebp - 0x1b4], esi
je 0x40c3d6
cmp dword [ebp - 0x1b0], esi
je 0x40c3d6
cmp eax, esi
je 0x40c3d6
lea eax, [ebp - 0x1bc]
push eax
push 0x4000000
push 3
pop edi
push edi
push 0x40fc1c
push 0x40fc20
push dword [ebp - 0x218]
lea eax, [ebp - 0x198]
push eax
mov eax, dword [ebp - 0x1a4]
push dword [eax]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x1bc], eax
cmp eax, esi
jne 0x40c3fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x40c3e9
lea eax, [ebp - 0x1bc]
call fcn.0040c62a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040cc2c
leave
ret 0x10
push 0xffffffffffffffff
push dword [ebp - 0x1b4]
call ebx
mov eax, dword [ebp - 0x1bc]
cmp eax, esi
je 0x40c3d6
lea ecx, [ebp - 0x1bc]
push ecx
push 0x84000000
push esi
push esi
push esi
push dword [ebp - 0x19c]
mov dword [ebp - 0x1a8], edi
push 0x40fc2c
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x1b8], eax
cmp eax, esi
jne 0x40c448
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40c3cb
push 0x1770
push dword [ebp - 0x1b4]
call ebx
mov dword [ebp - 0x1a8], 4
cmp dword [ebp - 0x1b8], esi
je 0x40c3d6
push dword [ebp + 0xc]
push dword [ebp - 0x1cc]
push esi
push esi
push dword [ebp - 0x1b8]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x40c48a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40c3cb
push 0xffffffffffffffff
push dword [ebp - 0x1ac]
call ebx
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x1c4]
dec eax
mov dword [ebp - 0x1a0], esi
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x1a4], edx
push 0xa
pop ecx
xor eax, eax
lea edi, [ebp - 0x1f4]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x19c]
lea ecx, [ebp - 0x1dc]
push ecx
push eax
push edx
push dword [ebp - 0x1b8]
mov dword [ebp - 0x1f4], 0x28
mov dword [ebp - 0x1e0], edx
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x1a8], 5
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40c517
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40c3cb
push 0xffffffffffffffff
push dword [ebp - 0x1ac]
call ebx
cmp dword [ebp - 0x1a0], esi
jne 0x40c5c3
cmp dword [ebp - 0x1dc], esi
je 0x40c5c3
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push esi
lea eax, [ebp - 0x1c0]
push eax
lea eax, [ebp - 0x1c8]
push eax
push 0x20000013
push dword [ebp - 0x1b8]
mov dword [ebp - 0x1c0], 4
call edi
test eax, eax
je 0x40c3cb
cmp dword [ebp - 0x1c8], 0xc8
jb 0x40c3cb
cmp dword [ebp - 0x1c8], 0x12b
ja 0x40c3cb
push esi
lea eax, [ebp - 0x1c0]
push eax
lea eax, [ebp - 0x1a0]
push eax
push 0x20000005
push dword [ebp - 0x1b8]
mov dword [ebp - 0x1c0], 4
call edi
test eax, eax
je 0x40c3cb
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebp - 0x1a0]
jge 0x40c5c3
dec eax
mov dword [ebp - 0x1a0], eax
mov eax, dword [ebp - 0x1dc]
add dword [ebp - 0x1a4], eax
sub dword [ebp - 0x19c], eax
cmp eax, esi
je 0x40c5e1
cmp dword [ebp - 0x19c], esi
ja 0x40c5eb
mov dword [ebp - 0x1a8], 0x10000
cmp dword [ebp - 0x1a8], 0x10000
je 0x40c602
mov edx, dword [ebp - 0x1a4]
jmp 0x40c4b0
lea eax, [ebp - 0x1bc]
call fcn.0040c62a
mov ecx, dword [ebp - 0x1a0]
mov edi, dword [ebp - 0x1c4]
xor eax, eax
lea edi, [edi + ecx]
stosb byte es:[edi], al
mov eax, dword [ebp - 0x1a0]
jmp 0x40c3d8