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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x614
mov eax, dword [0x10094610]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push 0
push 0
push 0
push 0
push 0
mov dword [ebp - 0x600], 0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
test ebx, ebx
jne 0x10061b23
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100660ff
mov esp, ebp
pop ebp
ret
push 1
push 0x84000002
push 0
push 0x100824b4
push edi
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov edi, eax
test edi, edi
jne 0x10061b61
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100660ff
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x60c]
push eax
lea ecx, [ebp - 0x610]
push ecx
lea edx, [ebp - 0x608]
push edx
push 0x20000013
push edi
mov dword [ebp - 0x610], 4
mov dword [ebp - 0x60c], 0
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x10061bc1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, eax
call edi
push ebx
call edi
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100660ff
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x608], 0xc8
je 0x10061bf0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push ebx
call esi
mov eax, dword [ebp - 0x608]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100660ff
mov esp, ebp
pop ebp
ret
push esi
lea ecx, [ebp - 0x5fc]
call fcn.1004e650
xor esi, esi
cmp dword [ebp - 0x5ec], esi
je 0x10061c6a
cmp dword [ebp - 0x5e8], 8
mov eax, dword [ebp - 0x5fc]
jae 0x10061c1b
lea eax, [ebp - 0x5fc]
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10061c6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, eax
call edi
push ebx
call edi
lea ecx, [ebp - 0x5fc]
call fcn.1004e5d0
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100660ff
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x604], eax
mov dword [ebp - 0x614], eax
jmp 0x10061c80
lea eax, [ebp - 0x604]
push eax
push 0x5db
lea ecx, [ebp - 0x5e0]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x10061ccf
test esi, esi
je 0x10061cc4
mov eax, dword [ebp - 0x604]
push 0
lea edx, [ebp - 0x614]
push edx
push eax
lea ecx, [ebp - 0x5e0]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10061cdc
cmp dword [ebp - 0x604], 0
ja 0x10061c80
jmp 0x10061ced
call dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0x1388
jmp 0x10061ce7
call dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfa0
mov dword [ebp - 0x600], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push ebx
call esi
lea ecx, [ebp - 0x5fc]
call fcn.1004e5d0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x600]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100660ff
mov esp, ebp
pop ebp
ret