Function at 0x40bcc8
Capabilities:
Clear file content
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x40bcf8
lea edi, [esi + 4]
push ebx
push edi
mov dword [ebp - 0x18], edi
call fcn.00428c1b
pop ecx
test eax, eax
pop ecx
je 0x40bcff
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x40bcff
xor eax, eax
jmp 0x40bedf
mov eax, dword [0x43b4ec]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x210]
mov ecx, dword [eax]
cmp ecx, eax
mov dword [ebp - 8], ecx
je 0x40be1d
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, 0x43cce4
mov ebx, 0x43cd08
mov eax, ebx
test eax, eax
je 0x40bd36
push ebx
call esi
push ebx
push eax
lea ecx, [ebp - 4]
call fcn.00404d06
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 0xc]
test ebx, ebx
jne 0x40bd4e
xor eax, eax
jmp 0x40bd51
push ebx
call esi
push ebx
push eax
lea ecx, [ebp - 4]
call fcn.00404d06
mov ebx, 0x43cd00
mov eax, ebx
test eax, eax
je 0x40bd69
push ebx
call esi
push ebx
push eax
lea ecx, [ebp - 4]
call fcn.00404d06
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 0x10]
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
cmp eax, dword [ebx + 4]
je 0x40bdee
mov eax, dword [eax + 0xc]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x40bd93
push eax
call esi
push dword [ebp - 0x14]
lea ecx, [ebp - 4]
push eax
call fcn.00404d06
mov ecx, 0x43b588
mov eax, ecx
test eax, eax
je 0x40bdb2
push ecx
call esi
mov ecx, 0x43b588
push ecx
push eax
lea ecx, [ebp - 4]
call fcn.00404d06
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 4]
mov eax, dword [eax + 0x10]
push eax
push dword [eax - 8]
call fcn.00404d06
mov eax, edi
test eax, eax
je 0x40bdd7
push edi
call esi
push edi
push eax
lea ecx, [ebp - 4]
call fcn.00404d06
lea ecx, [ebp - 0xc]
call fcn.0040d453
mov eax, dword [ebp - 0xc]
jmp 0x40bd81
mov eax, edi
test eax, eax
je 0x40bdf7
push edi
call esi
push edi
push eax
lea ecx, [ebp - 4]
call fcn.00404d06
lea ecx, [ebp - 8]
call fcn.0040d16b
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ecx + 0x210]
jne 0x40bd28
xor ebx, ebx
push ebx
push 0x20
push 4
push ebx
push 1
push 0x40000000
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x40bed4
mov eax, dword [ebp - 4]
mov eax, dword [eax - 8]
shl eax, 1
jne 0x40be54
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x40becb
lea esi, [eax + 2]
lea eax, [esi + 2]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
push 2
push ebx
lea eax, [edi + esi]
push eax
call sub.MSVCRT.dll_memset
add esp, 0x10
cmp edi, ebx
je 0x40becb
lea eax, [ebp - 0x18]
push 2
push eax
push edi
mov dword [ebp - 0x18], 0xfeff
call sub.MSVCRT.dll_memcpy
push dword [ebp - 4]
lea eax, [edi + 2]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 0x14
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], ebx
push ebx
push eax
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bec4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [ebp - 0xc], esi
jne 0x40bec4
mov dword [ebp - 0x10], 1
push edi
call fcn.00431d38
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 4]
call fcn.00404beb
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret