Function at 0x40bb20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430e78
mov eax, dword fs:[0]
push eax
mov eax, 0x4cc4
call fcn.0042f270
mov eax, dword [0x44700c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x4cc8], esi
mov ebx, ecx
mov dword [ebp - 0x4ccc], ebx
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x4cc0]
call fcn.0040a790
push 4
push dword [0x4422c0]
mov eax, 0x50
mov dword [ebp - 0x2870], 2
mov word [ebp - 0x2874], ax
mov eax, ecx
push 0x21
push eax
mov dword [ebp - 0x286c], 4
call fcn.00421a55
push eax
call fcn.00401f70
add esp, 0x14
lea ecx, [ebp - 0x4cc0]
call fcn.0040a790
push ebx
call fcn.0040a1b0
test eax, eax
jne 0x40bbdc
test edi, edi
je 0x40be97
push ebx
push str.Invalid_URL____s
push edi
call fcn.00407a40
add esp, 0xc
jmp 0x40be97
lea ecx, [ebp - 0x2850]
call fcn.00411fb0
push 0x2710
lea ecx, [ebp - 0x2850]
mov dword [ebp - 4], 0
call fcn.004122a0
test al, al
jne 0x40bc1e
test edi, edi
je 0x40be8c
push ebx
push str.Httpclient_Init_Fail____s
push edi
call fcn.00407a40
add esp, 0xc
jmp 0x40be8c
lea eax, [ebp - 0x4cc0]
push eax
lea ecx, [ebp - 0x2850]
call fcn.00412320
test al, al
jne 0x40bc50
test edi, edi
je 0x40be8c
push ebx
push str.Httpclient_Connect_Fail____s
push edi
call fcn.00407a40
add esp, 0xc
jmp 0x40be8c
sub esp, 0xc
lea eax, [ebp - 0x4878]
lea ecx, [ebp - 0x2850]
push eax
call fcn.00412490
test al, al
jne 0x40bc85
test edi, edi
je 0x40be8c
push ebx
push str.Httpclient_OpenFile_Fail____s
push edi
call fcn.00407a40
add esp, 0xc
jmp 0x40be8c
lea ecx, [ebp - 0x2850]
call fcn.00412680
lea ecx, [eax - 0xc8]
cmp ecx, 0x69
ja case.0x40bca6.207
movzx ecx, byte [ecx + 0x40bec0]
jmp dword [ecx*4 + 0x40beb8]
mov eax, dword [0x448ebc]
test eax, eax
jne 0x40bce2
push 0x20
call fcn.0041965a
add esp, 4
mov dword [ebp - 0x4cd0], eax
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.004126f0
mov dword [0x448ebc], eax
test eax, eax
jne 0x40bce2
xor ecx, ecx
mov dword [ecx], 1
lea ecx, [eax + 0x14]
xor eax, eax
cmp eax, dword [ecx]
push 0
push 0x80
push 2
sbb eax, eax
and eax, ecx
push eax
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x4cd0], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x40bd5d
test edi, edi
je 0x40bd35
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x4cc8]
push str.CreateFile_Fail____s__d_
push edi
call fcn.00407a40
add esp, 0x10
mov eax, dword [ebp - 0x2834]
test eax, eax
je 0x40bd50
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x2834], 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40be8c
push 0x1000
lea eax, [ebp - 0x1010]
push 0
push eax
call fcn.0041c000
add esp, 0xc
mov dword [ebp - 0x4cc4], 0
nop dword [eax]
push ecx
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x2850]
call fcn.00412410
mov ebx, eax
mov dword [ebp - 0x4cc4], ebx
test ebx, ebx
js 0x40be45
push 0
lea eax, [ebp - 0x4cc4]
push eax
push ebx
lea eax, [ebp - 0x1010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bdfe
test ebx, ebx
jg 0x40bd80
mov eax, dword [ebp - 0x2834]
test eax, eax
je 0x40bdde
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x2834], 0
test esi, esi
je 0x40bde9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x2850]
call fcn.004121f0
mov eax, 1
jmp 0x40be99
test edi, edi
je 0x40be1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x4cc8]
push str.WriteFile_Fail____s__d_
push edi
call fcn.00407a40
add esp, 0x10
mov eax, dword [ebp - 0x2834]
test eax, eax
je 0x40be38
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x2834], 0
test esi, esi
je 0x40be8c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40be8c
test edi, edi
je 0x40be1d
lea eax, [ebp - 0x4878]
push eax
push dword [ebp - 0x4ccc]
push str.RemoteFile_Read_Fail____s_s
jmp 0x40be14
test edi, edi
je 0x40be71
push eax
push ebx
push str.Invalid_HttpStatus____s:_d
push edi
call fcn.00407a40
add esp, 0x10
mov eax, dword [ebp - 0x2834]
test eax, eax
je 0x40be8c
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x2834], 0
lea ecx, [ebp - 0x2850]
call fcn.004121f0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00419174
mov esp, ebp
pop ebp
ret