Function at 0x40b0cd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x41a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x128], 4
push edi
mov edi, ecx
mov dword [ebp - 0x11c], ebx
mov esi, ebx
mov dword [ebp - 0x124], esi
test edi, edi
je 0x40b3bf
cmp dword [edi + 0xc], 0xffffffff
je 0x40b3bf
push ecx
mov ecx, dword [edi + 8]
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x11c]
mov edx, 0x20000005
push eax
call fcn.0040a524
mov eax, dword [ebp - 0x11c]
add esp, 0xc
test eax, eax
jne 0x40b149
mov dword [ebp - 0x11c], 0x3200000
jmp 0x40b20a
cmp dword [edi + 0x14], ebx
je 0x40b20a
cmp dword [edi + 0x10], ebx
je 0x40b20a
cmp eax, dword [edi + 0x10]
jne 0x40b20a
push ecx
mov ecx, dword [edi + 8]
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x108]
mov dword [ebp - 0x120], 0x100
push eax
push 0x35
pop edx
call fcn.0040a524
add esp, 0xc
test eax, eax
jne 0x40b20a
push ecx
mov ecx, dword [edi + 8]
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x108]
push eax
push 0xb
pop edx
call fcn.0040a524
add esp, 0xc
test eax, eax
je 0x40b1f5
push ecx
lea edx, [ebp - 0x118]
lea ecx, [ebp - 0x108]
call fcn.0040a5da
pop ecx
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x130]
push eax
lea eax, [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 1
jne 0x40b20a
mov eax, dword [edi + 0x30]
mov dword [eax + 4], ebx
jmp 0x40b20a
push ebx
push ebx
push ebx
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [edi + 0x30]
cmp dword [eax], 0xce
jne 0x40b224
push 2
push ebx
push ebx
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40b239
push ebx
push ebx
push ebx
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ecx, 0x4000
call fcn.00407474
and dword [ebp - 0x120], esi
mov ebx, eax
mov edx, ebx
and dword [ebx + 4], esi
mov ecx, dword [edi + 8]
call fcn.0040a581
test eax, eax
je 0x40b326
cmp dword [ebx + 4], 0
je 0x40b330
push 0
lea eax, [ebp - 0x120]
push eax
push dword [ebx + 4]
push dword [ebx + 8]
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b30a
add esi, dword [ebx + 4]
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x124], esi
mov esi, dword [eax + 0x28]
test esi, esi
je 0x40b2be
push dword [ebp - 0x124]
mov ecx, esi
push dword [ebp - 0x11c]
push dword [eax]
push dword [eax + 0x20]
call dword [0x41231c]
call esi
mov eax, dword [edi + 0x2c]
add esp, 0x10
mov esi, dword [eax + 0x24]
test esi, esi
je 0x40b2da
push dword [eax]
mov ecx, esi
push dword [eax + 0x20]
call dword [0x41231c]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x40b2fe
and dword [ebx + 4], 0
mov edx, ebx
mov ecx, dword [edi + 8]
and dword [ebp - 0x120], 0
call fcn.0040a581
test eax, eax
je 0x40b326
mov esi, dword [ebp - 0x124]
jmp 0x40b260
mov eax, dword [edi + 0x30]
mov dword [eax + 4], 0x3f3
jmp 0x40b330
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi + 0x30]
xor ecx, ecx
cmp eax, 0x70
sete cl
add ecx, 0x3f0
mov dword [edx + 4], ecx
jmp 0x40b330
mov eax, dword [edi + 0x30]
mov dword [eax + 4], 0x3ef
mov ecx, 0x400
call fcn.00407474
mov esi, eax
mov edx, str._read_response_file__Status_Code:
push 0x21
mov ecx, esi
call fcn.004076d4
mov edx, dword [edi + 0x30]
mov ecx, esi
mov edx, dword [edx]
call fcn.004077ef
push 0x12
mov edx, str.__content_length:
mov ecx, esi
call fcn.004076d4
mov edx, dword [ebp - 0x11c]
mov ecx, esi
call fcn.004077ef
push 0xe
mov edx, str.__total_read:
mov ecx, esi
call fcn.004076d4
mov edx, dword [ebp - 0x124]
mov ecx, esi
call fcn.004077ef
push 0xe
mov edx, str.__error_code:
mov ecx, esi
call fcn.004076d4
mov edx, dword [edi + 0x30]
add esp, 0x10
mov ecx, esi
mov edx, dword [edx + 4]
call fcn.004077ef
mov ecx, esi
call fcn.0040bdf2
mov ecx, esi
call fcn.0040756a
mov ecx, ebx
call fcn.0040756a
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040dbce
leave
ret