Function at 0x461e50
Capabilities:
Check http status code
Create http request
Download and write a file
Query remote server for available data
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4b1c84
push eax
mov eax, 0x2758
mov dword fs:[0], esp
call fcn.00491330
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2770], 2
call fcn.0045c570
test eax, eax
je 0x461eac
lea ecx, [esp + 0x2778]
mov byte [esp + 0x2770], 1
call fcn.004a6b19
mov byte [esp + 0x2770], 0
jmp 0x462243
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push str.HTTP
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
cmp esi, ebx
je 0x462228
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
push 4
push 0x4d5694
push 2
push esi
call edi
push 4
push 0x4d5694
push 5
push esi
call edi
push 4
push 0x4d5694
push 6
push esi
call edi
push 4
push 0x4d5694
push 7
push esi
call edi
push 4
push 0x4d5694
push 8
push esi
call edi
mov eax, dword [esp + 0x2778]
mov edi, dword [sym.imp.WININET.dll_InternetOpenUrlA]
push ebx
push 0x84000000
push ebx
push ebx
push eax
push esi
call edi
mov ebp, eax
cmp ebp, ebx
jne 0x461f71
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x10]
call fcn.0045c570
test eax, eax
je 0x461f4c
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x462228
mov ecx, dword [esp + 0x2778]
push ebx
push 0x84000000
push ebx
push ebx
push ecx
push esi
call edi
mov ebp, eax
cmp ebp, ebx
jne 0x461f71
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x462228
mov ecx, dword [esp + 0x10]
call fcn.0045c570
test eax, eax
je 0x461f8f
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call edi
push esi
call edi
jmp 0x462228
mov ecx, 0x9c3
xor eax, eax
lea edi, [esp + 0x59]
mov byte [esp + 0x58], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x2c]
push ebx
lea eax, [esp + 0x5c]
push edx
push eax
push 0x13
push ebp
mov dword [esp + 0x40], 0x2710
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea ecx, [esp + 0x58]
push ecx
call fcn.0049135f
add esp, 4
cmp eax, 0xc8
je 0x4620af
lea edx, [esp + 0x20]
push 0x2e
push edx
call fcn.00451a60
mov ecx, eax
call fcn.00451ab0
push str._nErrCode_:
push eax
lea eax, [esp + 0x30]
mov byte [esp + 0x2778], 3
push eax
call fcn.004a6dae
lea ecx, [esp + 0x58]
lea edx, [esp + 0x14]
push ecx
push eax
push edx
mov byte [esp + 0x277c], 4
call fcn.004a6dae
mov edi, dword [eax]
lea eax, [esp + 0x18]
push ebx
push eax
mov byte [esp + 0x2778], 5
call fcn.00451a60
mov ecx, eax
call fcn.00451ab0
mov eax, dword [eax]
push ebx
push eax
push edi
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x18]
call fcn.004a6b19
lea ecx, [esp + 0x14]
mov byte [esp + 0x2770], 4
call fcn.004a6b19
lea ecx, [esp + 0x28]
mov byte [esp + 0x2770], 3
call fcn.004a6b19
lea ecx, [esp + 0x20]
mov byte [esp + 0x2770], 2
call fcn.004a6b19
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x58]
push ecx
push str.HttpQueryInfo_Faile_ErrCode__s...
mov eax, dword [edx + 4]
push eax
call fcn.0044f8c0
push eax
call fcn.0044fb50
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x10
push ebp
call edi
push esi
call edi
jmp 0x462228
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], bl
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x34]
push ebx
lea edx, [esp + 0x3c]
push ecx
stosw word es:[edi], ax
push edx
push 5
push ebp
mov dword [esp + 0x48], 0x20
stosb byte es:[edi], al
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp eax, ebx
je 0x4620f6
lea eax, [esp + 0x38]
push eax
call fcn.0049135f
add esp, 4
mov dword [esp + 0x18], eax
jmp 0x4620fe
mov dword [esp + 0x18], 0x3e8
mov ecx, dword [esp + 0x277c]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x462133
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call edi
push esi
call edi
jmp 0x462228
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], ebx
call fcn.0045c570
test eax, eax
jne 0x462215
push ebx
lea edx, [esp + 0x28]
push ebx
push edx
push ebp
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
cmp eax, ebx
je 0x462215
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edx + 0x50]
push ecx
push eax
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
je 0x462215
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ebx
push ecx
mov ecx, dword [eax + 0x50]
push edx
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebx
je 0x462215
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add eax, edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2780]
mov dword [esp + 0x20], eax
call fcn.0043e0f0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push ebx
shr ecx, 0xa
push ebx
push ecx
shr edx, 0xa
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push eax
call fcn.004a6b87
mov byte [esp + 0x2784], 2
call fcn.0040c220
mov ecx, eax
call fcn.00460b50
cmp dword [esp + 0x1c], ebx
je 0x46226a
mov ecx, dword [esp + 0x10]
call fcn.0045c570
test eax, eax
je 0x462154
push ebp
mov ebp, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebp
push esi
call ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x2778]
mov byte [esp + 0x2770], 1
call fcn.004a6b19
mov byte [esp + 0x2770], bl
lea ecx, [esp + 0x277c]
call fcn.004a6b19
lea ecx, [esp + 0x2780]
mov dword [esp + 0x2770], 0xffffffff
call fcn.004a6b19
xor eax, eax
jmp 0x4622c0
push ebp
mov ebp, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebp
push esi
call ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x2778]
mov byte [esp + 0x2770], 1
call fcn.004a6b19
lea ecx, [esp + 0x277c]
mov byte [esp + 0x2770], bl
call fcn.004a6b19
lea ecx, [esp + 0x2780]
mov dword [esp + 0x2770], 0xffffffff
call fcn.004a6b19
mov eax, 1
mov ecx, dword [esp + 0x2768]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2764
ret 0xc