Function at 0x424140
Capabilities:
Check http status code
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48e0ed
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x911c
call fcn.0046bef0
mov eax, dword [0x4aff50]
push ebx
mov dword [esp + 0x911c], eax
mov dword [esp + 0xc], ecx
xor eax, eax
push esi
mov ecx, 0xf
push edi
mov dword [esp + 0x11c], ecx
mov dword [esp + 0x118], eax
mov byte [esp + 0x108], al
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x9134], eax
mov dword [esp + 0x38], eax
mov byte [esp + 0x28], al
mov eax, esi
mov dword [esp + 0x3c], ecx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4241b0
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x2c]
call fcn.00404760
lea eax, [esp + 0x104]
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x913c], 1
call fcn.00407bd0
add esp, 8
test al, al
mov edi, 0x10
sete bl
cmp dword [esp + 0x3c], edi
mov byte [esp + 0x9134], 0
jb 0x424208
mov edx, dword [esp + 0x28]
push edx
call fcn.004826a1
add esp, 4
test bl, bl
je 0x424226
cmp dword [esp + 0x11c], edi
jb 0x42476c
mov eax, dword [esp + 0x108]
push eax
jmp 0x424764
cmp dword [esp + 0x11c], edi
mov eax, dword [esp + 0x108]
jae 0x42423d
lea eax, [esp + 0x108]
push eax
call fcn.00418db0
add esp, 4
test al, al
je 0x424753
mov edx, dword [ebp + 8]
xor ebx, ebx
mov eax, edx
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x424268
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x2c]
call fcn.00404760
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0xec]
push eax
mov byte [esp + 0x913c], 2
call fcn.00424d50
add esp, 8
cmp dword [esp + 0x3c], edi
mov byte [esp + 0x9134], 4
jb 0x4242b6
mov ecx, dword [esp + 0x28]
push ecx
call fcn.004826a1
add esp, 4
mov eax, dword [esp + 0x100]
cmp eax, edi
mov edx, dword [esp + 0xec]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], 0
mov byte [esp + 0xf], 0x2f
mov byte [esp + 0xe], 0x5c
mov ecx, edx
jae 0x4242ec
lea ecx, [esp + 0xec]
mov esi, dword [esp + 0xfc]
add ecx, esi
cmp eax, edi
mov eax, edx
jae 0x424302
lea eax, [esp + 0xec]
lea edx, [esp + 0xf]
push edx
lea edx, [esp + 0x12]
push edx
push ecx
push eax
call fcn.004249a0
mov eax, dword [esp + 0xfc]
add esp, 0x10
cmp dword [esp + 0x100], edi
jae 0x42432d
lea eax, [esp + 0xec]
push 1
push 0x84000010
push ebx
push ebx
push eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
je 0x424628
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x424374
cmp dword [esp + 0x100], edi
mov eax, dword [esp + 0xec]
jae 0x42436c
lea eax, [esp + 0xec]
mov edx, dword [ebx]
push eax
mov ecx, ebx
call dword [edx + 4]
mov dword [esp + 0x20], esi
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push 0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x20000013
push esi
mov byte [esp + 0x9148], 5
mov dword [esp + 0x2c], 0
mov dword [esp + 0x58], 4
call edi
test eax, eax
jne 0x4243f1
cmp dword [esp + 0x100], 0x10
mov edi, dword [esp + 0xec]
jae 0x4243c6
lea edi, [esp + 0xec]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041bed0
add esp, 4
push eax
push edi
push str.HttpQueryInfo_failed__url_s__msg_s
push 1
call fcn.00409700
push eax
call fcn.0041a2e0
add esp, 0x14
jmp 0x424516
mov ecx, dword [esp + 0x18]
cmp ecx, 0xc8
je 0x42441e
cmp dword [esp + 0x100], 0x10
mov eax, dword [esp + 0xec]
jae 0x424415
lea eax, [esp + 0xec]
push ecx
push eax
push str.InternetOpenUrl_failed__url_s__scode_d
jmp 0x4243dc
push 0
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x24]
push eax
push 0x20000005
push esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x54], 4
call edi
test eax, eax
jne 0x424470
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041bed0
add esp, 4
push eax
push str.HttpQueryInfo_CONTENT_LENGTH_failed___s
push 1
call fcn.00409700
push eax
call fcn.0041a2e0
add esp, 0x10
jmp 0x424516
test ebx, ebx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], 0
je 0x4244a9
cmp dword [esp + 0x100], 0x10
mov eax, dword [esp + 0xec]
jae 0x42449c
lea eax, [esp + 0xec]
mov edx, dword [ebx]
lea ecx, [esp + 0x48]
push ecx
push eax
mov ecx, ebx
call dword [edx + 8]
mov edi, dword [ebp + 0xc]
push 1
push 0x1b6
push 0x32
push edi
lea ecx, [esp + 0x60]
call fcn.00409b00
mov edx, dword [esp + 0x50]
mov eax, dword [edx + 4]
test byte [esp + eax + 0x58], 6
mov byte [esp + 0x9134], 6
je 0x42453a
push edi
push str.Cant_create_file___s
push 1
call fcn.00409700
push eax
call fcn.0041a2e0
add esp, 0x10
lea ecx, [esp + 0xb0]
mov byte [esp + 0x9134], 5
call fcn.00409c40
lea ecx, [esp + 0xb0]
mov dword [esp + 0xb0], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
call fcn.0047d779
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0xe8]
call fcn.004036e0
lea ecx, [esp + 0x104]
call fcn.004036e0
jmp 0x42476c
mov byte [esp + 0x1120], 0
xor eax, eax
mov ecx, 0x1fff
lea edi, [esp + 0x1121]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [esp + 0x10], 0
lea ecx, [esp + 0x10]
push ecx
push 0x8000
lea edx, [esp + 0x1128]
push edx
push esi
call edi
test eax, eax
je 0x4245ce
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4245ce
push eax
lea eax, [esp + 0x1124]
push eax
lea ecx, [esp + 0x58]
call fcn.00415800
test ebx, ebx
je 0x4245c7
cmp dword [esp + 0x100], 0x10
mov eax, dword [esp + 0xec]
jae 0x4245b2
lea eax, [esp + 0xec]
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx]
push ecx
lea ecx, [esp + 0x1124]
push ecx
push eax
mov ecx, ebx
call dword [edx + 0xc]
cmp dword [esp + 0x10], 0
jne 0x424563
lea ecx, [esp + 0x50]
call fcn.00418f90
lea ecx, [esp + 0xb0]
mov byte [esp + 0x9134], 5
call fcn.00409c40
lea ecx, [esp + 0xb0]
mov dword [esp + 0xb0], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
call fcn.0047d779
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0xe8]
call fcn.004036e0
lea ecx, [esp + 0x104]
call fcn.004036e0
mov al, 1
jmp 0x42476e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2ee3
jne 0x4246e9
xor eax, eax
mov byte [esp + 0x120], 0
mov ecx, 0x3ff
lea edi, [esp + 0x121]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x14]
stosb byte es:[edi], al
push edx
lea eax, [esp + 0x124]
push eax
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], 0x1000
call dword [sym.imp.WININET.dll_InternetGetLastResponseInfoA]
test eax, eax
je 0x4246bb
cmp dword [esp + 0x100], 0x10
mov eax, dword [esp + 0xec]
jae 0x424694
lea eax, [esp + 0xec]
lea edx, [esp + 0x120]
push edx
push eax
push 0x495340
push 1
call fcn.00409700
push eax
call fcn.0041a2e0
add esp, 0x14
mov edi, 0x10
xor ebx, ebx
jmp 0x424720
cmp dword [esp + 0x100], 0x10
mov esi, dword [esp + 0xec]
jae 0x4246d3
lea esi, [esp + 0xec]
push 0x2ee3
call fcn.0041bed0
add esp, 4
push eax
push esi
push 0x495368
jmp 0x4246a2
cmp dword [esp + 0x100], edi
mov esi, dword [esp + 0xec]
jae 0x424700
lea esi, [esp + 0xec]
push eax
call fcn.0041bed0
add esp, 4
push eax
push esi
push str.InternetOpenUrl_failed__url_s__msg_s
push 1
call fcn.00409700
push eax
call fcn.0041a2e0
add esp, 0x14
cmp dword [esp + 0x100], edi
jb 0x424739
mov eax, dword [esp + 0xec]
push eax
call fcn.004826a1
add esp, 4
mov dword [esp + 0x100], 0xf
mov dword [esp + 0xfc], ebx
mov byte [esp + 0xec], 0
cmp dword [esp + 0x11c], edi
jb 0x42476c
mov ecx, dword [esp + 0x108]
push ecx
call fcn.004826a1
add esp, 4
xor al, al
mov ecx, dword [esp + 0x912c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x9124]
call fcn.0046bf5e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10