Function at 0x40bdcf
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, 0x640
mov eax, dword [0x417018]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x5a8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x5c8], eax
xor eax, eax
push esi
push edi
xor esi, esi
mov dword [ebp - 0x5c4], esi
lea edi, [ebp - 0x5c0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [0x40fb98]
mov dword [ebp - 0x10], eax
mov eax, dword [0x40fb9c]
mov dword [ebp - 0x5cc], ecx
mov ebx, edx
mov dword [ebp - 0xc], eax
cmp dword [ecx], esi
jne 0x40be2f
xor eax, eax
jmp 0x40c22a
push 0x3c
pop edi
push edi
lea eax, [ebp - 0x63c]
push esi
push eax
call sub.MSVCR100.dll_memset
xor eax, eax
add esp, 0xc
inc eax
mov dword [ebp - 0x628], eax
mov dword [ebp - 0x60c], eax
mov eax, ebx
mov dword [ebp - 0x63c], edi
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, si
jne 0x40be5d
sub eax, ecx
lea ecx, [ebp - 0x63c]
push ecx
push esi
sar eax, 1
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x40be28
push dword [ebp - 0x62c]
mov ebx, dword [ebp - 0x628]
lea eax, [ebp - 0x1a4]
call fcn.0040bb9c
mov ecx, dword [ebp - 0x628]
mov ebx, dword [ebp - 0x610]
push 6
xor eax, eax
mov word [ebp + ecx*2 - 0x1a4], ax
pop ecx
push esi
push esi
lea edi, [ebp - 0x5c4]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push esi
push esi
mov dword [ebp - 0x5b0], 2
call edi
push esi
push esi
push esi
push esi
mov dword [ebp - 0x5bc], eax
call edi
push esi
push esi
push esi
push esi
mov dword [ebp - 0x5b8], eax
call edi
mov dword [ebp - 0x5b4], eax
lea eax, [ebp - 0x5c4]
push eax
push 0x4000000
push 3
pop edi
push edi
push 0x40fc00
push 0x40fc04
push dword [ebp - 0x624]
lea eax, [ebp - 0x1a4]
push eax
mov eax, dword [ebp - 0x5cc]
push dword [eax]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x5c4], eax
cmp eax, esi
jne 0x40bf56
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x40bf48
lea eax, [ebp - 0x5c4]
call fcn.0040c62a
jmp 0x40be28
push 0xffffffffffffffff
push dword [ebp - 0x5bc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x5c4]
push eax
push 0x84000000
push esi
push esi
push esi
push ebx
push 0x40fc10
push dword [ebp - 0x5c4]
mov dword [ebp - 0x5b0], edi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x5c0], eax
cmp eax, esi
jne 0x40bfa2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40bf38
push 0xffffffffffffffff
push dword [ebp - 0x5b8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x5b0], 4
cmp dword [ebp - 0x5c0], esi
je 0x40be28
push dword [ebp + 0xc]
push dword [ebp - 0x5a8]
push esi
push esi
push dword [ebp - 0x5c0]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x40bfe4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40bf38
push 0xffffffffffffffff
push dword [ebp - 0x5b4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x5c8]
mov dword [ebp - 0x5ac], esi
mov dword [ebp - 0x5a8], esi
mov dword [eax], esi
xor ebx, ebx
push 0xa
xor eax, eax
pop ecx
lea edi, [ebp - 0x600]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x600], 0x28
cmp dword [ebp - 0x5ac], esi
jne 0x40c03f
lea eax, [ebp - 0x5a4]
mov dword [ebp - 0x5ec], eax
mov dword [ebp - 0x5e8], 0x200
jmp 0x40c051
mov eax, dword [ebp - 0x5a8]
mov dword [ebp - 0x5ec], ebx
mov dword [ebp - 0x5e8], eax
lea eax, [ebp - 0x5e8]
push eax
push dword [ebp - 0x5e8]
mov dword [ebp - 0x5b0], 5
push dword [ebp - 0x5ec]
push dword [ebp - 0x5c0]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40c09d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40c23b
push 0xffffffffffffffff
push dword [ebp - 0x5b4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp - 0x5ac], esi
jne 0x40c1cd
cmp dword [ebp - 0x5e8], esi
je 0x40c1cd
mov edi, dword [ebp - 0x5c8]
mov eax, dword [edi]
cmp eax, esi
je 0x40c0c9
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push esi
lea eax, [ebp - 0x5d0]
push eax
lea eax, [ebp - 0x5d4]
push eax
push 0x20000013
push dword [ebp - 0x5c0]
mov dword [edi], esi
mov dword [ebp - 0x5d0], 4
call ebx
test eax, eax
je 0x40bf38
cmp dword [ebp - 0x5d4], 0xc8
jb 0x40bf38
cmp dword [ebp - 0x5d4], 0x12b
ja 0x40bf38
push esi
lea eax, [ebp - 0x5d0]
push eax
lea eax, [ebp - 0x5ac]
push eax
push 0x20000005
push dword [ebp - 0x5c0]
mov dword [ebp - 0x5d0], 4
call ebx
test eax, eax
je 0x40bf38
mov eax, dword [ebp - 0x5ac]
mov dword [ebp - 0x5a8], eax
inc eax
push eax
call fcn.0040cb55
mov ebx, eax
pop ecx
cmp ebx, esi
je 0x40bf38
mov eax, dword [ebp - 0x5cc]
mov dword [edi], ebx
mov edi, dword [eax + 4]
lea eax, [ebp - 0x5d8]
push eax
push dword [edi + 4]
mov dword [ebp - 0x5d8], ebx
push edi
call fcn.0040c739
mov ecx, dword [ebp - 0x5cc]
mov ecx, dword [ecx + 8]
mov edx, 0x3ffffffe
sub edx, ecx
cmp edx, 1
jb 0x40c256
mov edx, dword [ebp - 0x5cc]
inc ecx
mov dword [edx + 8], ecx
mov dword [edi + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
push dword [ebp - 0x5e8]
lea eax, [ebp - 0x5a4]
push eax
push ebx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x5e8]
sub dword [ebp - 0x5a8], eax
add ebx, eax
cmp eax, esi
je 0x40c1e7
cmp dword [ebp - 0x5a8], esi
ja 0x40c1f1
mov dword [ebp - 0x5b0], 0x10000
cmp dword [ebp - 0x5b0], 0x10000
jne 0x40c008
mov eax, dword [ebp - 0x5c8]
mov ecx, dword [eax]
cmp ecx, esi
je 0x40c219
mov edx, dword [ebp - 0x5ac]
xor eax, eax
lea edi, [ecx + edx]
stosb byte es:[edi], al
lea eax, [ebp - 0x5c4]
call fcn.0040c62a
mov eax, dword [ebp - 0x5ac]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040cc2c
leave
ret 0xc
mov edi, dword [ebp - 0x5c8]
mov eax, dword [edi]
cmp eax, esi
je 0x40c24f
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
pop ecx
mov dword [edi], esi
jmp 0x40bf38
push str.list_T__too_long
call dword [sym.imp.MSVCP100.dll_void___cdecl_std::_Xlength_error_char_const__]
int3