Function at 0x4010be
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x497810
push 0x46c6a4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
cmp byte [0x4ae114], 0
je 0x401374
and byte [0x4ae114], 0
push 0x208
xor esi, esi
push esi
lea eax, [ebp - 0x434]
push eax
call fcn.0046c780
add esp, 0xc
push 0x206
lea eax, [ebp - 0x434]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
ja 0x40113b
push str.Unknown
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x434]
push eax
call fcn.00401b94
pop ecx
mov edi, eax
push edi
lea eax, [ebp - 0x228]
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
call ebx
push 0x2e
lea eax, [ebp - 0x228]
push eax
call fcn.00401385
pop ecx
pop ecx
cmp eax, esi
je 0x401171
and byte [eax], 0
push str.ERRORLOG.TXT
push edi
call ebx
push esi
push 0x80000080
push 2
push esi
push esi
push 0x40000000
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
cmp ebx, 0xffffffff
jne 0x4011af
push str.Error_creating_exception_report_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x401374
push 2
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 8]
mov edi, dword [eax]
mov esi, dword [eax + 4]
mov dword [ebp - 0x43c], esi
push 0x208
push 0
lea eax, [ebp - 0x648]
push eax
call fcn.0046c780
add esp, 0xc
mov dword [ebp - 0x438], str.Unknown
push 0x1c
lea eax, [ebp - 0x664]
push eax
push dword [esi + 0xb8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x401230
push 0x206
lea eax, [ebp - 0x648]
push eax
push dword [ebp - 0x660]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x401230
lea eax, [ebp - 0x648]
push eax
call fcn.00401b94
pop ecx
mov dword [ebp - 0x438], eax
mov eax, dword [edi]
push dword [esi + 0xb8]
push dword [esi + 0xbc]
push dword [ebp - 0x438]
push eax
push eax
call fcn.004019e3
pop ecx
push eax
lea eax, [ebp - 0x228]
push eax
push str._s_caused__s__0x_08x___r_nin_module__s_at__04x:_08x._r_n_r_n
push ebx
call fcn.004013e6
push dword [ebp + 0xc]
push str.Exception_handler_called_in__s._r_n
push ebx
call fcn.004013e6
push ebx
call fcn.00401809
add esp, 0x30
cmp dword [edi], 0xc0000005
jne 0x4012bf
cmp dword [edi + 0x10], 2
jb 0x4012bf
mov eax, str.Read_from
cmp dword [edi + 0x14], 0
je 0x401294
mov eax, str.Write_to
push dword [edi + 0x18]
push eax
push str._s_location__08x_caused_an_access_violation._r_n
lea eax, [ebp - 0xa5c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0xa5c]
push eax
push 0x4ae158
push ebx
call fcn.004013e6
add esp, 0x1c
push esi
push ebx
call fcn.00401d34
push str._r_nBytes_at_CS:EIP:_r_n
push ebx
call fcn.004013e6
add esp, 0x10
mov eax, dword [esi + 0xb8]
mov dword [ebp - 0x668], eax
and dword [ebp - 0x670], 0
cmp dword [ebp - 0x670], 0x10
jge 0x401342
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x670]
mov ecx, dword [ebp - 0x668]
movzx eax, byte [eax + ecx]
push eax
push 0x4ae138
push ebx
call fcn.004013e6
add esp, 0xc
or dword [ebp - 4], 0xffffffff
jmp 0x40133a
inc dword [ebp - 0x670]
jmp 0x4012e7
push dword [esi + 0xc4]
push ebx
call fcn.00401bac
push ebx
call fcn.00401438
push str.ERRORLOG.TXT
push str._r_n__end_of__s___r_n
push ebx
call fcn.004013e6
push ebx
call fcn.004013b1
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret