Function at 0x10012e80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword [0x1010b520]
xor eax, esp
mov dword [esp + 0x438], eax
cmp byte [0x1030f282], 0
push ebx
push esi
push edi
mov ebx, ecx
je 0x10012f0d
cmp byte [ebx + 0xb8], 0
je 0x10012f0d
cmp byte [0x1030f281], 0
mov ecx, 0x10104a88
mov eax, 0x10104a84
cmove eax, ecx
push eax
push ecx
call fcn.10012a50
sub eax, dword [ebx + 0xb0]
sbb edx, dword [ebx + 0xb4]
push edx
push eax
push str.___tTotal_runtime:
push dword [ebx + 0xac]
lea eax, [ebx + 8]
push eax
call fcn.10006d00
add esp, 8
push eax
call fcn.10006d00
add esp, 8
mov ecx, eax
call fcn.10013620
add esp, 4
push eax
call fcn.10006d00
add esp, 8
lea edi, [ebx + 8]
push edi
call fcn.100137e0
add esp, 4
lea eax, [esp + 0x10]
lea esi, [ebx + 0xc]
mov ecx, esi
push eax
call fcn.10007130
cmp dword [0x1030f284], 0
je 0x10012f60
sub esp, 0x18
lea eax, [esp + 0x28]
mov ecx, esp
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.10002470
mov ecx, dword [0x1030f284]
call fcn.1001d060
mov eax, dword [0x1030f298]
test eax, eax
je 0x10012f8f
lea ecx, [esp + 0x10]
push ecx
push dword [ebx + 0xa0]
push dword [ebx + 0xa8]
push dword [ebx + 0xa4]
push dword [ebx]
call eax
add esp, 0x14
test al, al
jne 0x100130ca
cmp dword [ebx], 2
jl 0x10012fcf
cmp dword [esp + 0x24], 0x10
lea edi, [esp + 0x10]
mov esi, dword [esp + 0x20]
cmovae edi, dword [esp + 0x10]
call fcn.100455e0
add eax, 0x40
push eax
push 1
push esi
push edi
call fcn.10045a05
call fcn.100455e0
add eax, 0x40
push eax
call fcn.1004576f
add esp, 0x14
lea esi, [ebx + 0xc]
lea edi, [ebx + 8]
call fcn.10012ba0
cmp dword [0x1030f2a0], 0
jne 0x10012fed
push 0xffffffffffffffff
push dword [0x1030f290]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x10012ff9
push dword [0x1030f27c]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.10012ce0
test al, al
je 0x1001303a
push 2
push 0
push 0
push dword [0x1030f278]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x24], 0x10
lea ecx, [esp + 0xc]
push 0
push ecx
push dword [esp + 0x28]
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
push dword [0x1030f278]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x1030f2a0], 0
jne 0x10013051
push dword [0x1030f290]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1001305d
push dword [0x1030f27c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx], 3
jne 0x100130ca
mov ecx, 0x400
lea eax, [esp + 0x10]
cmp dword [esp + 0x20], ecx
cmovb ecx, dword [esp + 0x20]
cmp dword [esp + 0x24], 0x10
cmovae eax, dword [esp + 0x10]
test ecx, ecx
je 0x10013091
push ecx
push eax
lea eax, [esp + 0x48]
push eax
call fcn.10043260
add esp, 0xc
lea eax, [esp + 0x40]
push eax
call fcn.100254e0
add esp, 4
cmp dword [0x1030f294], 0
je 0x1001310d
lea eax, [esp + 0x28]
mov ecx, esi
push eax
call fcn.10007130
lea eax, [esp + 0x28]
push eax
call dword [0x1030f294]
add esp, 4
lea ecx, [esp + 0x28]
call fcn.10002040
lea ecx, [esp + 0x10]
call fcn.10002040
push dword [ebx + 0xbc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea esi, [edi + 0x50]
mov ecx, esi
call fcn.100059a0
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.10040b5c
mov ecx, dword [esp + 0x448]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10041ad4
mov esp, ebp
pop ebp
ret
call fcn.1001fee0
int3