Function at 0x40c150
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d48ad
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x693f30]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
call ebx
mov eax, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40c2c3
mov ecx, dword [ebp + 0xc]
push ecx
mov dword [ebp - 0x14], 0
push dword [ecx]
lea ecx, [ebp - 0x18]
call fcn.00419c00
add esp, 8
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 0
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push 3
push 0x63fbec
push edi
call esi
push 0
call ebx
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
push 0
push ecx
push dword [eax - 0xc]
lea ebx, [eax - 0x10]
push eax
push edi
call esi
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x40c288
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp + 0x14]
lea ecx, [ebp + 0xc]
push 0x63e93c
mov dword [esi], eax
call fcn.0040e900
mov byte [ebp - 4], 1
lea eax, [ebp + 0xc]
push dword [esi]
push str.0x_08X
push eax
call fcn.0040f520
mov eax, dword [ebp + 8]
add esp, 0xc
mov esi, dword [ebp + 0x10]
mov ecx, esi
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0040f430
push 0x19
push str.Write_Text_File_Errcode:
mov ecx, esi
call fcn.0040f430
mov eax, dword [ebp + 0xc]
mov ecx, esi
push dword [eax - 0xc]
push eax
call fcn.0040f430
push 2
push 0x63fc34
mov ecx, esi
call fcn.0040f430
mov edx, dword [ebp + 0xc]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c288
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], 0
setne byte [ebp + 0xb]
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x40c2ac
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp + 0x14]
lea ecx, [ebp - 0x10]
push 0x63e93c
mov dword [esi], eax
call fcn.0040e900
mov dword [ebp - 4], 2
lea eax, [ebp - 0x10]
push dword [esi]
push str.0x_08X
push eax
call fcn.0040f520
mov eax, dword [ebp + 8]
add esp, 0xc
mov esi, dword [ebp + 0x10]
mov ecx, esi
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0040f430
push 0x19
push str.Text_CreateFile_Errcode:
mov ecx, esi
call fcn.0040f430
mov eax, dword [ebp - 0x10]
mov ecx, esi
push dword [eax - 0xc]
push eax
call fcn.0040f430
push 2
push 0x63fc34
mov ecx, esi
call fcn.0040f430
mov edx, dword [ebp - 0x10]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c34d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10