Function at 0x40ca70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x445a40
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x458008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x444], esi
lea edi, [esi + 8]
mov dword [ebp - 4], 1
push edi
call fcn.0040d610
add esp, 4
lea eax, [ebp - 0x428]
mov ecx, edi
push eax
call fcn.004092f0
mov byte [ebp - 4], 2
mov eax, dword [0x45b958]
test eax, eax
je 0x40cafb
lea ecx, [ebp - 0x428]
push ecx
push dword [esi + 0xa0]
push dword [esi + 0xa8]
push dword [esi + 0xa4]
push dword [esi]
call eax
add esp, 0x14
test al, al
jne 0x40ccba
cmp dword [esi], 2
jl 0x40cb3c
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
push 0x450798
call fcn.0042a2a5
add eax, 0x40
push eax
call fcn.0044123c
add esp, 0xc
call fcn.0042a2a5
add eax, 0x40
push eax
call fcn.00426d92
add esp, 4
call fcn.0040c440
cmp dword [0x45b95c], 0
jne 0x40cb5a
push 0xffffffffffffffff
push dword [0x45b94c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x40cb66
push dword [0x45b948]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 3
call fcn.0040c5a0
test al, al
je 0x40cbb5
push 2
push 0
push 0
push dword [0x45b944]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x414], 0x10
lea ecx, [ebp - 0x448]
push 0
push ecx
push dword [ebp - 0x418]
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
push dword [0x45b944]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 4], 2
cmp dword [0x45b95c], 0
jne 0x40cbd0
push dword [0x45b94c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40cbdc
push dword [0x45b948]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi]
cmp eax, 4
jne 0x40cc67
mov ecx, 0x400
lea eax, [ebp - 0x428]
cmp dword [ebp - 0x418], ecx
cmovb ecx, dword [ebp - 0x418]
cmp dword [ebp - 0x414], 0x10
cmovae eax, dword [ebp - 0x428]
test ecx, ecx
je 0x40cc22
push ecx
push eax
lea eax, [ebp - 0x410]
push eax
call fcn.00428980
add esp, 0xc
lea eax, [ebp - 0x410]
push eax
call fcn.0040eb20
add esp, 4
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40cc40
call fcn.0040eb00
cmp dword [0x45b950], 0
je 0x40cc3b
lea eax, [ebp - 0x440]
mov ecx, edi
push eax
call fcn.004092f0
push eax
mov byte [ebp - 4], 4
call dword [0x45b950]
add esp, 4
jmp 0x40cca3
cmp eax, 3
jne 0x40ccba
cmp dword [0x45b954], 0
lea eax, [ebp - 0x440]
mov ecx, edi
push eax
je 0x40cc93
call fcn.004092f0
push eax
mov byte [ebp - 4], 5
call dword [0x45b954]
add esp, 4
jmp 0x40cca3
call fcn.004092f0
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.0040c6a0
cmp dword [ebp - 0x42c], 0x10
jb 0x40ccba
push dword [ebp - 0x440]
call fcn.00426468
add esp, 4
cmp dword [ebp - 0x414], 0x10
jb 0x40ccd1
push dword [ebp - 0x428]
call fcn.00426468
add esp, 4
push dword [esi + 0xac]
mov byte [ebp - 0x428], 0
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 0xf
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xffffffff
lea esi, [edi + 0x50]
mov eax, dword [esi - 0x50]
mov eax, dword [eax + 4]
mov dword [eax + esi - 0x50], 0x450684
mov eax, dword [esi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ecx + esi - 0x54], eax
lea ecx, [esi - 0x4c]
call fcn.00408130
mov eax, dword [esi - 0x50]
push esi
mov eax, dword [eax + 4]
mov dword [eax + esi - 0x50], 0x450560
mov eax, dword [esi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ecx + esi - 0x54], eax
mov dword [esi], vtable.std::ios_base.0
call fcn.004409ff
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00426319
mov esp, ebp
pop ebp
ret