Function at 0x10032040
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a30ad
mov eax, dword fs:[0]
push eax
mov eax, 0x1118
call fcn.10093360
mov eax, dword [0x100cd130]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10c8], eax
mov eax, dword [ebp + 0xc]
mov edi, ecx
mov dword [ebp - 0x10d8], eax
lea eax, [edi + 0x20]
push str.unknown
push eax
call fcn.10001a93
lea eax, [ebp - 0x10d0]
push eax
lea eax, [ebp - 0x10e0]
push eax
push 0x32
xor ebx, ebx
push ebx
mov dword [ebp - 0x10d0], 8
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
cmp eax, ebx
je 0x100320c6
mov eax, dword [ebp - 0x10e0]
and eax, 1
jne 0x100320cd
push 4
jmp 0x1003261f
push ebx
lea eax, [ebp - 0x10cc]
push eax
mov dword [ebp - 0x10cc], ebx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
cmp eax, ebx
je 0x100320ee
test byte [ebp - 0x10cc], 0x20
je 0x100320f5
push 5
jmp 0x1003261f
push 0x100b4b88
lea esi, [ebp - 0x108c]
call fcn.10003c27
lea eax, [edi + 4]
push 0x100ace24
mov dword [ebp - 4], ebx
call fcn.10004cb3
test eax, eax
je 0x10032177
push str.POST
mov eax, esi
push eax
call fcn.10001a93
push str.Content_type
lea esi, [ebp - 0x1070]
call fcn.10003c27
push str.text_xml
lea esi, [ebp - 0x1054]
mov byte [ebp - 4], 1
call fcn.10003c27
mov eax, esi
push eax
lea eax, [ebp - 0x1070]
push eax
push edi
mov byte [ebp - 4], 2
call fcn.10032c54
push ebx
push 1
call fcn.10001b64
push ebx
push 1
lea esi, [ebp - 0x1070]
mov byte [ebp - 4], bl
call fcn.10001b64
push str.gzip_deflate
lea esi, [ebp - 0x1054]
call fcn.10003c27
push str.Accept_Encoding
lea esi, [ebp - 0x1070]
mov byte [ebp - 4], 3
call fcn.10003c27
lea eax, [ebp - 0x1054]
push eax
mov eax, esi
push eax
push edi
mov byte [ebp - 4], 4
call fcn.10032c54
push ebx
push 1
call fcn.10001b64
push ebx
push 1
lea esi, [ebp - 0x1054]
mov byte [ebp - 4], bl
call fcn.10001b64
lea ebx, [edi + 0x60]
lea ecx, [ebp - 0x1038]
call fcn.10032ab9
mov byte [ebp - 4], 5
mov eax, dword [edi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x100321ea
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [edi + 0x98]
cmp dword [eax + 0x18], 8
jb 0x100321fb
mov eax, dword [eax + 4]
jmp 0x100321fe
add eax, 4
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [edi + 0x3c], eax
cmp eax, ebx
jne 0x10032236
push 6
pop edi
push ebx
push 1
lea esi, [ebp - 0x1038]
call fcn.10001b64
push ebx
push 1
lea esi, [ebp - 0x108c]
call fcn.10001b64
mov eax, edi
jmp 0x10032620
push 4
lea ecx, [ebp - 0x10e4]
push ecx
push 0x41
push eax
mov dword [ebp - 0x10e4], 1
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov ecx, dword [ebp - 0x10c8]
lea esi, [ebp - 0x1120]
call fcn.10032730
test eax, eax
jne 0x1003226b
push 8
jmp 0x10032212
push ebx
push ebx
push 3
mov eax, 0x100ace24
push eax
push eax
push dword [ebp - 0x1108]
push dword [ebp - 0x1110]
push dword [edi + 0x3c]
call dword [sym.imp.WININET.dll_InternetConnectW]
cmp eax, ebx
jne 0x10032296
push 7
jmp 0x10032212
xor edx, edx
mov ecx, 0x1bb
cmp word [ebp - 0x1108], cx
mov ecx, dword [ebp - 0x1088]
setne dl
dec edx
and edx, 0x800000
or edx, 0x84483300
cmp dword [ebp - 0x1074], 8
jae 0x100322c9
lea ecx, [ebp - 0x1088]
push ebx
push edx
mov edx, dword [edi + 0xb8]
push ebx
neg edx
push ebx
sbb edx, edx
and edx, str.HTTP_1.1
push edx
push dword [ebp - 0x10f4]
push ecx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x10c8], esi
cmp esi, ebx
jne 0x1003230b
push dword [edi + 0x3c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [edi + 0x3c], ebx
push 9
jmp 0x10032212
push 0x100b4b88
lea eax, [ebp - 0x108c]
call fcn.10004cb3
test eax, eax
jne 0x10032348
cmp dword [ebp - 0x1020], 8
mov eax, dword [ebp - 0x1034]
jae 0x10032334
lea eax, [ebp - 0x1034]
push ebx
push ebx
push dword [ebp - 0x1024]
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov esi, eax
jmp 0x100323b0
cmp dword [edi + 0x1c], 8
jb 0x10032353
mov edx, dword [edi + 8]
jmp 0x10032356
lea edx, [edi + 8]
lea ecx, [ebp - 0x1054]
call fcn.10019f52
cmp dword [ebp - 0x103c], 0x10
mov ecx, dword [ebp - 0x1050]
jae 0x10032376
lea ecx, [ebp - 0x1050]
cmp dword [ebp - 0x1020], 8
mov eax, dword [ebp - 0x1034]
jae 0x1003238b
lea eax, [ebp - 0x1034]
push dword [ebp - 0x1040]
push ecx
push dword [ebp - 0x1024]
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
push ebx
push 1
lea ecx, [ebp - 0x1054]
mov esi, eax
call fcn.10003f8e
cmp esi, ebx
jne 0x100323d1
push dword [ebp - 0x10c8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [edi + 0x3c]
call esi
mov dword [edi + 0x3c], ebx
push 0xa
jmp 0x10032212
lea eax, [ebp - 0x10c4]
push eax
lea ebx, [ebp - 0x10c8]
call fcn.1003289b
mov ecx, ebx
lea edx, [ebp - 0x1070]
mov byte [ebp - 4], 6
call fcn.100327a9
push 0xffffffffffffffff
xor ebx, ebx
push ebx
lea ecx, [edi + 0x20]
mov byte [ebp - 4], 7
call fcn.10001a07
push ebx
push 1
lea esi, [ebp - 0x1070]
mov byte [ebp - 4], 6
call fcn.10001b64
push edi
lea ecx, [ebp - 0x10c8]
call fcn.10032822
test eax, eax
jne 0x10032454
push dword [ebp - 0x10c8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [edi + 0x3c]
call esi
push ebx
push 1
lea esi, [ebp - 0x10c4]
mov dword [edi + 0x3c], ebx
call fcn.10001b64
push 0xb
xor ebx, ebx
jmp 0x10032212
lea eax, [ebp - 0x10c4]
lea ecx, [edi + 0x40]
push eax
call fcn.10032933
mov esi, dword [ebp - 0x10d8]
mov dword [ebp - 0x10cc], ebx
cmp dword [ebp + 0x10], ebx
je 0x100324dd
cmp dword [esi + 0x18], 8
jb 0x1003247f
mov eax, dword [esi + 4]
jmp 0x10032482
lea eax, [esi + 4]
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10cc], eax
cmp eax, 0xffffffff
jne 0x100324dd
push 0x100b18e0
lea eax, [edi + 0x20]
push eax
call fcn.10001a93
push dword [ebp - 0x10c8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [edi + 0x3c]
call esi
push ebx
push 1
lea esi, [ebp - 0x10c4]
mov dword [edi + 0x3c], ebx
call fcn.10001b64
push 0xd
jmp 0x1003244d
push 0x100b3f5e
lea ecx, [ebp - 0x10a8]
mov dword [ebp - 0x10d4], ebx
mov dword [ebp - 0x10d0], ebx
call fcn.10003c46
push 0x100ace24
push esi
mov byte [ebp - 4], 8
call fcn.10001a93
mov esi, 0x1000
cmp dword [ebp - 0x10d4], ebx
jne 0x10032522
cmp dword [ebp - 0x10d0], 1
je 0x1003263c
push 0x1001
lea eax, [ebp - 0x101c]
push ebx
push eax
call fcn.10087ea0
add esp, 0xc
lea eax, [ebp - 0x10d4]
push eax
push esi
lea eax, [ebp - 0x101c]
push eax
push dword [ebp - 0x10c8]
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 0x10d0], eax
cmp eax, ebx
je 0x100326e3
mov eax, dword [ebp - 0x10d4]
cmp eax, ebx
jbe 0x1003250d
cmp eax, esi
jbe 0x10032576
xor eax, eax
mov dword [ebp - 0x10d4], eax
mov byte [ebp + eax - 0x101c], bl
cmp dword [ebp + 0x10], ebx
jne 0x1003259a
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp - 0x10a8]
push eax
call fcn.10024623
jmp 0x1003250d
push ebx
lea ecx, [ebp - 0x10dc]
push ecx
push eax
lea eax, [ebp - 0x101c]
push eax
push dword [ebp - 0x10cc]
mov dword [ebp - 0x10dc], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1003250d
push dword [ebp - 0x10c8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [edi + 0x3c]
call esi
push dword [ebp - 0x10cc]
mov dword [edi + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x10a8]
call fcn.10003f8e
push ebx
push edi
lea esi, [ebp - 0x10c4]
call fcn.10001b64
push ebx
push edi
lea esi, [ebp - 0x1038]
call fcn.10001b64
push ebx
push edi
lea esi, [ebp - 0x108c]
call fcn.10001b64
push 0xe
pop eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10084554
leave
ret 0xc
cmp dword [ebp - 0x1090], 0x10
mov ecx, dword [ebp - 0x10a4]
jae 0x10032651
lea ecx, [ebp - 0x10a4]
lea eax, [ebp - 0x1070]
push eax
call fcn.1001a058
pop ecx
mov ecx, dword [ebp - 0x10d8]
push 0xffffffffffffffff
push ebx
mov byte [ebp - 4], 9
call fcn.10001a07
push ebx
push 1
lea esi, [ebp - 0x1070]
call fcn.10001b64
cmp dword [ebp + 0x10], ebx
je 0x1003268f
push dword [ebp - 0x10cc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10c8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [edi + 0x3c]
call esi
mov dword [edi + 0x3c], ebx
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x10a8]
call fcn.10003f8e
push ebx
push edi
lea esi, [ebp - 0x10c4]
call fcn.10001b64
push ebx
push edi
lea esi, [ebp - 0x1038]
call fcn.10001b64
push ebx
push edi
lea esi, [ebp - 0x108c]
call fcn.10001b64
xor eax, eax
jmp 0x10032620
push dword [ebp - 0x10c8]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [edi + 0x3c]
call esi
mov dword [edi + 0x3c], ebx
cmp dword [ebp - 0x10cc], ebx
je 0x1003270d
push dword [ebp - 0x10cc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp - 0x10a8]
call fcn.10003f8e
push ebx
push 1
lea esi, [ebp - 0x10c4]
call fcn.10001b64
push 0xc
jmp 0x1003244d