Function at 0x40c412
Capabilities:
Write file on windows

Disassembly:
push 0x38
mov eax, 0x46fb22
call fcn.0045c81f
mov edi, ecx
mov esi, edx
mov eax, esi
call fcn.0040c2af
test al, al
jne 0x40c43a
mov eax, 0x80040007
call fcn.0045c8f7
ret 0xc
mov bl, byte [esi + 0x50]
and bl, 1
mov byte [ebp - 0xd], bl
call fcn.0040b04a
cmp dword [ebp + 8], 0xffffffff
jne 0x40c452
push 6
jmp 0x40c461
cmp dword [ebp + 0xc], 0
jne 0x40c468
test bl, bl
jne 0x40c468
push 0x80070057
mov eax, esi
call fcn.0040bbba
mov eax, esi
call fcn.0040b355
test al, al
je 0x40c478
mov eax, dword [esi + 0x10]
jmp 0x40c432
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40c487
mov eax, dword [ecx]
call dword [eax]
test al, al
je 0x40c473
mov ebx, 0x498be8
push ebx
lea ecx, [ebp - 0x14]
call fcn.00401ed0
and dword [ebp - 4], 0
cmp byte [ebp - 0xd], 0
jne 0x40c58b
lea eax, [ebp - 0x1c]
push 0x7564
push eax
call fcn.00450a40
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
lea ecx, [edi + ecx - 1]
push ecx
push edi
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00404d0a
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x1c]
add esp, 0x18
add ecx, 0xfffffff0
call fcn.0040267a
mov edi, dword [ebp - 0x14]
mov eax, dword [edi - 0xc]
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x1c]
mov edx, dword [edx + 0x20]
push 0
push 0x4000000
push eax
push edi
push ecx
push edx
call fcn.0044e0d0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x40c58e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov ecx, eax
call fcn.0040bacd
push dword [esi + 0xc]
lea edi, [ebp + 0xc]
call fcn.0040b760
pop ecx
push ebx
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 2
call fcn.00401ed0
mov byte [ebp - 4], 3
push dword [ebp - 0x14]
lea eax, [ebp + 0x10]
push dword [ebp + 0xc]
push str.desc_s___s_
push eax
call fcn.00404d0a
mov eax, dword [esi + 0x10]
mov edi, dword [ebp + 0x10]
add esp, 0x10
push str._save
push eax
push edi
call fcn.00436920
mov ecx, eax
call fcn.00436bd0
mov esi, dword [esi + 0x10]
lea ecx, [edi - 0x10]
call fcn.0040267a
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.0040267a
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040267a
mov eax, esi
jmp 0x40c432
mov edi, dword [esi + 0x24]
push 0x400
lea ecx, [ebp - 0x44]
call fcn.0040aae3
xor eax, eax
mov byte [ebp - 4], 4
cmp dword [ebp - 0x28], eax
je 0x40c5ab
cmp dword [ebp - 0x24], eax
jne 0x40c5c4
lea edi, [ebp - 0x44]
call fcn.00401938
mov esi, dword [esi + 0x10]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0
call fcn.0040ab4f
jmp 0x40c579
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x40c5db
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x40c647
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push edi
call fcn.0044e260
add esp, 0x10
test eax, eax
je 0x40c639
cmp dword [ebp - 0x18], 0
je 0x40c647
test ebx, ebx
je 0x40c606
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x40c647
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x28]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c639
test ebx, ebx
je 0x40c5ca
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x40c647
push dword [ebp - 0x18]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
jmp 0x40c5ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov ecx, eax
call fcn.0040bacd
cmp byte [ebp - 0xd], 0
jne 0x40c5b3
push edi
call fcn.0044de60
pop ecx
jmp 0x40c5b3