Function at 0x40b5ff
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 0x40b62f
lea edi, [esi + 4]
push ebx
push edi
mov dword [ebp - 0x18], edi
call fcn.00425425
pop ecx
test eax, eax
pop ecx
je 0x40b636
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x40b636
xor eax, eax
jmp 0x40b816
mov eax, dword [0x4384ec]
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 0x40b754
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, 0x439b6c
mov ebx, 0x439b90
mov eax, ebx
test eax, eax
je 0x40b66d
push ebx
call esi
push ebx
push eax
lea ecx, [ebp - 4]
call fcn.00404d0d
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 0xc]
test ebx, ebx
jne 0x40b685
xor eax, eax
jmp 0x40b688
push ebx
call esi
push ebx
push eax
lea ecx, [ebp - 4]
call fcn.00404d0d
mov ebx, 0x439b88
mov eax, ebx
test eax, eax
je 0x40b6a0
push ebx
call esi
push ebx
push eax
lea ecx, [ebp - 4]
call fcn.00404d0d
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 0x40b725
mov eax, dword [eax + 0xc]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x40b6ca
push eax
call esi
push dword [ebp - 0x14]
lea ecx, [ebp - 4]
push eax
call fcn.00404d0d
mov ecx, 0x438588
mov eax, ecx
test eax, eax
je 0x40b6e9
push ecx
call esi
mov ecx, 0x438588
push ecx
push eax
lea ecx, [ebp - 4]
call fcn.00404d0d
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 4]
mov eax, dword [eax + 0x10]
push eax
push dword [eax - 8]
call fcn.00404d0d
mov eax, edi
test eax, eax
je 0x40b70e
push edi
call esi
push edi
push eax
lea ecx, [ebp - 4]
call fcn.00404d0d
lea ecx, [ebp - 0xc]
call fcn.0040cd8a
mov eax, dword [ebp - 0xc]
jmp 0x40b6b8
mov eax, edi
test eax, eax
je 0x40b72e
push edi
call esi
push edi
push eax
lea ecx, [ebp - 4]
call fcn.00404d0d
lea ecx, [ebp - 8]
call fcn.0040caa2
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ecx + 0x210]
jne 0x40b65f
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 0x40b80b
mov eax, dword [ebp - 4]
mov eax, dword [eax - 8]
shl eax, 1
jne 0x40b78b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x40b802
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 0x40b802
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 0x40b7fb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [ebp - 0xc], esi
jne 0x40b7fb
mov dword [ebp - 0x10], 1
push edi
call fcn.0042e536
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 4]
call fcn.00404bf2
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret