Function at 0x4204ed
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x5836e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x320], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x30c], eax
xor eax, eax
push 0x288
push eax
push ebx
mov dword [ebp - 0x318], ecx
mov esi, eax
mov dword [ebp - 0x31c], eax
call fcn.004f5a90
xor eax, eax
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push 8
pop ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
mov eax, dword [0x5a2434]
test eax, eax
je 0x420568
push eax
lea eax, [ebp - 0x34]
push 0x52af44
push eax
call fcn.00409b1f
add esp, 0xc
push 0x5a2434
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov edi, dword [ebp - 0x318]
test edi, edi
je 0x4205cb
push edi
mov dword [ebp - 0x344], 0xb
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x33c], edi
mov dword [ebp - 0x338], 1
lea eax, [eax*2 + 2]
mov dword [ebp - 0x340], eax
lea eax, [ebp - 0x344]
mov dword [ebp - 0x334], eax
push 0x800
xor edi, edi
push edi
push dword [ebp - 0x30c]
call fcn.004f5a90
add esp, 0xc
push ebx
push edi
push edi
push 0x10
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
mov dword [ebp - 0x310], edi
test edi, edi
jns 0x42062a
push 0x288
push 0
push ebx
call fcn.004f5a90
add esp, 0xc
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x420620
xor eax, eax
cmp word [ebx], ax
jne 0x420633
mov eax, str.CreateDumpForReport_called__get_desktop_or_temp_folder_failed
jmp 0x420770
xor esi, esi
cmp word [ebx], si
je 0x420649
jmp 0x420635
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [ebx + eax*2 - 2], 0x5c
mov eax, 0x52afcc
jne 0x42064e
mov eax, str.ConEmuTrap
push eax
mov edi, 0x144
push edi
push ebx
call fcn.004019cd
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, 0x514870
push 8
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x14]
sub edi, esi
push eax
push 0x1c
push 5
push 0x12
push str.Trap__02u_02u_02u_s__u_s.dmp
lea eax, [ebx + esi*2]
push edi
push eax
call fcn.004e22e7
add esp, 0x24
xor eax, eax
push eax
push 0x80
push 2
push eax
push 3
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x324], esi
cmp esi, 0xffffffff
jne 0x4206d7
mov eax, str.CreateDumpForReport_called__create_dump_file_failed
jmp 0x42076a
push str.Dbghelp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x31c], eax
test eax, eax
jne 0x4206f3
mov eax, str.CreateDumpForReport_called__LoadLibrary_Dbghelp.dll__failed
jmp 0x42076a
push str.MiniDumpWriteDump
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x314], eax
test eax, eax
jne 0x420710
mov eax, str.CreateDumpForReport_called__MiniDumpWriteDump_not_found
jmp 0x42076a
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, dword [ebp - 0x320]
xor edx, edx
mov dword [ebp - 0x330], eax
xor eax, eax
cmp dword [ebp - 0x318], edx
push eax
mov dword [ebp - 0x328], eax
lea eax, [ebp - 0x338]
cmove eax, edx
mov dword [ebp - 0x32c], edi
push eax
lea eax, [ebp - 0x330]
push eax
push 2
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0x314]
test eax, eax
jne 0x4207c4
mov eax, str.CreateDumpForReport_called__MiniDumpWriteDump_failed
mov edi, dword [ebp - 0x310]
push 0xff
push eax
push dword [ebp - 0x30c]
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
xor eax, eax
cmp word [ebx], ax
je 0x4207af
push 0x5219f4
push 0x400
push dword [ebp - 0x30c]
call fcn.004019cd
push ebx
push 0x400
push dword [ebp - 0x30c]
call fcn.004019cd
test edi, edi
jne 0x4208e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x4208e7
push 0x20a
xor ebx, ebx
lea eax, [ebp - 0x308]
push ebx
push eax
call fcn.004f5a90
add esp, 0xc
lea eax, [ebp - 0x308]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x308]
push eax
call fcn.004e5a5b
mov dword [ebp - 0x314], eax
pop ecx
test edi, edi
je 0x42089a
mov ecx, dword [edi]
test ecx, ecx
je 0x42089a
push dword [ecx]
lea eax, [ebp - 0xfc]
push str.Exception_0x_08X
push eax
call fcn.00409b7d
mov eax, dword [edi]
add esp, 0xc
cmp dword [eax], 0xc0000005
jne 0x4208ad
cmp dword [eax + 0x10], 2
jb 0x4208ad
mov edi, dword [eax + 0x14]
mov esi, dword [eax + 0x18]
lea eax, [ebp - 0xfc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
cmp edi, 8
mov eax, 0x514870
mov ecx, str.DEP
cmovne ecx, eax
mov edx, 0x52b254
cmp edi, 1
push esi
cmovne edx, ecx
test edi, edi
mov ecx, str.Read
cmovne ecx, edx
push ecx
push str.___sx_08X_
push 0x64
pop eax
sub eax, ebx
push eax
lea eax, [ebp - 0xfc]
lea eax, [eax + ebx*2]
push eax
call fcn.004e22e7
mov esi, dword [ebp - 0x324]
add esp, 0x14
jmp 0x4208ad
push str.Assertion
push 0x64
lea eax, [ebp - 0xfc]
push eax
call fcn.00401a0b
mov eax, 0x514870
push eax
push eax
push 0x1c
push 5
push 0x12
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp - 0x314]
lea eax, [ebp - 0xfc]
push eax
push str._s_was_occurred___s__PID_u__r_nConEmu_build__02u_02u_02u_s__s
push dword [ebp - 0x30c]
call fcn.00403c16
mov edi, dword [ebp - 0x310]
add esp, 0x28
cmp esi, 0xffffffff
je 0x4208f7
test esi, esi
je 0x4208f7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x31c]
test eax, eax
je 0x420908
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x7f00
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f4166
leave
ret