Function at 0x403420
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, 0x24f4
call fcn.00426b60
mov eax, dword [0x458320]
xor eax, esp
mov dword [esp + 0x24f0], eax
push esi
xor eax, eax
mov esi, ecx
push 0x1fe
push eax
lea ecx, [esp + 0x26e]
push ecx
mov dword [esp + 0x10], esi
mov word [esp + 0x270], ax
call fcn.004263e0
xor edx, edx
push 0xfe
push edx
lea eax, [esp + 0x7a]
push eax
mov word [esp + 0x7c], dx
call fcn.004263e0
xor ecx, ecx
push 0xfe
push ecx
lea edx, [esp + 0x186]
push edx
mov word [esp + 0x188], cx
call fcn.004263e0
xor eax, eax
push 0x1046
push eax
lea ecx, [esp + 0x14da]
push ecx
mov word [esp + 0x14dc], ax
call fcn.004263e0
push 0x38
lea edx, [esp + 0x60]
push 0
push edx
call fcn.004263e0
lea eax, [esp + 0x2a0]
mov dword [esp + 0x74], eax
mov eax, 0x80
mov dword [esp + 0x84], eax
mov dword [esp + 0x8c], eax
add esp, 0x3c
lea ecx, [esp + 0x64]
lea edx, [esp + 0x164]
lea eax, [esp + 0x14ac]
mov dword [esp + 0x28], 0x3c
mov dword [esp + 0x3c], 0x100
mov dword [esp + 0x44], ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], 0x824
test esi, esi
je 0x40389d
push edi
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0
push str.http:__dl.360safe.com_gf_360ini.cab
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
mov eax, dword [esp + 0x38]
je 0x40353c
cmp eax, 3
je 0x40355c
cmp eax, 4
je 0x40355c
xor edi, edi
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x24f0]
xor ecx, esp
call fcn.004263ce
add esp, 0x24f4
ret
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
xor edx, edx
push ebx
cmp eax, 4
push 4
sete dl
lea eax, [esp + 0x14]
push eax
push 2
push 0
mov dword [esp + 0x20], 0x7530
mov esi, edx
call edi
push 4
lea ecx, [esp + 0x14]
push ecx
push 5
push 0
call edi
push 4
lea edx, [esp + 0x14]
push edx
push 6
push 0
call edi
push 4
lea eax, [esp + 0x14]
push eax
push 7
push 0
call edi
push 4
lea ecx, [esp + 0x14]
push ecx
push 8
push 0
call edi
push 0
push 0
push 0
push 0
push str.Beacon
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x4035da
xor edi, edi
jmp 0x403878
mov ecx, dword [esp + 0x48]
push ebp
push 0
push 0
push 3
lea edx, [esp + 0x17c]
push edx
lea eax, [esp + 0x80]
push eax
push ecx
lea edx, [esp + 0x288]
push edx
push ebx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebp, eax
mov dword [esp + 0x20], ebp
test ebp, ebp
jne 0x403616
xor edi, edi
jmp 0x40386c
xor eax, eax
push 0x1046
push eax
lea ecx, [esp + 0x47a]
push ecx
mov word [esp + 0x47c], ax
call fcn.004263e0
add esp, 0xc
cmp dword [esp + 0x64], 0
je 0x403661
mov eax, dword [esp + 0x60]
lea edx, [esp + 0x470]
sub edx, eax
lea ebx, [ebx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403650
jmp 0x403687
xor eax, eax
jmp 0x403670
movzx ecx, word [eax + 0x453194]
mov word [esp + eax + 0x470], cx
add eax, 2
test cx, cx
jne 0x403670
neg esi
sbb esi, esi
push 0
and esi, 0x800000
add esi, 0x80000000
mov ebx, esi
push ebx
push 0
push 0x4532b0
push 0x453198
lea edx, [esp + 0x484]
push edx
push str.HEAD
push ebp
mov ebp, dword [sym.imp.WININET.dll_HttpOpenRequestW]
call ebp
mov esi, eax
mov dword [esp + 0x24], eax
call fcn.00403320
mov edi, eax
test edi, edi
je 0x403855
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0x20000005
mov edx, esi
push edx
mov dword [esp + 0x30], 0
mov dword [esp + 0x40], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x403712
cmp dword [esp + 0x1c], 0x3e800000
jbe 0x403712
xor edi, edi
jmp 0x403855
mov ecx, dword [esp + 0x20]
push 0
push ebx
push 0
push 0x4532b0
push 0x453198
lea eax, [esp + 0x484]
push eax
push 0x4531b8
push ecx
call ebp
mov ebp, eax
mov esi, ebp
call fcn.00403320
mov edi, eax
test edi, edi
je 0x40384a
mov edx, dword [esp + 0x10]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x403773
xor edi, edi
jmp 0x40384a
push 0x80000
call fcn.0042758c
mov ebx, eax
xor edi, edi
add esp, 4
cmp ebx, edi
je 0x40382f
push 0x80000
push edi
push ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], edi
call fcn.004263e0
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x80000
push ebx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, eax
test edi, edi
je 0x40382f
nop
mov eax, dword [esp + 0x18]
xor edi, edi
test eax, eax
jbe 0x4037ec
add dword [esp + 0x10], eax
push edi
lea ecx, [esp + 0x34]
push ecx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
je 0x40382f
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
jmp 0x4037ee
je 0x403820
push 0x80000
push 0
push ebx
mov dword [esp + 0x24], 0
call fcn.004263e0
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push 0x80000
push ebx
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, eax
test edi, edi
jne 0x4037c0
jmp 0x40382f
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x1c]
jne 0x40382f
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40384a
push ebx
call fcn.004273ba
add esp, 4
test ebp, ebp
je 0x403855
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x403864
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x403877
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop ebp
test ebx, ebx
je 0x403883
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop ebx
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x24f0]
xor ecx, esp
call fcn.004263ce
add esp, 0x24f4
ret
mov ecx, dword [esp + 0x24f4]
pop esi
xor ecx, esp
xor eax, eax
call fcn.004263ce
add esp, 0x24f4
ret