Function at 0x401bd0
Capabilities:
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
Write file on windows

Disassembly:
mov eax, 0x24f8
call fcn.00412d60
mov eax, dword [0x42b0e0]
xor eax, esp
mov dword [esp + 0x24f4], eax
push esi
push edi
xor eax, eax
push 0x1fe
mov esi, ecx
push eax
lea ecx, [esp + 0x276]
mov edi, edx
push ecx
mov dword [esp + 0x38], edi
mov word [esp + 0x278], ax
call fcn.00412bb0
xor edx, edx
push 0xfe
push edx
lea eax, [esp + 0x182]
push eax
mov word [esp + 0x184], dx
call fcn.00412bb0
xor ecx, ecx
push 0xfe
push ecx
lea edx, [esp + 0x8e]
push edx
mov word [esp + 0x90], cx
call fcn.00412bb0
xor eax, eax
push 0x1046
push eax
lea ecx, [esp + 0x14e2]
push ecx
mov word [esp + 0x14e4], ax
call fcn.00412bb0
push 0x38
lea edx, [esp + 0x68]
push 0
push edx
call fcn.00412bb0
lea eax, [esp + 0x2a8]
mov dword [esp + 0x7c], eax
mov eax, 0x80
mov dword [esp + 0x8c], eax
mov dword [esp + 0x94], eax
add esp, 0x3c
lea ecx, [esp + 0x16c]
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14b4]
mov dword [esp + 0x30], 0x3c
mov dword [esp + 0x44], 0x100
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x54], edx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], 0x824
test esi, esi
je 0x40204f
test edi, edi
je 0x40204f
lea ecx, [esp + 0x30]
push ecx
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
mov eax, dword [esp + 0x3c]
je 0x401cf8
cmp eax, 3
je 0x401d18
cmp eax, 4
je 0x401d18
xor esi, esi
pop edi
mov eax, esi
pop esi
mov ecx, dword [esp + 0x24f4]
xor ecx, esp
call fcn.00411161
add esp, 0x24f8
ret
mov dword [esp + 8], connect
cmp eax, 4
jne 0x401d2d
mov dword [esp + 8], 0x80800000
push 0
push 0
push 0
push 0
push str.Beacon
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [esp + 0x20], edi
test edi, edi
jne 0x401d51
xor esi, esi
jmp 0x40202b
mov ecx, dword [esp + 0x48]
push ebx
push 0
push 0
push 3
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x180]
push eax
push ecx
lea edx, [esp + 0x288]
push edx
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x401d8a
xor esi, esi
jmp 0x40201f
xor eax, eax
push 0x1046
push eax
lea ecx, [esp + 0x47a]
push ecx
mov word [esp + 0x47c], ax
call fcn.00412bb0
add esp, 0xc
cmp dword [esp + 0x64], 0
lea eax, [esp + 0x470]
mov edx, 0x824
mov ecx, eax
je 0x401de5
mov esi, dword [esp + 0x60]
sub esi, ecx
lea ecx, [edx + 0x7ffff7da]
test ecx, ecx
je 0x401e10
movzx ecx, word [esi + eax]
test cx, cx
je 0x401e10
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x401dc5
jmp 0x401e14
mov esi, 0x426d6c
sub esi, ecx
lea esp, [esp]
lea ecx, [edx + 0x7ffff7da]
test ecx, ecx
je 0x401e10
movzx ecx, word [esi + eax]
test cx, cx
je 0x401e10
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x401df0
jmp 0x401e14
test edx, edx
jne 0x401e17
sub eax, 2
push ebp
mov ebp, dword [sym.imp.WININET.dll_HttpOpenRequestW]
xor edx, edx
push edx
mov word [eax], dx
mov eax, dword [esp + 0x14]
push eax
push edx
push 0x426db0
push 0x426d70
lea ecx, [esp + 0x488]
push ecx
push str.HEAD
push ebx
call ebp
mov ebx, eax
mov edi, ebx
mov dword [esp + 0x24], ebx
call fcn.00401b30
mov esi, eax
test esi, esi
je 0x40200b
push 0
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x24]
push eax
push 0x20000005
push ebx
mov dword [esp + 0x30], 0
mov dword [esp + 0x40], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x401e98
cmp dword [esp + 0x1c], 0x3e800000
jbe 0x401e98
xor esi, esi
jmp 0x40200b
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push 0
push ecx
push 0
push 0x426db0
push 0x426d70
lea edx, [esp + 0x488]
push edx
push 0x426d90
push eax
call ebp
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [esp + 0x24]
push ecx
mov edi, eax
push 5
push edi
mov dword [esp + 0x30], 0x2bf20
call esi
push 4
lea edx, [esp + 0x24]
push edx
push 6
push edi
call esi
call fcn.00401b30
mov esi, eax
test esi, esi
je 0x402000
mov eax, dword [esp + 0x34]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401f21
xor esi, esi
jmp 0x402000
push 0x42cde0
push 0x80000
call fcn.00411f37
mov ebx, eax
xor esi, esi
add esp, 8
cmp ebx, esi
je 0x401fe1
push 0x80000
push esi
push ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x20], esi
call fcn.00412bb0
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push 0x80000
push ebx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov esi, eax
test esi, esi
je 0x401fe1
mov eax, dword [esp + 0x14]
xor esi, esi
test eax, eax
jbe 0x401f9e
add dword [esp + 0x10], eax
push esi
lea edx, [esp + 0x34]
push edx
push eax
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
test esi, esi
je 0x401fe1
push ebp
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
jmp 0x401fa0
je 0x401fd2
push 0x80000
push 0
push ebx
mov dword [esp + 0x20], 0
call fcn.00412bb0
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0x80000
push ebx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov esi, eax
test esi, esi
jne 0x401f72
jmp 0x401fe1
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x1c]
jne 0x401fe1
mov esi, 1
push ebp
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x401ffc
push ebx
call fcn.004119f3
add esp, 4
mov ebx, dword [esp + 0x24]
test edi, edi
je 0x40200b
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop ebp
test ebx, ebx
je 0x402017
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
test ebx, ebx
je 0x40202a
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop ebx
test edi, edi
je 0x402036
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
mov eax, esi
pop esi
mov ecx, dword [esp + 0x24f4]
xor ecx, esp
call fcn.00411161
add esp, 0x24f8
ret
mov ecx, dword [esp + 0x24fc]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.00411161
add esp, 0x24f8
ret