Function at 0x402ec0
Capabilities:
Check http status code
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40de0a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2588
call fcn.004066d0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
push 0x2001
call fcn.004055ad
mov esi, eax
mov ecx, 0x800
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x14]
xor ebx, ebx
add esp, 4
cmp eax, ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], 0x2001
je 0x402f1c
mov dword [eax], ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4032fe
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4032fe
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
test esi, esi
mov dword [ebp - 0x28], esi
jne 0x402f64
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402f6d
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
lea ecx, [ebp - 0x24]
push 4
push ecx
push 2
push esi
mov dword [ebp - 0x24], eax
call edi
lea edx, [ebp - 0x24]
push 4
push edx
push 6
push esi
mov dword [ebp - 0x24], 0xea60
call edi
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x297]
mov byte [ebp - 0x298], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x298]
push 0x30
push eax
push str.1ce99441f7a617a85d0db33e34fd9a52b87748f1a556c75830fdb34dfba646bf6f14c15c0ff5ac55039f5dfda156fa7b0be39435dc6225c67329b99b5808a95f12b911ea9b12d27624d9694811b35905b96ad08025d28818d19c3ef88328d59336c67f4aeca631d68343e4742df89a54cb994dfe7735db8831e28e34e58837e19038ec7c3500a25cd3a155067f3de39539e99143e99b48d8915cfeb82ffdb162db983fec9547ed9f45f592
call fcn.00403fb0
mov edi, dword [ebp + 8]
add esp, 0xc
lea ecx, [ebp - 0x498]
push 0x100
push ecx
push edi
call fcn.00404740
add esp, 0xc
lea edx, [ebp - 0x598]
push 0x100
push edx
push edi
call fcn.004043c0
add esp, 0xc
test eax, eax
push 1
je 0x4030b0
lea eax, [ebp - 0x598]
lea ecx, [ebp - 0x498]
push eax
push ecx
push edi
call fcn.00404640
mov dword [ebp + 8], eax
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x397]
mov byte [ebp - 0x398], 0
add esp, 0x10
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [ebp - 0x398]
push 0x30
push edx
push str.57bcec0a2650608a6f72d7001d361d2f4c5fcaa39bf63a5b795c5f81ec
stosb byte es:[edi], al
call fcn.00403fb0
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0xc
lea eax, [ebp - 0x498]
lea ecx, [ebp - 0x498]
push eax
lea edx, [ebp - 0x398]
push ecx
lea eax, [ebp - 0x298]
push edx
push eax
call edi
lea ecx, [ebp + eax - 0x298]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 0x298]
push 1
push 0x80000002
push edx
call edi
mov ecx, dword [ebp + 8]
push eax
lea eax, [ebp - 0x298]
push eax
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edx, dword [ebp + 8]
mov edi, eax
push edx
mov dword [ebp - 0x18], edi
call fcn.004055a2
add esp, 4
jmp 0x4030d7
lea eax, [ebp - 0x298]
push 0x80000002
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x298]
push eax
push ecx
push edi
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 0x18], eax
mov edi, eax
test edi, edi
jne 0x4030ff
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403139
mov dword [eax], edi
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp + 8]
push 0
lea eax, [ebp - 0x98]
push edx
push eax
push 0x13
push edi
mov dword [ebp + 8], 0x50
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40314d
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403139
mov dword [eax], 0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x98]
push ecx
call fcn.00405b45
add esp, 4
cmp eax, 0xc8
jl 0x403120
cmp eax, 0x12b
jg 0x403120
xor eax, eax
lea edx, [ebp + 8]
mov dword [ebp - 0x14], eax
mov dword [ebp + 8], eax
lea eax, [ebp + 0xc]
push edx
lea ecx, [ebp - 0x48]
push eax
push ecx
push 5
push edi
mov dword [ebp + 0xc], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4031a1
lea edx, [ebp - 0x48]
push edx
call fcn.00405b45
add esp, 4
mov dword [ebp - 0x14], eax
mov byte [ebp + 0xb], 0
mov dword [ebp + 0xc], 0
jmp 0x4031b4
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
lea eax, [ebp + 0xc]
lea ecx, [ebp - 0x2598]
push eax
push 0x2000
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4031d8
mov byte [ebp + 0xb], 1
jmp 0x403270
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x403270
mov eax, dword [ebp - 0x20]
lea edx, [ecx + ebx]
cmp edx, eax
jl 0x403236
add eax, 0x2001
push eax
mov dword [ebp - 0x20], eax
call fcn.004055ad
add esp, 4
test eax, eax
jne 0x403208
mov byte [ebp + 0xb], 1
jmp 0x403270
mov esi, dword [ebp - 0x1c]
lea ecx, [ebx + 1]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
push ecx
mov dword [ebp - 0x20], eax
call fcn.004055a2
mov ecx, dword [ebp + 0xc]
add esp, 4
mov eax, dword [ebp - 0x1c]
mov edx, ecx
lea esi, [ebp - 0x2598]
lea edi, [ebx + eax]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add ebx, dword [ebp + 0xc]
mov byte [ebx + eax], 0
mov eax, dword [ebp - 0x14]
test eax, eax
jbe 0x4031ae
cmp ebx, eax
jl 0x4031ae
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403289
mov dword [eax], 0
mov al, byte [ebp + 0xb]
test al, al
jne 0x40329b
mov eax, dword [ebp - 0x14]
test eax, eax
jbe 0x4032a1
cmp ebx, eax
jge 0x4032a1
mov eax, dword [ebp - 0x1c]
mov byte [eax], 0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4032ae
mov dword [eax], 1
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret