Function at 0x10031f5f
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 0x100a3425
mov eax, dword fs:[0]
push eax
mov eax, 0x1118
call fcn.10093700
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.10001a89
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 0x10031fe5
mov eax, dword [ebp - 0x10e0]
and eax, 1
jne 0x10031fec
push 4
jmp 0x1003253e
push ebx
lea eax, [ebp - 0x10cc]
push eax
mov dword [ebp - 0x10cc], ebx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
cmp eax, ebx
je 0x1003200d
test byte [ebp - 0x10cc], 0x20
je 0x10032014
push 5
jmp 0x1003253e
push 0x100b4aa8
lea esi, [ebp - 0x108c]
call fcn.10003bd6
lea eax, [edi + 4]
push 0x100acd34
mov dword [ebp - 4], ebx
call fcn.10004bad
test eax, eax
je 0x10032096
push str.POST
mov eax, esi
push eax
call fcn.10001a89
push str.Content_type
lea esi, [ebp - 0x1070]
call fcn.10003bd6
push str.text_xml
lea esi, [ebp - 0x1054]
mov byte [ebp - 4], 1
call fcn.10003bd6
mov eax, esi
push eax
lea eax, [ebp - 0x1070]
push eax
push edi
mov byte [ebp - 4], 2
call fcn.10032b59
push ebx
push 1
call fcn.10001b5a
push ebx
push 1
lea esi, [ebp - 0x1070]
mov byte [ebp - 4], bl
call fcn.10001b5a
push str.gzip_deflate
lea esi, [ebp - 0x1054]
call fcn.10003bd6
push str.Accept_Encoding
lea esi, [ebp - 0x1070]
mov byte [ebp - 4], 3
call fcn.10003bd6
lea eax, [ebp - 0x1054]
push eax
mov eax, esi
push eax
push edi
mov byte [ebp - 4], 4
call fcn.10032b59
push ebx
push 1
call fcn.10001b5a
push ebx
push 1
lea esi, [ebp - 0x1054]
mov byte [ebp - 4], bl
call fcn.10001b5a
lea ebx, [edi + 0x60]
lea ecx, [ebp - 0x1038]
call fcn.100329be
mov byte [ebp - 4], 5
mov eax, dword [edi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x10032109
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [edi + 0x98]
cmp dword [eax + 0x18], 8
jb 0x1003211a
mov eax, dword [eax + 4]
jmp 0x1003211d
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 0x10032155
push 6
pop edi
push ebx
push 1
lea esi, [ebp - 0x1038]
call fcn.10001b5a
push ebx
push 1
lea esi, [ebp - 0x108c]
call fcn.10001b5a
mov eax, edi
jmp 0x1003253f
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.1003264f
test eax, eax
jne 0x1003218a
push 8
jmp 0x10032131
push ebx
push ebx
push 3
mov eax, 0x100acd34
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 0x100321b5
push 7
jmp 0x10032131
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 0x100321e8
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 0x1003222a
push dword [edi + 0x3c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [edi + 0x3c], ebx
push 9
jmp 0x10032131
push 0x100b4aa8
lea eax, [ebp - 0x108c]
call fcn.10004bad
test eax, eax
jne 0x10032267
cmp dword [ebp - 0x1020], 8
mov eax, dword [ebp - 0x1034]
jae 0x10032253
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 0x100322cf
cmp dword [edi + 0x1c], 8
jb 0x10032272
mov edx, dword [edi + 8]
jmp 0x10032275
lea edx, [edi + 8]
lea ecx, [ebp - 0x1054]
call fcn.10019aeb
cmp dword [ebp - 0x103c], 0x10
mov ecx, dword [ebp - 0x1050]
jae 0x10032295
lea ecx, [ebp - 0x1050]
cmp dword [ebp - 0x1020], 8
mov eax, dword [ebp - 0x1034]
jae 0x100322aa
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.10003f2c
cmp esi, ebx
jne 0x100322f0
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 0x10032131
lea eax, [ebp - 0x10c4]
push eax
lea ebx, [ebp - 0x10c8]
call fcn.100327ba
mov ecx, ebx
lea edx, [ebp - 0x1070]
mov byte [ebp - 4], 6
call fcn.100326c8
push 0xffffffffffffffff
xor ebx, ebx
push ebx
lea ecx, [edi + 0x20]
mov byte [ebp - 4], 7
call fcn.100019fd
push ebx
push 1
lea esi, [ebp - 0x1070]
mov byte [ebp - 4], 6
call fcn.10001b5a
push edi
lea ecx, [ebp - 0x10c8]
call fcn.10032741
test eax, eax
jne 0x10032373
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.10001b5a
push 0xb
xor ebx, ebx
jmp 0x10032131
lea eax, [ebp - 0x10c4]
lea ecx, [edi + 0x40]
push eax
call fcn.10032852
mov esi, dword [ebp - 0x10d8]
mov dword [ebp - 0x10cc], ebx
cmp dword [ebp + 0x10], ebx
je 0x100323fc
cmp dword [esi + 0x18], 8
jb 0x1003239e
mov eax, dword [esi + 4]
jmp 0x100323a1
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 0x100323fc
push 0x100b17f0
lea eax, [edi + 0x20]
push eax
call fcn.10001a89
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.10001b5a
push 0xd
jmp 0x1003236c
push 0x100b3e7e
lea ecx, [ebp - 0x10a8]
mov dword [ebp - 0x10d4], ebx
mov dword [ebp - 0x10d0], ebx
call fcn.10003bf5
push 0x100acd34
push esi
mov byte [ebp - 4], 8
call fcn.10001a89
mov esi, 0x1000
cmp dword [ebp - 0x10d4], ebx
jne 0x10032441
cmp dword [ebp - 0x10d0], 1
je 0x1003255b
push 0x1001
lea eax, [ebp - 0x101c]
push ebx
push eax
call fcn.10088230
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 0x10032602
mov eax, dword [ebp - 0x10d4]
cmp eax, ebx
jbe 0x1003242c
cmp eax, esi
jbe 0x10032495
xor eax, eax
mov dword [ebp - 0x10d4], eax
mov byte [ebp + eax - 0x101c], bl
cmp dword [ebp + 0x10], ebx
jne 0x100324b9
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp - 0x10a8]
push eax
call fcn.10023f7c
jmp 0x1003242c
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 0x1003242c
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.10003f2c
push ebx
push edi
lea esi, [ebp - 0x10c4]
call fcn.10001b5a
push ebx
push edi
lea esi, [ebp - 0x1038]
call fcn.10001b5a
push ebx
push edi
lea esi, [ebp - 0x108c]
call fcn.10001b5a
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.100848d4
leave
ret 0xc
cmp dword [ebp - 0x1090], 0x10
mov ecx, dword [ebp - 0x10a4]
jae 0x10032570
lea ecx, [ebp - 0x10a4]
lea eax, [ebp - 0x1070]
push eax
call fcn.10019bf6
pop ecx
mov ecx, dword [ebp - 0x10d8]
push 0xffffffffffffffff
push ebx
mov byte [ebp - 4], 9
call fcn.100019fd
push ebx
push 1
lea esi, [ebp - 0x1070]
call fcn.10001b5a
cmp dword [ebp + 0x10], ebx
je 0x100325ae
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.10003f2c
push ebx
push edi
lea esi, [ebp - 0x10c4]
call fcn.10001b5a
push ebx
push edi
lea esi, [ebp - 0x1038]
call fcn.10001b5a
push ebx
push edi
lea esi, [ebp - 0x108c]
call fcn.10001b5a
xor eax, eax
jmp 0x1003253f
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 0x1003262c
push dword [ebp - 0x10cc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp - 0x10a8]
call fcn.10003f2c
push ebx
push 1
lea esi, [ebp - 0x10c4]
call fcn.10001b5a
push 0xc
jmp 0x1003236c