Function at 0x417a70
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:
push ebp
mov ebp, esp
mov eax, 0x2544
call fcn.0041c530
mov eax, dword [0x44b3b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1374], 0
xor eax, eax
mov word [ebp - 0x208], ax
push 0x1fe
push 0
lea ecx, [ebp - 0x206]
push ecx
call fcn.0041b880
add esp, 0xc
xor edx, edx
mov word [ebp - 0x310], dx
push 0xfe
push 0
lea eax, [ebp - 0x30e]
push eax
call fcn.0041b880
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x2518], cx
push 0xfe
push 0
lea edx, [ebp - 0x2516]
push edx
call fcn.0041b880
add esp, 0xc
xor eax, eax
mov word [ebp - 0x2400], ax
push 0x1046
push 0
lea ecx, [ebp - 0x23fe]
push ecx
call fcn.0041b880
add esp, 0xc
mov dword [ebp - 0x13b4], 0
push 0x38
push 0
lea edx, [ebp - 0x13b0]
push edx
call fcn.0041b880
add esp, 0xc
mov dword [ebp - 0x13b4], 0x3c
lea eax, [ebp - 0x208]
mov dword [ebp - 0x13a4], eax
mov dword [ebp - 0x13a0], 0x100
lea ecx, [ebp - 0x310]
mov dword [ebp - 0x1398], ecx
mov dword [ebp - 0x1394], 0x80
lea edx, [ebp - 0x2518]
mov dword [ebp - 0x1390], edx
mov dword [ebp - 0x138c], 0x80
lea eax, [ebp - 0x2400]
mov dword [ebp - 0x1388], eax
mov dword [ebp - 0x1384], 0x824
cmp dword [ebp + 0xc], 0
je 0x417b98
cmp dword [ebp + 0xc], 0
jne 0x417b9f
xor eax, eax
jmp 0x418180
mov dword [ebp - 0x320], 0
mov dword [ebp - 0x2408], 0
mov dword [ebp - 0x2410], 0
mov dword [ebp - 0x1378], 0
mov dword [ebp - 0x240c], 0
mov dword [ebp - 0x318], 0xffffffff
lea ecx, [ebp - 0x13b4]
push ecx
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
mov dword [ebp - 0x1374], eax
cmp dword [ebp - 0x1374], 0
je 0x417c14
cmp dword [ebp - 0x13a8], 3
jne 0x417c14
mov dword [ebp - 0x2524], 1
jmp 0x417c1e
mov dword [ebp - 0x2524], 0
mov eax, dword [ebp - 0x2524]
mov dword [ebp - 0x1374], eax
cmp dword [ebp - 0x1374], 0
jne 0x417c47
mov dword [ebp - 0x1374], 0
jmp 0x4180db
push 0
push 0
push 0
push 0
push str.Beacon
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x2408], eax
cmp dword [ebp - 0x2408], 0
jne 0x417c7d
mov dword [ebp - 0x1374], 0
jmp 0x4180db
push 0
push 0
push 3
lea ecx, [ebp - 0x2518]
push ecx
lea edx, [ebp - 0x310]
push edx
movzx eax, word [ebp - 0x139c]
push eax
lea ecx, [ebp - 0x208]
push ecx
mov edx, dword [ebp - 0x2408]
push edx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x2410], eax
cmp dword [ebp - 0x2410], 0
jne 0x417cd0
mov dword [ebp - 0x1374], 0
jmp 0x4180db
xor eax, eax
mov word [ebp - 0x1370], ax
push 0x1046
push 0
lea ecx, [ebp - 0x136e]
push ecx
call fcn.0041b880
add esp, 0xc
cmp dword [ebp - 0x1384], 0
je 0x417d66
mov edx, dword [ebp - 0x1388]
mov dword [ebp - 0x2528], edx
lea eax, [ebp - 0x1370]
mov dword [ebp - 0x252c], eax
mov ecx, dword [ebp - 0x252c]
mov dword [ebp - 0x2530], ecx
mov edx, dword [ebp - 0x2528]
mov ax, word [edx]
mov word [ebp - 0x2532], ax
mov ecx, dword [ebp - 0x252c]
mov dx, word [ebp - 0x2532]
mov word [ecx], dx
mov eax, dword [ebp - 0x2528]
add eax, 2
mov dword [ebp - 0x2528], eax
mov ecx, dword [ebp - 0x252c]
add ecx, 2
mov dword [ebp - 0x252c], ecx
cmp word [ebp - 0x2532], 0
jne 0x417d1c
jmp 0x417dd0
mov dword [ebp - 0x2538], 0x443b78
lea edx, [ebp - 0x1370]
mov dword [ebp - 0x253c], edx
mov eax, dword [ebp - 0x253c]
mov dword [ebp - 0x2540], eax
mov ecx, dword [ebp - 0x2538]
mov dx, word [ecx]
mov word [ebp - 0x2542], dx
mov eax, dword [ebp - 0x253c]
mov cx, word [ebp - 0x2542]
mov word [eax], cx
mov edx, dword [ebp - 0x2538]
add edx, 2
mov dword [ebp - 0x2538], edx
mov eax, dword [ebp - 0x253c]
add eax, 2
mov dword [ebp - 0x253c], eax
cmp word [ebp - 0x2542], 0
jne 0x417d88
push 0
push 0x80000000
push 0
push 0x443b7c
push 0x443b80
lea ecx, [ebp - 0x1370]
push ecx
push str.HEAD
mov edx, dword [ebp - 0x2410]
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x320], eax
push 3
mov eax, dword [ebp - 0x320]
push eax
call fcn.004179a0
add esp, 8
mov dword [ebp - 0x1374], eax
cmp dword [ebp - 0x1374], 0
jne 0x417e2c
jmp 0x4180db
mov dword [ebp - 0x314], 0
mov dword [ebp - 0x20c], 4
push 0
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x314]
push edx
push 0x20000005
mov eax, dword [ebp - 0x320]
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov dword [ebp - 0x1374], eax
cmp dword [ebp - 0x1374], 0
je 0x417e91
cmp dword [ebp - 0x314], 0x3e800000
jbe 0x417e91
mov dword [ebp - 0x1374], 0
jmp 0x4180db
push 0
push 0x80000000
push 0
push 0x443ba0
push str.HTTP_1.1
lea ecx, [ebp - 0x1370]
push ecx
push 0x443bb8
mov edx, dword [ebp - 0x2410]
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x1378], eax
mov dword [ebp - 0x2404], 0x2bf20
push 4
lea eax, [ebp - 0x2404]
push eax
push 5
mov ecx, dword [ebp - 0x1378]
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea edx, [ebp - 0x2404]
push edx
push 6
mov eax, dword [ebp - 0x1378]
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 3
mov ecx, dword [ebp - 0x1378]
push ecx
call fcn.004179a0
add esp, 8
mov dword [ebp - 0x1374], eax
cmp dword [ebp - 0x1374], 0
jne 0x417f27
jmp 0x4180db
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x318], eax
cmp dword [ebp - 0x318], 0xffffffff
jne 0x417f66
mov dword [ebp - 0x1374], 0
jmp 0x4180db
push 0x80000
call fcn.0041c51c
add esp, 4
mov dword [ebp - 0x251c], eax
mov eax, dword [ebp - 0x251c]
mov dword [ebp - 0x240c], eax
cmp dword [ebp - 0x240c], 0
jne 0x417fa2
mov dword [ebp - 0x1374], 0
jmp 0x4180db
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x2414], 0
mov dword [ebp - 0x31c], 0
mov ecx, 1
test ecx, ecx
je 0x4180db
mov dword [ebp - 0x31c], 0
push 0x80000
push 0
mov edx, dword [ebp - 0x240c]
push edx
call fcn.0041b880
add esp, 0xc
lea eax, [ebp - 0x31c]
push eax
push 0x80000
mov ecx, dword [ebp - 0x240c]
push ecx
mov edx, dword [ebp - 0x1378]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 0x1374], eax
cmp dword [ebp - 0x1374], 0
je 0x4180d4
mov dword [ebp - 0x1374], 0
cmp dword [ebp - 0x31c], 0
jbe 0x41808b
mov eax, dword [ebp - 0x324]
add eax, dword [ebp - 0x31c]
mov dword [ebp - 0x324], eax
push 0
lea ecx, [ebp - 0x2414]
push ecx
mov edx, dword [ebp - 0x31c]
push edx
mov eax, dword [ebp - 0x240c]
push eax
mov ecx, dword [ebp - 0x318]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x1374], eax
cmp dword [ebp - 0x1374], 0
jne 0x41807c
jmp 0x4180db
mov edx, dword [ebp - 0x318]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
jmp 0x4180d2
cmp dword [ebp - 0x31c], 0
jne 0x4180d2
mov eax, dword [ebp - 0x324]
cmp eax, dword [ebp - 0x314]
jne 0x4180d0
mov dword [ebp - 0x1374], 1
mov ecx, dword [ebp - 0x318]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edx, dword [ebp - 0x318]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x318], 0xffffffff
jmp 0x4180db
jmp 0x4180d6
jmp 0x4180db
jmp 0x417fc0
cmp dword [ebp - 0x318], 0xffffffff
je 0x4180fe
mov eax, dword [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [ebp - 0x318]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x240c], 0
je 0x418122
mov edx, dword [ebp - 0x240c]
mov dword [ebp - 0x2520], edx
mov eax, dword [ebp - 0x2520]
push eax
call fcn.0041c350
add esp, 4
cmp dword [ebp - 0x1378], 0
je 0x418138
mov ecx, dword [ebp - 0x1378]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x320], 0
je 0x41814e
mov edx, dword [ebp - 0x320]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x2410], 0
je 0x418164
mov eax, dword [ebp - 0x2410]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x2408], 0
je 0x41817a
mov ecx, dword [ebp - 0x2408]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x1374]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b86f
mov esp, ebp
pop ebp
ret