Function at 0x40c9c0
Capabilities:
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor bl, bl
push edi
lea edi, [ebp - 0x40]
mov dword [ebp - 0x24], esi
push edi
lea edi, [ebp - 0x38]
mov dword [ebp - 0x20], 0
push edi
lea edi, [ebp - 0x44]
mov dword [ebp - 0x18], 0xc000000d
push edi
push eax
call fcn.0040c600
mov edi, edi
test al, al
jne 0x40ca17
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414c55
mov esp, ebp
pop ebp
ret 8
cmp byte [esi + 0xc], bl
jne 0x40ca62
mov dword [ebp - 0x28], 0x8000
call fcn.00407de0
push 0x8012
push 0xc
push eax
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
lock inc dword ds:[eax + 4]
lea ecx, [eax + 8]
mov dword [eax], 0
lea eax, [ecx + 8]
mov dword [ebp - 0x1c], ecx
mov dword [ecx + 4], eax
xor edx, edx
mov word [eax], dx
mov dword [ecx], edx
mov eax, dword [ecx + 4]
mov dword [ebp - 0x2c], ecx
xor ecx, ecx
mov word [eax], cx
jmp 0x40ca68
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], ecx
call fcn.00407de0
push 0x8011
push 0xc
push eax
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
lock inc dword [eax + 4]
mov dword [eax], 0
lea edi, [eax + 8]
lea eax, [edi + 8]
mov dword [edi], 0x8000
mov dword [edi + 4], eax
mov byte [eax], bl
lea eax, [ebp - 8]
push eax
push 0x8000
push dword [edi + 4]
push dword [ebp - 0x38]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40cbf2
mov esi, dword [ebp - 8]
test esi, esi
je 0x40cbf2
add dword [ebp - 0x20], esi
lea eax, [ebp - 0xc]
push eax
push 0x80000041
call dword [sym.imp.ntdll.dll_NtSetThreadExecutionState]
cmp esi, 0x8000
mov eax, 0x8000
mov ecx, esi
cmova ecx, eax
mov eax, dword [edi + 4]
mov dword [edi], ecx
mov byte [ecx + eax], 0
mov eax, dword [ebp - 0x24]
cmp byte [eax + 0xc], 0
je 0x40cb1e
push 0
push 0
push esi
push dword [edi + 4]
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0
push 0
push dword [eax]
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov dword [ebp - 0x18], eax
test eax, eax
jns 0x40cbb7
xor bl, bl
jmp 0x40cbf5
lea edx, [ebp - 0x34]
mov ecx, edi
call fcn.0040a000
mov dword [ebp - 0x18], eax
test eax, eax
js 0x40cb17
mov esi, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [esi]
mov edx, dword [ebx]
mov eax, dword [esi + 4]
add edx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x28], edx
jae 0x40cb5a
lea ecx, [ebp - 0x2c]
call fcn.00408420
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebx + 4]
add eax, dword [ebx]
push ecx
push dword [ebp - 0x3c]
push eax
call fcn.00416670
mov eax, dword [ebp - 0x30]
xor edx, edx
add dword [ebx], eax
add esp, 0xc
mov ecx, dword [ebx]
mov eax, dword [ebx + 4]
lea ebx, [esi - 8]
mov word [ecx + eax], dx
or ecx, 0xffffffff
lea eax, [ebx + 4]
lock xadd dword [eax], ecx
lea eax, [ecx - 1]
test eax, eax
jne 0x40cbb7
mov esi, dword [ebx]
test esi, esi
je 0x40cba8
push dword ds:[ebp - 0x34]
mov ecx, esi
call dword [0x427534]
call esi
call fcn.00407de0
push ebx
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword ds:[ebp - 0x24]
mov bl, 1
mov esi, dword [eax + 4]
test esi, esi
je 0x40ca96
push dword ds:[eax + 8]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x40]
cmp ecx, eax
cmova eax, ecx
push eax
push ecx
mov ecx, esi
call dword [0x427534]
call esi
test al, al
jne 0x40ca96
xor bl, bl
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x24]
cmp byte [esi + 0xc], 0
jne 0x40cc1b
mov edi, edi
test eax, eax
js 0x40cc0d
mov ecx, dword [ebp - 0x1c]
mov bl, 1
mov dword [esi], ecx
jmp 0x40cc1b
lea ecx, [ebp - 0x2c]
call fcn.004083d0
mov dword [esi], 0
lea eax, [ebp - 0xc]
push eax
push 0x80000000
call dword [sym.imp.ntdll.dll_NtSetThreadExecutionState]
lea eax, [edi - 4]
or edx, 0xffffffff
lock xadd dword [eax], edx
lea eax, [edx - 1]
test eax, eax
jne 0x40cc66
mov esi, dword ds:[edi - 8]
test esi, esi
je 0x40cc4f
push edi
mov ecx, esi
call dword [0x427534]
call esi
call fcn.00407de0
lea ecx, ds:[edi - 8]
push ecx
push 0
push eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 0x38]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x44]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414c55
mov esp, ebp
pop ebp
ret 8