Function at 0x40bcc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x4f4500]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 4]
push ebx
call fcn.0040b730
add esp, 4
lea eax, [ebp - 0x20]
lea edi, [esi + 8]
push eax
mov ecx, edi
call fcn.004036f0
mov eax, dword [0x4fa708]
test eax, eax
je 0x40bd21
mov edx, dword [esi + 0x84]
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [esi + 0x8c]
push edx
mov edx, dword [esi + 0x88]
push ecx
mov ecx, dword [esi]
push edx
push ecx
call eax
add esp, 0x14
test al, al
jne 0x40be70
cmp dword [esi], 2
jl 0x40bd5a
cmp dword [ebp - 8], 0x10
mov eax, dword [ebp - 0x1c]
jae 0x40bd32
lea eax, [ebp - 0x1c]
push eax
push 0x4ee3f4
call fcn.00445041
add eax, 0x40
push eax
call fcn.00444f25
add esp, 0xc
call fcn.00445041
add eax, 0x40
push eax
call fcn.004458f9
add esp, 4
call fcn.0040b880
cmp dword [0x4fa710], 0
jne 0x40bd78
mov eax, dword [0x4fa714]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x40bd85
mov ecx, dword [0x4fa70c]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0040b9c0
test al, al
je 0x40bdc4
mov edx, dword [0x4fa6f8]
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 8], 0x10
mov eax, dword [ebp - 0x1c]
jae 0x40bdad
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
push 0
lea ecx, [ebp - 0x40]
push ecx
push edx
push eax
mov eax, dword [0x4fa6f8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x4fa710], 0
jne 0x40bddc
mov ecx, dword [0x4fa714]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40bde9
mov edx, dword [0x4fa70c]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi]
cmp eax, 4
jne 0x40be2c
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40bdff
call fcn.00415470
cmp dword [0x4fa700], 0
je 0x40bdfa
lea eax, [ebp - 0x3c]
push eax
mov ecx, edi
call fcn.004036f0
lea ecx, [ebp - 0x3c]
push ecx
call dword [0x4fa700]
add esp, 4
cmp dword [ebp - 0x24], 0x10
jb 0x40be70
mov edx, dword [ebp - 0x38]
push edx
jmp 0x40be68
cmp eax, 3
jne 0x40be70
cmp dword [0x4fa704], 0
lea eax, [ebp - 0x3c]
mov ecx, edi
push eax
je 0x40be51
call fcn.004036f0
lea ecx, [ebp - 0x3c]
push ecx
call dword [0x4fa704]
jmp 0x40be1d
call fcn.004036f0
lea ecx, [ebp - 0x3c]
call fcn.0040baf0
cmp dword [ebp - 0x24], 0x10
jb 0x40be70
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00443256
add esp, 4
cmp dword [ebp - 8], 0x10
jb 0x40be82
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00443256
add esp, 4
mov eax, dword [esi + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebx]
mov edx, dword [ecx + 4]
lea esi, [ebx + 0x4c]
lea edi, [esi - 0x48]
mov dword [edx + esi - 0x4c], 0x4ee274
mov ecx, edi
mov dword [edi], 0x4ee23c
call fcn.00402a50
mov ecx, edi
call fcn.00401e60
mov eax, dword [edi - 4]
mov ecx, dword [eax + 4]
mov dword [ecx + edi - 4], 0x4b4638
push esi
mov dword [esi], vtable.std::ios_base.0
call fcn.00442c49
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004436fd
mov esp, ebp
pop ebp
ret