Function at 0x10008f10
Capabilities:
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
and esp, 0xfffffff8
sub esp, 0x24
push ebx
push esi
push edi
mov dword [esp + 0x10], 1
mov eax, dword [0x10013030]
cmp eax, 0x10013030
je 0x10008f58
test byte [eax + 0x1c], 2
je 0x10008f58
cmp byte [eax + 0x19], 5
jb 0x10008f58
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
push 0x10010240
push 0x59
push ecx
push edx
mov esi, str.LHW__QueryResponseDataEx
call fcn.10002ed0
add esp, 0x10
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x10008f94
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
test edi, edi
jne 0x10008f6f
xor eax, eax
test ecx, ecx
jmp 0x10008f86
mov eax, ecx
sub eax, 0
je 0x10008fa1
dec eax
je 0x10008f81
dec eax
jne 0x10008f8d
cmp dword [edi], 0x14
jmp 0x10008f86
xor eax, eax
cmp dword [edi], 0x10
sete al
test eax, eax
jne 0x10008f9d
mov dword [ebx + 0x44], 0x57
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ecx, ecx
jne 0x10008fa6
xor edi, edi
mov dword [ebp + 0x14], edi
xor eax, eax
mov esi, eax
push 4
push 1
mov dword [ebx + 0x44], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.MSVCR100.dll_calloc]
add esp, 8
mov dword [esp + 0x2c], eax
test eax, eax
je 0x10008fd4
mov dword [eax], esi
cmp dword [ebp + 0xc], esi
je 0x100091e9
mov esi, dword [ebp + 0xc]
mov edx, dword [ebx + 0x2c]
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0
lea eax, [esp + 0x18]
push eax
lea ecx, [esi + 8]
push ecx
push 0x20000013
push edx
mov dword [esp + 0x28], 4
call edi
test eax, eax
jne 0x1000904f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x44], eax
mov ecx, dword [0x10013030]
cmp ecx, 0x10013030
je 0x10009046
test byte [ecx + 0x1c], 1
je 0x10009046
cmp byte [ecx + 0x19], 2
jb 0x10009046
push eax
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x10]
push eax
push ecx
mov edx, 0x10010240
mov ecx, 0x5a
call fcn.10006c50
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x2c]
push 0
lea edx, [esp + 0x18]
push edx
lea eax, [esi + 0xc]
push eax
push 0x20000005
push ecx
mov dword [esp + 0x28], 4
call edi
test eax, eax
jne 0x100090a7
mov eax, dword [0x10013030]
cmp eax, 0x10013030
je 0x100090a7
test byte [eax + 0x1c], 1
je 0x100090a7
cmp byte [eax + 0x19], 5
jb 0x100090a7
mov edx, dword [ebx + 0x44]
mov ecx, dword [eax + 0x14]
push edx
mov edx, dword [eax + 0x10]
push ecx
push edx
mov edx, 0x10010240
mov ecx, 0x5b
call fcn.10006c50
add esp, 0xc
mov ecx, dword [ebx + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
add esi, 0x14
push esi
push 0x40000009
push ecx
mov dword [esp + 0x28], 0x10
call edi
test eax, eax
jne 0x100090ff
mov eax, dword [0x10013030]
cmp eax, 0x10013030
je 0x100090ff
test byte [eax + 0x1c], 1
je 0x100090ff
cmp byte [eax + 0x19], 2
jb 0x100090ff
mov edx, dword [ebx + 0x44]
mov ecx, dword [eax + 0x14]
push edx
mov edx, dword [eax + 0x10]
push ecx
push edx
mov edx, 0x10010240
mov ecx, 0x5c
call fcn.10006c50
add esp, 0xc
mov ecx, dword [ebx + 0x2c]
xor esi, esi
push esi
lea eax, [esp + 0x10]
push eax
push esi
push 0x16
push ecx
mov dword [esp + 0x20], esi
call edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, esi
jne 0x10009125
cmp eax, 0x7a
je 0x1000912e
mov dword [esp + 0x10], esi
jmp 0x10009564
mov ebx, dword [esp + 0xc]
add ebx, 2
lea esi, [esp + 0x20]
call fcn.100025d0
mov ebx, dword [esp + 0x20]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2c]
push 0
lea edx, [esp + 0x10]
push edx
push ebx
push 0x16
push ecx
call edi
mov dword [esp + 0x10], eax
test eax, eax
jne 0x100091af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
mov dword [edx + 0x44], eax
mov ecx, dword [0x10013030]
cmp ecx, 0x10013030
je 0x10009564
test byte [ecx + 0x1c], 1
je 0x10009564
cmp byte [ecx + 0x19], 2
jb 0x10009564
push eax
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x10]
push eax
push ecx
mov edx, 0x10010240
mov ecx, 0x5d
call fcn.10006c50
add esp, 0xc
jmp 0x10009564
mov esi, dword [esp + 0xc]
add esi, 2
push esi
mov dword [esp + 0x28], esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov ecx, dword [ebp + 0xc]
add esp, 4
mov dword [ecx + 0x10], eax
test eax, eax
je 0x100094ea
push esi
push ebx
push esi
push eax
mov dword [ecx + 4], 1
call dword [sym.imp.MSVCR100.dll_memcpy_s]
mov edi, dword [ebp + 0x14]
add esp, 0x10
test edi, edi
je 0x100094ae
xor edi, edi
cmp dword [ebp + 0x10], 2
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], edi
jne 0x10009240
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0xc]
cmp eax, edi
jbe 0x10009240
mov edi, eax
mov eax, dword [0x10013030]
cmp eax, 0x10013030
je 0x10009240
test byte [eax + 0x1c], 1
je 0x10009240
cmp byte [eax + 0x19], 5
jb 0x10009240
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
push edi
push ecx
push edx
mov edx, 0x10010240
mov ecx, 0x5e
call fcn.10006c50
add esp, 0xc
lea esi, [esp + 0x20]
call fcn.10002640
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x2c]
push 0
push 0
lea eax, [esp + 0x14]
push eax
push ecx
mov dword [esp + 0x1c], 0
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov ebx, eax
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x100092ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x44], eax
mov ecx, dword [0x10013030]
cmp ecx, 0x10013030
je 0x100092b3
test byte [ecx + 0x1c], 1
je 0x100092b3
cmp byte [ecx + 0x19], 2
jb 0x100092b3
mov edx, dword [ecx + 0x14]
push eax
mov eax, dword [ecx + 0x10]
push edx
push eax
mov edx, 0x10010240
lea ecx, [ebx + 0x5f]
call fcn.10006c50
add esp, 0xc
mov ecx, dword [0x10013030]
test edi, edi
je 0x100092f0
cmp dword [esp + 0xc], edi
jbe 0x100092f0
mov dword [esp + 0xc], edi
cmp ecx, 0x10013030
je 0x100092f0
test byte [ecx + 0x1c], 1
je 0x100092f0
cmp byte [ecx + 0x19], 5
jb 0x100092f0
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
push edi
push edx
push eax
mov edx, 0x10010240
mov ecx, 0x60
call fcn.10006c50
add esp, 0xc
mov esi, dword [esp + 0x24]
mov dword [esp + 0x1c], 0
test ebx, ebx
je 0x100094a0
mov eax, dword [esp + 0xc]
test eax, eax
je 0x100094a0
cmp dword [esp + 0x1c], 0
jne 0x100094a0
cmp dword [ebp + 0x10], 2
jne 0x10009327
xor esi, esi
mov dword [esp + 0x24], esi
lea ebx, [eax + esi]
lea esi, [esp + 0x20]
call fcn.100025d0
mov esi, dword [esp + 0x24]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x10], eax
test eax, eax
je 0x10009490
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [ebx + 0x2c]
push edx
lea eax, [esi + edi]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [esp + 0x10], eax
test eax, eax
je 0x100094fe
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x100093bd
mov eax, dword [0x10013030]
cmp eax, 0x10013030
je 0x100093a8
test byte [eax + 0x1c], 1
je 0x100093a8
cmp byte [eax + 0x19], 2
jb 0x100093a8
mov edx, dword [eax + 0x14]
mov eax, dword [eax + 0x10]
push edx
push eax
mov ecx, 0x10010240
mov eax, 0x62
call fcn.10006c30
add esp, 8
mov dword [esp + 0x1c], 1
mov dword [esp + 0xc], 0
jmp 0x10009304
add dword [esp + 0x18], eax
add esi, eax
cmp dword [ebp + 0x10], 2
mov dword [esp + 0x24], esi
jne 0x10009429
mov edx, dword [ebp + 0x14]
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x18], eax
mov eax, dword [edx + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10009429
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x44], eax
mov ecx, dword [0x10013030]
cmp ecx, 0x10013030
je 0x10009429
test byte [ecx + 0x1c], 1
je 0x10009429
cmp byte [ecx + 0x19], 2
jb 0x10009429
mov edx, dword [ecx + 0x14]
push eax
mov eax, dword [ecx + 0x10]
push edx
push eax
mov edx, 0x10010240
mov ecx, 0x63
call fcn.10006c50
add esp, 0xc
mov edx, dword [ebx + 0x2c]
push 0
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x1c], 0
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10009304
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x44], eax
mov ecx, dword [0x10013030]
cmp ecx, 0x10013030
je 0x100094a0
test byte [ecx + 0x1c], 1
je 0x100094a0
cmp byte [ecx + 0x19], 2
jb 0x100094a0
mov edx, dword [ecx + 0x14]
push eax
mov eax, dword [ecx + 0x10]
push edx
push eax
mov edx, 0x10010240
mov ecx, 0x64
call fcn.10006c50
add esp, 0xc
jmp 0x100094a0
mov dword [ebx + 0x44], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x44], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100094ae
mov ecx, dword [esp + 0x18]
mov dword [eax + 0xc], ecx
cmp dword [esp + 0x10], 0
je 0x10009564
cmp dword [ebp + 0x10], 1
jne 0x10009564
cmp dword [esp + 0x20], 0
je 0x10009564
test esi, esi
je 0x10009564
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov edi, dword [ebp + 0x14]
add esp, 4
mov dword [edi + 8], eax
test eax, eax
jne 0x10009549
mov edx, dword [ebp + 8]
mov dword [edx + 0x44], 8
mov dword [esp + 0x10], 0
jmp 0x10009564
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x44], eax
mov ecx, dword [0x10013030]
cmp ecx, 0x10013030
je 0x10009497
test byte [ecx + 0x1c], 1
je 0x10009497
cmp byte [ecx + 0x19], 2
jb 0x10009497
push eax
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x10]
push eax
push ecx
mov edx, 0x10010240
mov ecx, 0x61
call fcn.10006c50
add esp, 0xc
jmp 0x10009497
mov ecx, dword [esp + 0x20]
push esi
push ecx
push esi
push eax
mov dword [edi + 4], 1
call dword [sym.imp.MSVCR100.dll_memcpy_s]
add esp, 0x10
mov dword [edi + 0xc], esi
lea esi, [esp + 0x20]
call fcn.10002710
mov eax, dword [0x10013030]
cmp eax, 0x10013030
je 0x100095a1
test byte [eax + 0x1c], 2
je 0x100095a1
cmp byte [eax + 0x19], 5
jb 0x100095a1
mov edx, dword [eax + 0x14]
mov eax, dword [eax + 0x10]
push 0x10010240
push 0x65
push edx
push eax
mov esi, str.LHW__QueryResponseDataEx
call fcn.10002ed0
add esp, 0x10
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret