Function at 0x412808
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push 0x8c
mov eax, 0x44472b
call fcn.0041f670
mov edi, ecx
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x5c], ebx
push 0xf
mov dword [ebp - 0x5c], eax
pop eax
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x50], bl
mov dword [ebp - 4], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x38], bl
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x50]
push eax
push ecx
push edx
lea ecx, [ebp - 0x5c]
call fcn.00419f39
mov esi, eax
lea ecx, [ebp - 0x20]
test esi, esi
jns 0x4128a5
push 0x12c
push dword [0x45f650]
call fcn.00401c41
test eax, eax
je 0x412b66
lea eax, [ebp - 0x20]
mov dword [ebp - 0x5c], esi
push eax
lea ecx, [ebp - 0x80]
call fcn.00401ac7
mov edx, str.GetCrashInfoFromProcess_failed:
call fcn.00401c16
lea edx, [ebp - 0x5c]
mov ecx, eax
call fcn.00409d54
mov ecx, eax
call fcn.00401afb
jmp 0x412b66
push 0x2bc
push dword [0x45f650]
call fcn.00401c41
test eax, eax
je 0x412920
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x80]
call fcn.00401ac7
mov edx, str.GetCrashInfoFromProcess:
call fcn.00401c16
cmp dword [ebp - 0x3c], 0x10
mov esi, eax
lea eax, [ebp - 0x50]
jb 0x4128dd
mov eax, dword [ebp - 0x50]
push dword [ebp - 0x40]
xor edx, edx
mov ecx, esi
push eax
push ebx
call fcn.004042d6
add esp, 0xc
mov edx, 0x455d90
mov ecx, esi
call fcn.00401c16
cmp dword [ebp - 0x24], 0x10
mov esi, eax
lea eax, [ebp - 0x38]
jb 0x412908
mov eax, dword [ebp - 0x38]
push dword [ebp - 0x28]
xor edx, edx
mov ecx, esi
push eax
push ebx
call fcn.004042d6
add esp, 0xc
mov ecx, esi
call fcn.00401afb
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x98]
mov eax, dword [ebp - 0x28]
xor esi, esi
add eax, 2
mov dword [ebp - 0x88], ebx
inc esi
mov dword [ebp - 0x84], 0xf
push eax
mov byte [ebp - 0x98], bl
mov dword [ebp - 0x5c], esi
call fcn.0041498d
push 2
push 0x4551d0
lea ecx, [ebp - 0x98]
call fcn.00403b93
cmp dword [ebp - 0x24], 0x10
lea eax, [ebp - 0x38]
jb 0x412970
mov eax, dword [ebp - 0x38]
push dword [ebp - 0x28]
lea ecx, [ebp - 0x98]
push eax
call fcn.00403b93
push 2
push 0x4551d0
lea ecx, [ebp - 0x98]
call fcn.00403b93
push eax
lea ecx, [ebp - 0x78]
call fcn.004073ee
mov dword [ebp - 0x5c], 3
mov byte [ebp - 4], 3
lea eax, [ebp - 0x78]
cmp dword [ebp - 0x64], 0x10
jb 0x4129b1
mov eax, dword [ebp - 0x78]
push dword [ebp - 0x68]
lea ecx, [ebp - 0x50]
push eax
call fcn.00403b93
lea ecx, [ebp - 0x78]
call fcn.00403b6d
lea ecx, [ebp - 0x98]
call fcn.00403b6d
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4129da
mov eax, dword [edi]
push ebx
push ebx
push esi
push ebx
push ebx
push 0x40010000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 4
cmp esi, 0xffffffff
jne 0x412a77
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x12c
push dword [0x45f650]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x5c], eax
call fcn.00401c41
test eax, eax
je 0x412b50
mov eax, dword [ebp - 0x5c]
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x58]
push eax
call fcn.00401ac7
mov edx, str.Failed_to_create_file__
call fcn.00401c16
cmp dword [edi + 0x14], 8
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x5c], eax
jb 0x412a47
mov edi, dword [edi]
push ecx
push edi
push ecx
mov ecx, eax
call fcn.00415cb8
mov ecx, dword [ebp - 0x5c]
add esp, 0xc
mov edx, str.___code
call fcn.00401c16
lea edx, [ebp - 0x60]
mov ecx, eax
call fcn.00409d54
mov ecx, eax
call fcn.00401afb
jmp 0x412b50
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x412a81
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x60], eax
cmp eax, 0xffffffff
jne 0x412aa4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00405534
test eax, eax
jne 0x412aac
mov eax, dword [ebp - 0x60]
shr eax, 0xa
not al
and eax, 1
cmp eax, 1
jne 0x412b50
cmp dword [ebp - 0x3c], 0x10
lea ecx, [ebp - 0x50]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x18], ebx
jb 0x412aca
mov ecx, dword [ebp - 0x50]
push ebx
lea edx, [ebp - 0x18]
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x412af4
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0x18]
jne 0x412af4
mov edx, 0x130000
mov ecx, edi
call fcn.00412bed
mov bl, 1
jmp 0x412b50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x12c
push dword [0x45f650]
lea ecx, [ebp - 0x58]
mov edi, eax
call fcn.00401c41
test eax, eax
je 0x412b3d
lea eax, [ebp - 0x58]
mov dword [ebp - 0x60], edi
push eax
lea ecx, [ebp - 0x80]
call fcn.00401ac7
mov edx, str.Saving_crash_statistics_failed__code
call fcn.00401c16
lea edx, [ebp - 0x60]
mov ecx, eax
call fcn.00409d54
mov ecx, eax
call fcn.00401afb
push 1
lea eax, [ebp - 0x11]
mov byte [ebp - 0x11], 1
push eax
push 4
push esi
call dword [sym.imp.KERNEL32.dll_SetFileInformationByHandle]
cmp esi, 0xffffffff
je 0x412b66
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x412b66
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x38]
call fcn.00403b6d
lea ecx, [ebp - 0x50]
call fcn.00403b6d
mov al, bl
call fcn.0041f61a
ret