Function at 0x40c2a0
Capabilities:
Check http status code
Create http request
Download and write a file
Get common file path
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x45daf2
mov eax, dword fs:[0]
push eax
mov eax, 0x10244
call fcn.00436270
mov eax, dword [0x47b5b0]
xor eax, esp
mov dword [esp + 0x10240], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47b5b0]
xor eax, esp
push eax
lea eax, [esp + 0x10258]
mov dword fs:[0], eax
mov eax, dword [esp + 0x10268]
mov ebp, dword [esp + 0x1026c]
mov edi, dword [esp + 0x10274]
mov esi, ecx
xor ecx, ecx
mov ebx, edx
push 0x206
push ecx
lea edx, [esp + 0x56]
push edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x2c], ebx
mov word [esp + 0x58], cx
call fcn.00434200
xor eax, eax
add esp, 0xc
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], eax
mov dword [ebx], eax
cmp ebp, eax
je 0x40c34b
mov edx, dword [ebp]
push eax
push eax
mov eax, dword [edx + 4]
mov ecx, ebp
call eax
test eax, eax
jne 0x40c34b
mov dword [ebx], 0xa
xor al, al
jmp 0x40c736
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenW]
test edi, edi
je 0x40c385
push edi
call ebp
test eax, eax
jle 0x40c385
push edi
push str.Host:__s_r_n
lea ecx, [esp + 0x54]
push 0x104
push ecx
call fcn.00432d8c
lea edx, [esp + 0x5c]
add esp, 0x10
mov eax, edx
push eax
mov dword [esp + 0x3c], edx
call ebp
mov dword [esp + 0x18], eax
push 0
push 0
push 0
push 1
push 0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [esp + 0x40], ebx
test ebx, ebx
jne 0x40c3b0
mov ecx, dword [esp + 0x20]
mov dword [ecx], 4
xor al, al
jmp 0x40c736
call fcn.00414a0e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40c3ca
push 0x80004005
call fcn.00402190
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
cmp word [esp + 0x10270], 0x50
mov dword [esp + 0x10260], 0
jne 0x40c3ff
push esi
lea ecx, [esp + 0x20]
call fcn.00402080
jmp 0x40c4f9
push str.http:__
mov edi, esi
call ebp
push eax
push str.http:__
push esi
call fcn.004487f4
add esp, 0xc
test eax, eax
jne 0x40c425
push str.http:__
call ebp
lea edi, [esi + eax*2]
push 0x2f
push edi
call fcn.00432dcb
mov edi, eax
add esp, 8
test edi, edi
jne 0x40c457
movzx ecx, word [esp + 0x10270]
push ecx
push esi
lea edx, [esp + 0x24]
push str._s:_u
push edx
call fcn.00401e30
add esp, 0x10
jmp 0x40c4f9
push esi
lea ecx, [esp + 0x48]
call fcn.00401860
mov ecx, edi
sub ecx, esi
sar ecx, 1
push ecx
lea edx, [esp + 0x4c]
push edx
mov ecx, eax
mov byte [esp + 0x10268], 1
call fcn.00402540
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x10264], 2
call fcn.00401940
mov byte [esp + 0x10260], 1
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c4b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x10260], 0
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c4de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
movzx ecx, word [esp + 0x10270]
push edi
push ecx
push str.:_u_s
lea edi, [esp + 0x28]
call fcn.004046f0
add esp, 0xc
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x1c]
push 0
push 0x84400100
push edx
push eax
push edi
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x40c55d
mov ecx, dword [esp + 0x20]
push ebx
mov dword [ecx], 0x15
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [edi - 0x10]
mov dword [esp + 0x10260], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c556
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x40c736
mov ebp, dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
push 0x20000013
push esi
mov dword [esp + 0x38], 4
call ebp
test eax, eax
jne 0x40c5a6
mov ecx, dword [esp + 0x20]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ecx], 0x15
call esi
push ebx
call esi
jmp 0x40c52f
mov eax, dword [esp + 0x2c]
cmp eax, 0xc8
je 0x40c5de
cmp eax, 0xce
je 0x40c5de
mov ecx, dword [esp + 0x20]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ecx], 0x15
call esi
push ebx
call esi
lea ecx, [esp + 0x1c]
call fcn.00402140
xor al, al
jmp 0x40c736
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
push ecx
push 0x20000005
xor edi, edi
push esi
mov dword [esp + 0x40], edi
mov dword [esp + 0x38], 4
mov dword [esp + 0x44], edi
call ebp
test eax, eax
jne 0x40c631
mov edx, dword [esp + 0x20]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [edx], 0x15
call esi
push ebx
call esi
lea ecx, [esp + 0x1c]
call fcn.00402140
xor al, al
jmp 0x40c736
mov eax, dword [esp + 0x3c]
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40c678
mov ecx, dword [esp + 0x20]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ecx], 1
call esi
push ebx
call esi
lea ecx, [esp + 0x1c]
call fcn.00402140
xor al, al
jmp 0x40c736
xor ebp, ebp
mov dword [esp + 0x34], ebp
mov edi, edi
lea edx, [esp + 0x24]
push edx
push 0x10000
lea eax, [esp + 0x25c]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40c75e
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x40c6fc
push 0
lea ecx, [esp + 0x38]
push ecx
push eax
lea edx, [esp + 0x260]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c794
mov eax, dword [esp + 0x34]
cmp eax, dword [esp + 0x24]
jne 0x40c794
mov ecx, dword [esp + 0x28]
add ebp, eax
test ecx, ecx
je 0x40c6f5
mov edx, dword [esp + 0x2c]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
push edx
push ebp
call eax
test eax, eax
je 0x40c788
cmp dword [esp + 0x24], 0
ja 0x40c680
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov eax, dword [esp + 0x2c]
cmp ebp, eax
je 0x40c728
mov ecx, dword [esp + 0x20]
mov dword [ecx], 0x15
lea ecx, [esp + 0x1c]
sete bl
call fcn.00402140
mov al, bl
mov ecx, dword [esp + 0x10258]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x10240]
xor ecx, esp
call fcn.00431fec
add esp, 0x10250
ret
mov ecx, dword [esp + 0x20]
mov dword [ecx], 0x15
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
lea ecx, [esp + 0x1c]
call fcn.00402140
xor al, al
jmp 0x40c736
mov edx, dword [esp + 0x20]
mov dword [edx], 0xa
jmp 0x40c768
mov eax, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x1c]
call fcn.00401860
mov ebx, 3
push ebx
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x20]
mov byte [esp + 0x10268], bl
call fcn.00402540
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x10264], 4
call fcn.00401940
lea ecx, [esp + 0x28]
mov byte [esp + 0x10260], bl
call fcn.00402140
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 1
jl 0x40c806
add eax, 2
push 0x46e600
push eax
call fcn.00432b24
add esp, 8
test eax, eax
je 0x40c806
sub eax, dword [esp + 0x18]
sar eax, 1
je 0x40c85c
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00401f60
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call fcn.004053f0
push ebx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x20]
call fcn.00402540
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x10264], 5
call fcn.00401940
lea ecx, [esp + 0x28]
mov byte [esp + 0x10260], bl
call fcn.00402140
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.00408850
mov edx, dword [esp + 0x28]
add esp, 8
neg eax
sbb eax, eax
and eax, 0xfffffff9
add eax, 9
lea ecx, [esp + 0x18]
mov dword [edx], eax
call fcn.00402140
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov eax, dword [esp + 0x40]
push eax
call esi
lea ecx, [esp + 0x1c]
call fcn.00402140
xor al, al
jmp 0x40c736