Function at 0x30320b
Capabilities:
Check http status code
Connect to http server
Create http request
Get disk size
Get http content length
Read data from internet
Receive data
Send data
Send http request

Disassembly:
mov eax, 0x323800
call fcn.003200c8
mov eax, 0x12230
call fcn.0031f1f0
push ebx
push esi
push edi
xor eax, eax
push eax
push eax
push eax
push eax
mov ebx, ecx
push 0x32caec
mov dword [ebp - 0x24], ebx
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebx + 0x34], eax
test eax, eax
jne 0x303247
push 0xfffffffffffffffe
pop eax
jmp 0x3037bc
mov edx, dword [0x333510]
push 0x14
lea ecx, [edx + 1]
lea eax, [edx + 2]
imul eax, ecx
imul eax, edx
pop ecx
cdq
idiv ecx
push 4
pop edi
push 3
pop eax
mov dword [ebp - 0x30], 0x28
cmp edx, eax
jne 0x3032d9
xor eax, eax
mov dword [ebp - 0x1c], eax
lea ebx, [ebp - 0xe1c]
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ebx
mov ebx, dword [0x333510]
lea edi, [ecx + 1]
lea ecx, [eax + 1]
mov eax, ebx
cdq
idiv ecx
mov eax, ebx
mov ecx, ebx
sub ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov esi, edx
cdq
imul esi, ecx
idiv edi
add esi, eax
sub esi, dword [ebp - 0x28]
push esi
push 0x32caa4
call fcn.003115b8
mov eax, dword [ebp - 0x1c]
pop ecx
pop ecx
mov ecx, edi
push 4
pop edi
add ebx, edi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ebx
cmp ecx, 0xf
jl 0x303283
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, 0x20
jl 0x30327b
mov ebx, dword [ebp - 0x24]
push edi
lea eax, [ebp - 0x30]
push eax
push 0x49
push 0
call dword [sym.imp.WININET.dll_InternetSetOptionW]
xor ecx, ecx
push 7
pop edx
xor eax, eax
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x68], ecx
mov word [ebp - 0x78], ax
mov dword [ebp - 4], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x50], ecx
mov word [ebp - 0x60], ax
mov byte [ebp - 4], 1
push 0xffffffffffffffff
mov dword [ebp - 0x38], ecx
push ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], ecx
push ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x34], edx
mov word [ebp - 0x48], ax
call fcn.0030226e
mov byte [ebp - 4], 2
mov ecx, dword [0x333510]
push 0x18
lea eax, [ecx + 1]
imul eax, ecx
cdq
pop esi
idiv esi
push 0x13
pop eax
cmp edx, eax
jne 0x303376
mov eax, ecx
cdq
push 0x64
pop ecx
idiv ecx
xor ecx, ecx
lea eax, [edx + 0x2f4]
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00310bdb
pop ecx
push eax
call fcn.00311664
pop ecx
cmp byte [ebp + 0xc], 0
je 0x303390
lea eax, [ebx + 0x18]
lea ecx, [ebp - 0x48]
cmp ecx, eax
je 0x303390
push 0xffffffffffffffff
push 0
push eax
call fcn.0030226e
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.00303034
test al, al
jne 0x3033b7
mov ecx, ebx
call fcn.003028f6
push 0xfffffffffffffffd
jmp 0x3037d6
cmp dword [ebp - 0x38], 8
jae 0x3033c4
xor eax, eax
mov byte [ebp + 0xf], al
jmp 0x3033d1
lea ecx, [ebp - 0x48]
call fcn.00303135
mov byte [ebp + 0xf], al
xor eax, eax
cmp dword [ebp - 0x64], 8
push eax
push eax
push 3
push eax
push eax
push dword [ebp - 0x18]
lea ecx, [ebp - 0x78]
cmovae ecx, dword [ebp - 0x78]
push ecx
push dword [ebx + 0x34]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edi, eax
mov dword [ebx + 0x38], edi
test edi, edi
jne 0x303406
mov ecx, ebx
call fcn.003028f6
push 0xfffffffffffffffc
jmp 0x3037d6
mov ecx, dword [0x333510]
mov eax, ecx
imul eax, ecx
imul eax, ecx
push 7
cdq
pop ecx
idiv ecx
mov esi, 0x8040c200
cmp edx, 2
jne 0x30344b
push 0xe
xor ecx, ecx
lea esi, [ebp - 0xc4]
pop ebx
xor edx, edx
mov byte [esi + edx], 0
inc edx
cmp edx, 5
jl 0x303431
inc ecx
add esi, 5
cmp ecx, ebx
jl 0x30342f
mov ebx, dword [ebp - 0x24]
mov esi, 0x8040c200
cmp byte [ebp + 0xf], 0
mov eax, 0x80c0f200
cmovne esi, eax
cmp dword [ebp - 0x4c], 8
lea eax, [ebp - 0x60]
cmovae eax, dword [ebp - 0x60]
xor ecx, ecx
push ecx
push esi
push ecx
push ecx
push ecx
push eax
push ecx
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebx + 0x3c], eax
test eax, eax
jne 0x3034f7
mov esi, dword [0x333510]
mov eax, esi
imul eax, esi
imul eax, esi
push 0x13
cdq
pop ecx
idiv ecx
cmp edx, 5
jne 0x3034e9
test esi, esi
je 0x3034e9
push 3
pop ebx
mov ecx, esi
and ecx, 0x80000001
jns 0x3034a8
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x3034b5
mov eax, esi
cdq
sub eax, edx
mov esi, eax
sar esi, 1
jmp 0x3034bc
lea esi, [esi*2 + 1]
mov eax, esi
cdq
idiv ebx
mov dword [0x333510], esi
sub edx, 0
je 0x3034d5
dec edx
dec edx
je 0x3034d8
dec edx
je 0x3034d9
jmp 0x3034e2
add esi, 2
inc esi
add esi, 2
mov dword [0x333510], esi
test esi, esi
jne 0x303499
mov ebx, dword [ebp - 0x24]
mov ecx, ebx
call fcn.003028f6
push 0xfffffffffffffffb
jmp 0x3037d6
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [ebp - 0x2c]
push ecx
push 6
push eax
mov dword [ebp - 0x2c], 0x1d4c0
call esi
push 4
lea eax, [ebp - 0x2c]
push eax
push 5
push dword [ebx + 0x3c]
call esi
xor eax, eax
push eax
push eax
push eax
push eax
push dword [ebx + 0x3c]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x303563
mov ecx, ebx
call fcn.003028f6
mov ecx, dword [0x333510]
push 0xe
lea eax, [ecx + 1]
imul eax, ecx
cdq
pop ecx
idiv ecx
push 3
pop eax
cmp edx, eax
jne 0x30355c
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
push 0xfffffffffffffffa
jmp 0x3037d6
push 0x3ff
lea eax, [ebp - 0x4c3]
push 0
push eax
mov byte [ebp - 0x4c4], 0
call fcn.0031a9d0
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
add esp, 0xc
lea eax, [ebp - 0x20]
push 0
push eax
lea eax, [ebp - 0x4c4]
push eax
push 0x13
pop ecx
push ecx
push dword [ebx + 0x3c]
mov dword [ebp - 0x20], 0x400
call edi
test eax, eax
jne 0x3035b5
mov ecx, ebx
call fcn.003028f6
push 0xfffffffffffffff9
jmp 0x3037d6
cmp byte [ebp + 8], 0
jne 0x3035c7
mov ecx, ebx
call fcn.003028f6
jmp 0x303788
lea eax, [ebp - 0x4c4]
push eax
call fcn.0031169c
pop ecx
cmp eax, 0xc8
je 0x303673
mov ecx, ebx
call fcn.003028f6
mov ecx, dword [0x333510]
mov eax, ecx
imul eax, ecx
imul eax, ecx
push 0x15
cdq
pop ecx
idiv ecx
cmp edx, 5
jne 0x30366c
xor eax, eax
push 0x1141e
push eax
mov word [ebp - 0x1223c], ax
lea eax, [ebp - 0x1223a]
push eax
call fcn.0031a9d0
add esp, 0xc
xor edi, edi
xor esi, esi
mov ebx, 0xbc
xor edx, edx
test edi, edi
je 0x303650
test edx, edx
je 0x303650
lea eax, [esi + edx]
lea ecx, [esi + edx]
mov ax, word [ebp + eax*2 - 0x123b4]
inc ax
add ax, word [ebp + ecx*2 - 0x1223e]
mov word [ebp + ecx*2 - 0x1223c], ax
inc edx
cmp edx, ebx
jl 0x303628
add esi, ebx
inc edi
cmp esi, 0x8a10
jl 0x303626
movsx eax, word [ebp - 0xe1e]
mov dword [0x333510], eax
push 0xfffffffffffffff8
jmp 0x3037d6
xor esi, esi
push esi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x4c4]
push eax
push 0x20000005
push dword [ebx + 0x3c]
call edi
test eax, eax
je 0x3036d7
mov edx, dword [ebp - 0x20]
dec edx
js 0x3036d7
mov ecx, edx
shl ecx, 3
movzx eax, byte [ebp + edx - 0x4c4]
shl eax, cl
sub ecx, 8
or esi, eax
dec edx
jns 0x30369a
lea eax, [esi - 1]
cmp eax, 0x1fffffe
ja 0x3036d7
lea ecx, [ebx + 0x40]
mov eax, dword [ecx + 8]
sub eax, dword [ecx]
cmp eax, esi
jae 0x3036d7
cmp esi, 0xffffffff
jbe 0x3036d1
push str.vector_T__too_long
call fcn.00310b7f
push esi
call fcn.003038c8
and dword [ebp - 0x14], 0
mov edi, 0x2000
lea esi, [ebx + 0x40]
mov eax, dword [esi + 4]
sub eax, dword [esi]
mov ecx, esi
mov dword [ebp + 0xc], eax
add eax, edi
push eax
call fcn.00303829
mov eax, dword [esi]
add eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
push ecx
push edi
push eax
push dword [ebx + 0x3c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x30373a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x3037cd
cmp edi, 0x20000
jg 0x3037cd
push dword [ebp + 0xc]
or dword [ebp - 0x14], 0xffffffff
mov ecx, esi
call fcn.00303829
add edi, edi
jmp 0x303748
mov eax, dword [ebp - 0x14]
add eax, dword [ebp + 0xc]
mov ecx, esi
push eax
call fcn.00303829
cmp dword [ebp - 0x14], 0
jne 0x3036e3
mov ecx, ebx
call fcn.003028f6
mov esi, dword [0x333510]
mov eax, esi
imul eax, esi
push 0xa
cdq
pop ecx
idiv ecx
cmp edx, 8
jne 0x303788
xor ecx, ecx
mov eax, dword [ebp + ecx*4 - 0x69c]
imul eax, eax, 0x16
add esi, eax
inc ecx
cmp ecx, 0x1d4
jb 0x30376d
mov dword [0x333510], esi
xor esi, esi
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x48]
call fcn.0030222a
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x60]
call fcn.0030222a
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x78]
call fcn.0030222a
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
mov ecx, ebx
call fcn.003028f6
push 0xfffffffffffffff7
pop esi
jmp 0x30378a