Function at 0x4207b0
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x251c
call fcn.004b4380
mov eax, dword [0x50bd24]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x24b8], 0
push 0x200
lea eax, [ebp - 0x424]
mov dword [ebp - 0x24d0], 0
push ebx
push eax
mov edi, ecx
mov dword [ebp - 0x24bc], 0
mov dword [ebp - 0x24cc], 0
mov dword [ebp - 0x24c4], ebx
mov dword [ebp - 0x24e0], ebx
mov dword [ebp - 0x24c8], ebx
call fcn.004b5de0
push 0x100
lea eax, [ebp - 0x224]
push ebx
push eax
call fcn.004b5de0
push 0x100
lea eax, [ebp - 0x124]
push ebx
push eax
call fcn.004b5de0
push 0x1048
lea eax, [ebp - 0x24b4]
push ebx
push eax
call fcn.004b5de0
push 0x1048
lea eax, [ebp - 0x146c]
push ebx
push eax
call fcn.004b5de0
lea eax, [ebp - 0x424]
mov dword [ebp - 0x2510], ebx
mov dword [ebp - 0x250c], eax
xorps xmm0, xmm0
lea eax, [ebp - 0x224]
movlpd qword [ebp - 0x2518], xmm0
mov dword [ebp - 0x2500], eax
add esp, 0x3c
cmp dword [edi + 0x80], 8
lea eax, [ebp - 0x124]
mov dword [ebp - 0x24f8], eax
lea eax, [ebp - 0x24b4]
mov dword [ebp - 0x24f0], eax
lea eax, [edi + 0x6c]
mov dword [ebp - 0x2504], ebx
movlpd qword [ebp - 0x24e8], xmm0
mov dword [ebp - 0x251c], 0x3c
mov dword [ebp - 0x2508], 0x100
mov dword [ebp - 0x24fc], 0x80
mov dword [ebp - 0x24f4], 0x80
mov dword [ebp - 0x24ec], 0x824
jb 0x4208f4
mov eax, dword [eax]
lea ecx, [ebp - 0x251c]
push ecx
push 0
push 0
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x420ca8
mov eax, dword [ebp - 0x2510]
cmp eax, 3
je 0x420922
cmp eax, 4
jne 0x420ca8
push 0
push 0
push 0
push 0
push 0x4e1870
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ecx, eax
mov dword [ebp - 0x24b8], ecx
test ecx, ecx
jne 0x420949
lea esi, [eax + 2]
jmp 0x420cad
cmp dword [edi + 0x38], ebx
lea eax, [edi + 0x38]
jbe 0x4209a5
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
push eax
push 2
push ecx
call esi
push 4
lea eax, [edi + 0x38]
push eax
push 5
push dword [ebp - 0x24b8]
call esi
push 4
lea eax, [edi + 0x38]
push eax
push 6
push dword [ebp - 0x24b8]
call esi
push 4
lea eax, [edi + 0x38]
push eax
push 7
push dword [ebp - 0x24b8]
call esi
push 4
lea eax, [edi + 0x38]
push eax
push 8
push dword [ebp - 0x24b8]
call esi
mov ecx, dword [ebp - 0x24b8]
push 0
push 0
push 3
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x2504]
lea eax, [ebp - 0x424]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, eax
mov dword [ebp - 0x24d0], esi
test esi, esi
jne 0x4209e1
lea esi, [eax + 3]
jmp 0x420cad
cmp dword [ebp - 0x24ec], ebx
je 0x420a12
mov ecx, dword [ebp - 0x24f0]
lea edx, [ebp - 0x146c]
sub edx, ecx
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x420a00
jmp 0x420a1c
mov dword [ebp - 0x146c], 0x2f
cmp dword [ebp - 0x2510], 4
mov ecx, 0x80800000
push 0
mov eax, SysReAllocString
cmove eax, ecx
push eax
push 0
push 0x4e1870
push 0x4e33f0
lea eax, [ebp - 0x146c]
push eax
push str.POST
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
cmp dword [edi + 0xc8], 0x10
lea ecx, [edi + 0xb4]
mov esi, eax
mov dword [ebp - 0x24bc], esi
jb 0x420a6b
mov ecx, dword [ecx]
cmp dword [edi + 0xe0], 0x10
lea eax, [edi + 0xcc]
jb 0x420a7c
mov eax, dword [eax]
push dword [edi + 0xc4]
push ecx
push dword [edi + 0xdc]
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x420ca1
push 0
lea eax, [ebp - 0x24d4]
mov dword [ebp - 0x24c0], ebx
push eax
lea eax, [ebp - 0x24c0]
mov dword [ebp - 0x24d4], 4
push eax
push 0x20000013
push esi
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
call esi
test eax, eax
je 0x420c9a
cmp dword [ebp - 0x24c0], 0xc8
je 0x420ae5
mov esi, 4
jmp 0x420cad
push 0
lea eax, [ebp - 0x24d8]
mov dword [ebp - 0x24d8], 0x10
push eax
lea eax, [ebp - 0x24]
xorps xmm0, xmm0
push eax
push 0x3f
push dword [ebp - 0x24bc]
movups xmmword [ebp - 0x24], xmm0
movups xmmword [ebp - 0x14], xmm0
call esi
test eax, eax
je 0x420b2a
lea eax, [ebp - 0x24]
push str.chunked
push eax
call fcn.004c2644
add esp, 8
test eax, eax
je 0x420b73
push 0
lea eax, [ebp - 0x24dc]
mov dword [ebp - 0x24dc], 4
push eax
lea eax, [ebp - 0x24c8]
push eax
push 0x20000005
push dword [ebp - 0x24bc]
call esi
test eax, eax
jne 0x420b5d
lea esi, [eax + 5]
jmp 0x420cad
cmp dword [ebp - 0x24c8], 0x3e800000
jbe 0x420b73
mov esi, 6
jmp 0x420cad
cmp dword [edi + 0x64], ebx
jbe 0x420bb1
cmp dword [edi + 0x68], 8
lea eax, [edi + 0x54]
jb 0x420b83
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24cc], eax
cmp eax, 0xffffffff
jne 0x420bb1
mov esi, 9
jmp 0x420cc3
push 0x2800
call fcn.004b4085
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x420bcc
lea esi, [eax + 0xa]
jmp 0x420c8d
xor esi, esi
mov dword [ebp - 0x24c0], esi
push 0x2800
push 0
push ebx
mov dword [ebp - 0x24c4], 0
call fcn.004b5de0
add esp, 0xc
lea eax, [ebp - 0x24c4]
push eax
push 0x2800
push ebx
push dword [ebp - 0x24bc]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x420bd4
mov eax, dword [ebp - 0x24c4]
test eax, eax
je 0x420c8b
add esi, eax
cmp dword [edi + 0x64], 0
jbe 0x420c3d
push 0
lea ecx, [ebp - 0x24e0]
push ecx
push eax
push ebx
push dword [ebp - 0x24cc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x420c47
lea esi, [eax + 0xb]
jmp 0x420c8d
push eax
push ebx
lea ecx, [edi + 0x3c]
call fcn.004078b0
mov ecx, dword [ebp - 0x24c8]
test ecx, ecx
je 0x420bd4
imul eax, esi, 0x64
xor edx, edx
div ecx
mov ecx, 0x64
cmp eax, 0x64
cmova eax, ecx
cmp eax, dword [ebp - 0x24c0]
je 0x420bd4
push 0
push eax
push 0x659
push dword [edi + 4]
mov dword [ebp - 0x24c0], eax
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x420bd4
xor esi, esi
mov eax, dword [ebp - 0x24cc]
cmp eax, 0xffffffff
je 0x420cb6
jmp 0x420caf
mov esi, 7
jmp 0x420cad
mov esi, 8
jmp 0x420cad
mov esi, 1
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x420cc3
push ebx
call fcn.004b408e
add esp, 4
mov eax, dword [ebp - 0x24bc]
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x420cd6
push eax
call ebx
mov eax, dword [ebp - 0x24d0]
test eax, eax
je 0x420ce3
push eax
call ebx
mov eax, dword [ebp - 0x24b8]
test eax, eax
je 0x420cf0
push eax
call ebx
push 0
push esi
push 0x65a
push dword [edi + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b42e4
mov esp, ebp
pop ebp
ret