Function at 0x4020d0
Capabilities:
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42369d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x42f040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], edx
push 0
push 0
push 0
push 1
push str.User_Agent
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 4
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [ebp - 0x58], esi
test esi, esi
jne 0x402156
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.InternetOpen_failed._Error:
call fcn.004040b0
mov ecx, eax
call fcn.00402630
push eax
call fcn.00404370
add esp, 4
xor eax, eax
jmp 0x402438
push 0
push 0x80000000
push 0
push 0
push str.http:__127.0.0.1:8000_1.png
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x4021a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.InternetOpenUrlA_failed._Error:
call fcn.004040b0
mov ecx, eax
call fcn.00402630
push eax
call fcn.00404370
add esp, 4
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x402438
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x28]
push ecx
push 0x20000005
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov eax, dword [ebp - 0x28]
xor edi, edi
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
xor ecx, ecx
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x38], edi
lea esi, [eax + 1]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ecx
test esi, esi
je 0x40224e
cmp esi, 0x7fffffff
ja 0x402453
cmp esi, 0x1000
jb 0x402222
lea eax, [esi + 0x23]
cmp eax, esi
jbe 0x402458
push eax
call fcn.00407814
add esp, 4
test eax, eax
je 0x40245d
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [ebp - 0x38], edi
mov dword [edi - 4], eax
jmp 0x402230
push esi
call fcn.00407814
add esp, 4
mov dword [ebp - 0x38], eax
mov edi, eax
push esi
lea eax, [edi + esi]
mov dword [ebp - 0x1c], edi
push 0
push edi
mov dword [ebp - 0x14], eax
call fcn.004093c0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
push ecx
push eax
push edi
push dword [ebp - 0x3c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40228e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.InternetReadFile_failed._Error:
call fcn.004040b0
mov ecx, eax
call fcn.00402630
push eax
call fcn.00404370
add esp, 4
jmp 0x4023f4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4023f4
mov ecx, dword [ebp - 0x30]
mov byte [edi + eax], 0
mov esi, dword [ebp - 0x2c]
shr esi, 1
mov edx, dword [ecx + 4]
mov eax, dword [ecx]
mov dword [ebp - 0x34], edx
sub edx, eax
cmp esi, edx
jae 0x40231b
add eax, esi
mov dword [ecx + 4], eax
mov esi, ecx
mov ecx, edi
mov dword [ebp - 0x44], 0
xorps xmm0, xmm0
mov dword [ebp - 0x40], 0
movups xmmword [ebp - 0x54], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4022d4
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x54]
call fcn.00404410
mov eax, dword [esi]
xor esi, esi
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x44], esi
jbe 0x4023c7
mov edi, edx
nop dword [eax]
mov edx, dword [ebp - 0x40]
lea eax, [ebp - 0x54]
cmp edx, 0xf
cmova eax, edi
mov cl, byte [eax + esi]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x402352
sub cl, 0x30
jmp 0x40236c
jbe 0x4022b8
mov eax, dword [ecx + 8]
sub eax, dword [ecx]
cmp esi, eax
jbe 0x402332
push ecx
push esi
call fcn.004055c0
mov esi, dword [ebp - 0x30]
jmp 0x4022ba
sub esi, edx
push esi
push 0
push dword [ebp - 0x34]
call fcn.004093c0
mov eax, dword [ebp - 0x34]
add esp, 0xc
add eax, esi
mov esi, dword [ebp - 0x30]
mov dword [esi + 4], eax
jmp 0x4022ba
lea eax, [ecx - 0x61]
cmp al, 5
ja 0x40235e
sub cl, 0x57
jmp 0x40236c
lea eax, [ecx - 0x41]
cmp al, 5
ja 0x40236a
sub cl, 0x37
jmp 0x40236c
xor cl, cl
cmp edx, 0xf
lea eax, [ebp - 0x54]
cmova eax, edi
mov dl, byte [eax + esi + 1]
lea eax, [edx - 0x30]
cmp al, 9
ja 0x402385
sub dl, 0x30
jmp 0x40239f
lea eax, [edx - 0x61]
cmp al, 5
ja 0x402391
sub dl, 0x57
jmp 0x40239f
lea eax, [edx - 0x41]
cmp al, 5
ja 0x40239d
sub dl, 0x37
jmp 0x40239f
xor dl, dl
shl cl, 4
add cl, dl
mov eax, esi
test eax, eax
jns 0x4023ad
add eax, 1
sar eax, 1
mov edx, dword [ebp - 0x34]
add esi, 2
mov byte [eax + edx], cl
cmp esi, dword [ebp - 0x44]
jb 0x402300
mov edi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x40]
cmp ecx, 0xf
jbe 0x4023f4
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4023ea
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40245d
push ecx
push edx
call fcn.00407844
add esp, 8
push dword [ebp - 0x3c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x58]
call esi
mov esi, dword [ebp - 0x2c]
shr esi, 1
test edi, edi
je 0x402436
mov ecx, dword [ebp - 0x14]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x40242c
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40245d
push ecx
push edi
call fcn.00407844
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00407801
mov esp, ebp
pop ebp
ret
call fcn.00405580
call fcn.00401240
call fcn.0040e2d3
int3