Function at 0x4011e0
Capabilities:
Check http status code
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xee4
mov eax, dword [0x4121f4]
xor eax, esp
mov dword [esp + 0xee0], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebx]
lea esi, [esp + 0x28]
mov dword [esp + 0x10], 0x84000000
mov dword [esp + 0x20], 0x20
call fcn.00401880
mov ecx, 1
cmp dword [esp + 0x28], ecx
jne 0x401230
mov dword [esp + 0x10], 0x84800000
mov eax, dword [ebx + 0xc]
sub eax, 0
je 0x401246
sub eax, ecx
jne 0x401561
or dword [esp + 0x10], ecx
jmp 0x40124b
or dword [esp + 0x10], 2
mov edx, dword [esp + 0xa58]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401257
sub eax, esi
sar eax, 1
push eax
push edx
lea eax, [edi + 0x34]
push 0x104
push eax
call fcn.00402746
add esp, 0x10
cmp dword [edi + 0x244], 2
je 0x40128c
mov eax, 0x232f
jmp 0x401558
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 0x250]
push 0
push ecx
push 0
mov dword [edi + 0x244], 3
mov edx, dword [ebx]
push 0
push edx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
test esi, esi
jne 0x4012d4
mov eax, 0x2328
mov dword [edi + 0x248], eax
mov dword [ebx + 0x14], eax
mov dword [edi + 0x244], 2
jmp 0x401561
push 0x3e
lea ecx, [esp + 0xa66]
push 0
push ecx
mov word [esp + 0xa6c], 0
call fcn.00406a80
add esp, 0xc
push 0
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0xa68]
push eax
push 0x13
push esi
mov dword [esp + 0x38], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4012b7
lea ecx, [esp + 0xa60]
push ecx
call fcn.0040261f
add esp, 4
cmp eax, 0xc8
je 0x401334
cmp eax, 0x130
jne 0x4012b7
push 0x3e
lea edx, [esp + 0xaa6]
push 0
push edx
mov word [esp + 0xaac], 0
call fcn.00406a80
add esp, 0xc
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xaa8]
push ecx
push 5
push esi
mov dword [esp + 0x30], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x401380
mov eax, 0x232c
jmp 0x4012bc
lea edx, [esp + 0xaa0]
push edx
mov dword [edi + 0x23c], 0
call fcn.0040261f
mov dword [edi + 0x240], eax
mov eax, 3
mov dword [ebx + 0x14], eax
add esp, 4
mov dword [edi + 0x244], eax
cmp dword [ebx + 0x10], 8
mov dword [esp + 0x18], 0
je 0x4013f6
mov eax, dword [ebx + 4]
push 0x20
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebx + 4]
push 0x40fbd4
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004026f6
add esp, 0xc
test eax, eax
je 0x40143e
mov eax, 0x2330
jmp 0x4012bc
cmp dword [ebx + 4], 0
je 0x401406
mov eax, 0x2333
jmp 0x4012bc
mov eax, dword [edi + 0x240]
xor ecx, ecx
add eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040238e
mov dword [ebx + 4], eax
mov ecx, dword [edi + 0x240]
lea edx, [ecx + ecx + 2]
push edx
push 0
push eax
call fcn.00406a80
add esp, 0x10
mov dword [esp + 0x14], 0x400
jmp 0x401450
push 0x401
lea eax, [esp + 0xae4]
push 0
push eax
call fcn.00406a80
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push 0x400
lea edx, [esp + 0xae8]
push edx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [ebx + 0x10], 8
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0xae0]
je 0x4014a1
mov eax, dword [esp + 0x18]
push eax
push ecx
push 1
push edx
call fcn.0040296e
jmp 0x4014be
mov eax, dword [edi + 0x23c]
push ecx
mov ecx, dword [edi + 0x240]
push edx
mov edx, dword [ebx + 4]
sub ecx, eax
push ecx
lea eax, [edx + eax*2]
push eax
call fcn.00402c43
mov eax, dword [esp + 0x24]
add dword [edi + 0x23c], eax
mov ecx, dword [edi + 0x23c]
add esp, 0x10
cmp eax, 0x400
jae 0x401450
mov eax, dword [ebx + 0x10]
cmp eax, 8
je 0x40151b
mov ecx, eax
and ecx, 2
cmp cl, 2
mov esi, 0x22
je 0x4014f7
mov esi, dword [esp + 0x20]
and eax, 4
cmp al, 4
jne 0x401501
or esi, 1
mov edx, dword [esp + 0x18]
push edx
call fcn.00402a67
mov eax, dword [ebx + 4]
add esp, 4
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x40153a
cmp ecx, dword [edi + 0x240]
je 0x40153a
mov eax, dword [ebx + 4]
test eax, eax
je 0x40153a
push eax
call fcn.004029f0
add esp, 4
mov dword [ebx + 4], 0
mov dword [edi + 0x244], 2
mov eax, dword [ebx + 8]
test eax, eax
jbe 0x40157a
cmp dword [edi + 0x23c], eax
je 0x40158b
mov eax, 0x2332
mov dword [edi + 0x248], eax
mov dword [ebx + 0x14], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xee0]
xor ecx, esp
call fcn.004025e6
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi + 0x23c]
cmp eax, dword [edi + 0x240]
jne 0x401553
mov dword [ebx + 8], eax
mov ecx, dword [esp + 0xeec]
mov eax, 5
mov dword [edi + 0x248], eax
pop edi
mov dword [ebx + 0x14], eax
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004025e6
mov esp, ebp
pop ebp
ret 8