Function at 0x616a30
Capabilities:
Check http status code
Create http request
Delete file
Download and write a file
Get http content length
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 ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63ad45
mov eax, dword fs:[0]
push eax
mov eax, 0x2288
call fcn.005eb610
mov eax, dword [0x6f7654]
xor eax, ebp
mov dword [ebp - 0x3c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2290], ecx
push 0xd2
push 0x6bc3a8
push 0x6bc3c8
lea ecx, [ebp - 0x34]
call fcn.00455c30
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0
je 0x616a92
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 2
jne 0x616aea
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 9
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x40]
push eax
push 0x6bc3e4
push 4
push 0x6bc3f8
push 0xd6
push 0x6bc400
push 0x6bc420
call fcn.004563b0
add esp, 0x1c
mov dword [ebp - 0x2280], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00455c90
mov eax, dword [ebp - 0x2280]
jmp 0x6171ba
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 4], 1
jne 0x616b90
mov dword [ebp - 0x38], 0x40000
push 0x40000
call fcn.005e8b02
add esp, 4
mov dword [ebp - 0x2284], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x2284]
mov dword [edx + 0x68], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x68], 0
jne 0x616b7a
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 0x11
mov dword [ebp - 0x2288], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00455c90
mov eax, dword [ebp - 0x2288]
jmp 0x6171ba
push 0x40000
push 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x68]
push ecx
call fcn.005eb2a0
add esp, 0xc
mov edx, dword [ebp + 8]
mov dword [edx + 0x44], 1
mov eax, dword [ebp - 0x2290]
cmp dword [eax + 0xc], 0
jne 0x616bb5
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 0x10
jmp 0x61710c
push 0
push 0
push 0
push 1
push str.IGW_HTTP_DOWNLOAD
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x616be0
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 1
jmp 0x61710c
mov eax, dword [ebp - 0x2290]
cmp dword [eax + 0xc], 0
jne 0x616bf8
mov dword [ebp - 0x10], 0x10
jmp 0x61710c
push 0
push 0xc4000000
push 0
push 0
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00402aa0
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x616c31
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 2
jmp 0x61710c
mov eax, dword [ebp - 0x2290]
cmp dword [eax + 0xc], 0
jne 0x616c4c
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 0x10
jmp 0x61710c
xor edx, edx
mov word [ebp - 0x224c], dx
push 0x206
push 0
lea eax, [ebp - 0x224a]
push eax
call fcn.005eb2a0
add esp, 0xc
mov dword [ebp - 0x2258], 0x208
push 0
lea ecx, [ebp - 0x2258]
push ecx
lea edx, [ebp - 0x224c]
push edx
push 0x13
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x616ca9
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 8
jmp 0x61710c
lea edx, [ebp - 0x224c]
push edx
call fcn.005edde0
add esp, 4
cmp eax, 0xc8
je 0x616cce
mov eax, dword [ebp + 8]
mov dword [eax + 0x40], 8
jmp 0x61710c
mov ecx, dword [ebp - 0x2290]
cmp dword [ecx + 0xc], 0
jne 0x616ce9
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 0x10
jmp 0x61710c
mov dword [ebp - 0x2274], 0
mov dword [ebp - 0x2258], 4
xor eax, eax
mov word [ebp - 0x226c], ax
xor ecx, ecx
mov dword [ebp - 0x226a], ecx
mov dword [ebp - 0x2266], ecx
mov dword [ebp - 0x2262], ecx
push 6
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00402aa0
push eax
lea edx, [ebp - 0x226c]
push edx
call fcn.005eb8c5
add esp, 0xc
lea eax, [ebp - 0x226c]
push eax
call fcn.005ee0ad
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x44], 2
push str.ftp:__
lea edx, [ebp - 0x226c]
push edx
call fcn.005ed28c
add esp, 8
test eax, eax
jne 0x616d7c
push 0
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WININET.dll_FtpGetFileSize]
mov dword [ebp - 0x2274], eax
jmp 0x616dcb
push 0
lea ecx, [ebp - 0x2258]
push ecx
lea edx, [ebp - 0x2274]
push edx
push 0x20000005
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x616dcb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2278], eax
cmp dword [ebp - 0x2278], 0x2f76
je 0x616dcb
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 3
jmp 0x61710c
mov edx, dword [ebp - 0x2290]
cmp dword [edx + 0xc], 0
jne 0x616de6
mov eax, dword [ebp + 8]
mov dword [eax + 0x40], 0x10
jmp 0x61710c
mov ecx, dword [ebp - 0x2274]
xor edx, edx
mov eax, dword [ebp + 8]
mov dword [eax + 0x50], ecx
mov dword [eax + 0x54], edx
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x44], 3
mov ecx, dword [ebp + 8]
add ecx, 0x24
call fcn.0045e920
test eax, eax
je 0x616e41
push 0x6bc470
mov ecx, dword [ebp + 8]
add ecx, 0x24
call fcn.00402aa0
push eax
call fcn.005edeb1
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x616e41
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 6
jmp 0x61710c
mov dword [ebp - 0x2250], 0
mov dword [ebp - 0x225c], 0
mov dword [ebp - 0x2254], 0
mov dword [ebp - 0x2270], 0
mov eax, dword [ebp - 0x2290]
cmp dword [eax + 0xc], 0
jne 0x616e84
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 0x10
jmp 0x61709c
mov dword [ebp - 0x2270], 0
push 0
push 0
lea edx, [ebp - 0x2270]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x616eb5
cmp dword [ebp - 0x2270], 0
jae 0x616ee3
mov ecx, dword [ebp - 0x2254]
add ecx, 1
mov dword [ebp - 0x2254], ecx
cmp dword [ebp - 0x2254], 5
jle 0x616ede
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 4
jmp 0x61709c
jmp 0x61708f
mov eax, dword [ebp - 0x2290]
cmp dword [eax + 0xc], 0
jne 0x616efe
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 0x10
jmp 0x61709c
cmp dword [ebp - 0x2270], 0x2000
jbe 0x616f16
mov dword [ebp - 0x2294], 0x2000
jmp 0x616f22
mov edx, dword [ebp - 0x2270]
mov dword [ebp - 0x2294], edx
mov eax, dword [ebp - 0x2294]
mov dword [ebp - 0x2270], eax
push 0x2001
push 0
lea ecx, [ebp - 0x2044]
push ecx
call fcn.005eb2a0
add esp, 0xc
lea edx, [ebp - 0x225c]
push edx
mov eax, dword [ebp - 0x2270]
push eax
lea ecx, [ebp - 0x2044]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x616f75
cmp dword [ebp - 0x225c], 0
jae 0x616fa1
mov eax, dword [ebp - 0x2254]
add eax, 1
mov dword [ebp - 0x2254], eax
cmp dword [ebp - 0x2254], 5
jle 0x616f9c
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 5
jmp 0x61709c
jmp 0x61708f
mov edx, dword [ebp - 0x2290]
cmp dword [edx + 0xc], 0
jne 0x616fbc
mov eax, dword [ebp + 8]
mov dword [eax + 0x40], 0x10
jmp 0x61709c
mov dword [ebp - 0x2254], 0
mov ecx, dword [ebp + 8]
add ecx, 0x24
call fcn.0045e920
test eax, eax
je 0x617028
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x225c]
push edx
push 1
lea eax, [ebp - 0x2044]
push eax
call fcn.005ee27f
add esp, 0x10
mov dword [ebp - 0x227c], eax
mov ecx, dword [ebp - 0x227c]
cmp ecx, dword [ebp - 0x225c]
je 0x617014
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 7
jmp 0x61709c
mov eax, dword [ebp - 0x2250]
add eax, dword [ebp - 0x225c]
mov dword [ebp - 0x2250], eax
jmp 0x617066
cmp dword [ebp - 0x225c], 0
jbe 0x617066
mov ecx, dword [ebp - 0x225c]
push ecx
lea edx, [ebp - 0x2044]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x68]
add ecx, dword [ebp - 0x2250]
push ecx
call fcn.005ed2d0
add esp, 0xc
mov edx, dword [ebp - 0x2250]
add edx, dword [ebp - 0x225c]
mov dword [ebp - 0x2250], edx
mov eax, dword [ebp - 0x2290]
cmp dword [eax + 0xc], 0
jne 0x61707e
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 0x10
jmp 0x61709c
mov edx, dword [ebp - 0x2250]
xor eax, eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x58], edx
mov dword [ecx + 0x5c], eax
cmp dword [ebp - 0x2270], 0
ja 0x616e69
cmp dword [ebp - 0x14], 0
je 0x6170b5
mov edx, dword [ebp - 0x14]
push edx
call fcn.005ee378
add esp, 4
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x2290]
cmp dword [eax + 0xc], 0
jne 0x6170cd
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x40], 0x10
jmp 0x61710c
mov edx, dword [ebp - 0x2250]
cmp edx, dword [ebp - 0x2274]
jb 0x6170e4
cmp dword [ebp - 0x2250], 0
jne 0x6170f0
mov eax, dword [ebp + 8]
mov dword [eax + 0x40], 5
jmp 0x617104
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x44], 4
mov edx, dword [ebp + 8]
mov dword [edx + 0x40], 0
xor eax, eax
jne 0x616b90
cmp dword [ebp - 0x20], 0
je 0x617123
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0x24], 0
je 0x61713a
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x14], 0
je 0x61716b
mov eax, dword [ebp - 0x14]
push eax
call fcn.005ee378
add esp, 4
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x18], 0
jne 0x61716b
mov ecx, dword [ebp + 8]
add ecx, 0x24
call fcn.00402aa0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x40]
push edx
push str.__HD_HD_DHD____d
push 4
push 0x6bc48c
push 0x1f4
push str.HttpDownload::DoHttpDownload
push 0x6bc4b4
call fcn.004563b0
add esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
neg ecx
sbb ecx, ecx
mov dword [ebp - 0x228c], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00455c90
mov eax, dword [ebp - 0x228c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x3c]
xor ecx, ebp
call fcn.005ea848
mov esp, ebp
pop ebp
ret 4