Function at 0x418640
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
mov esi, ecx
mov eax, dword [0x644040]
xor eax, ebp
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 1
push 0x451
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
cmp dword [esi + 0x60], eax
je 0x41869f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [esi + 0x60]
inc eax
cmp eax, 2
jae 0x4188f3
mov eax, edi
inc eax
cmp eax, 2
jb 0x418695
mov dword [esi + 0x60], edi
call fcn.005018d0
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esi + 0x60]
inc edi
cmp edi, 2
jb 0x418a05
lea ecx, [esi + 8]
push 1
call fcn.0042e7d0
test al, al
je 0x418a05
mov eax, dword [esi + 0x60]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x50]
xor ebx, ebx
test eax, eax
je 0x4188dd
mov dword [ebp - 0x50], esi
lea ecx, [ebp - 0x14]
push ebx
push ebx
push 4
push ecx
push 0x20002
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
test eax, eax
je 0x4188dd
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
xor edi, edi
dec edi
lea ecx, [ebp - 0x3c]
mov dword [ecx + 0x24], edi
mov dword [ecx + 0x20], edi
pcmpeqd xmm0, xmm0
movdqu xmmword [ecx + 0x10], xmm0
movdqu xmmword [ecx], xmm0
push eax
call fcn.00418ac0
movsx eax, byte [esi + 0xb]
test eax, eax
jns 0x418720
mov eax, dword [esi + 4]
mov esi, dword [esi]
test eax, eax
js 0x4189ef
sete cl
test esi, esi
setne dl
or dl, cl
je 0x4189f6
lea ecx, [ebp - 0x3c]
push eax
push esi
push 8
push str.database
call fcn.004138e0
lea esi, [ebp - 0x48]
push dword [ebp - 0x50]
push esi
call fcn.0053c140
add esp, 8
movsx eax, byte [esi + 0xb]
test eax, eax
jns 0x418766
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x48]
test eax, eax
js 0x4189ef
sete cl
test esi, esi
setne dl
or dl, cl
je 0x4189f6
lea ecx, [ebp - 0x3c]
push eax
push esi
push 0x12
push str.exception_pointers
call fcn.00418a40
cmp byte [ebp - 0x3d], 0
js 0x418a14
lea esi, [ebp - 0x48]
mov eax, dword [ebp - 0x50]
push dword [eax + 0x60]
push esi
call fcn.0053c140
add esp, 8
movsx eax, byte [esi + 0xb]
test eax, eax
jns 0x4187b9
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x48]
test eax, eax
js 0x4189ef
sete cl
test esi, esi
setne dl
or dl, cl
je 0x4189f6
lea ecx, [ebp - 0x3c]
push eax
push esi
push 7
push 0x6352a3
call fcn.00418a40
cmp byte [ebp - 0x3d], 0
js 0x418a24
lea ebx, [ebp - 0x48]
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov dword [ebx + 8], edi
lea ecx, [ebp - 0x3c]
push ebx
call fcn.0040f610
mov ecx, ebx
push 0xa
push str.___thread
call fcn.0053d1f0
movsx esi, byte [ebx + 0xb]
test esi, esi
jns 0x41881c
mov ebx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x58], ebx
mov eax, dword [ebp - 0x50]
lea ecx, [eax + 0x54]
mov dword [ebp - 0x60], ecx
lea ecx, [esi + esi]
mov dword [ebp - 0x54], ecx
mov edi, dword [eax + 0x54]
mov eax, dword [eax + 0x5c]
mov ecx, eax
sub ecx, edi
sar ecx, 1
cmp ecx, esi
jae 0x41895a
test edi, edi
jne 0x41890f
test esi, esi
js 0x418a0c
cmp eax, esi
cmova esi, eax
cmp eax, 0x7ffffffe
mov ebx, 0x7fffffff
cmovb ebx, esi
test ebx, ebx
js 0x418a0c
lea eax, [ebx + ebx]
push eax
call fcn.00562f65
add esp, 4
mov edi, eax
mov esi, dword [ebp - 0x50]
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], eax
lea eax, [eax + ebx*2]
mov dword [esi + 0x5c], eax
mov ebx, dword [ebp - 0x54]
push ebx
push dword [ebp - 0x58]
push edi
call fcn.00567460
add esp, 0xc
add edi, ebx
mov dword [esi + 0x58], edi
mov word [ebp - 0x4a], 0
mov eax, dword [esi + 0x54]
mov ecx, edi
sub ecx, eax
cmp ecx, 0xffffffbf
ja 0x41893f
lea eax, [ebp - 0x4a]
mov ecx, dword [ebp - 0x60]
push eax
push 0x20
call fcn.004501b0
cmp byte [ebp - 0x3d], 0
jns 0x4188d3
push dword [ebp - 0x48]
call fcn.00562f60
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0043ca00
mov bl, 1
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00566245
mov eax, ebx
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret 8
call fcn.005018d0
push dword [esi + 0x60]
call fcn.00554600
add esp, 4
mov dword [esi + 0x60], 0
jmp 0x418685
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0x58]
cmp eax, edi
je 0x418920
add eax, 0xfffffffe
jne 0x418915
jmp 0x418992
mov ebx, dword [ebp - 0x50]
mov dword [ebx + 0x58], edi
push edi
call fcn.00562f60
add esp, 4
xor eax, eax
mov dword [ebx + 0x5c], eax
mov dword [ebx + 0x58], eax
mov dword [ebx + 0x54], eax
jmp 0x41884a
add eax, ecx
add eax, 0x40
cmp edi, eax
je 0x41894f
add edi, 0xfffffffe
jne 0x418944
jmp 0x418992
mov ecx, dword [ebp - 0x50]
mov dword [ecx + 0x58], eax
jmp 0x4188c2
mov eax, dword [ebp - 0x50]
mov ebx, dword [eax + 0x58]
mov eax, ebx
sub eax, edi
mov dword [ebp - 0x5c], eax
sar eax, 1
cmp eax, esi
jb 0x4189a1
test esi, esi
je 0x418986
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push edi
call fcn.00567460
add esp, 0xc
mov eax, dword [ebp - 0x50]
mov ebx, dword [eax + 0x58]
add edi, dword [ebp - 0x54]
cmp ebx, edi
je 0x418999
add ebx, 0xfffffffe
jne 0x418989
push str....._third_partylibc_srcinclude__memoryconstruct_at.h:66:_assertion___loc___nullptr_failed:_null_pointer_given_to_destroy_at_n
jmp 0x4189fb
mov esi, dword [ebp - 0x50]
jmp 0x41889b
mov eax, dword [ebp - 0x58]
lea esi, [eax + esi*2]
mov ecx, dword [ebp - 0x5c]
add eax, ecx
mov dword [ebp - 0x64], eax
cmp ebx, edi
je 0x4189c8
push dword [ebp - 0x5c]
push dword [ebp - 0x58]
push edi
call fcn.00567460
add esp, 0xc
mov eax, dword [ebp - 0x50]
mov ebx, dword [eax + 0x58]
sub esi, dword [ebp - 0x64]
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x54]
je 0x4189e0
push esi
push dword [ebp - 0x64]
push ebx
call fcn.00567460
add esp, 0xc
add ebx, esi
mov esi, dword [ebp - 0x50]
mov dword [esi + 0x58], ebx
mov edi, ebx
jmp 0x41889e
push str....._third_partylibc_srcinclude_string_view:318:_assertion___len___static_cast_size_type__numeric_limits_difference_type_::max____failed:_string_view::string_view__CharT___size_t_:_length_does_not_fit_in_difference_type_n
jmp 0x4189fb
push str....._third_partylibc_srcinclude_string_view:320:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
push 0x622e92
call fcn.00590170
xor ebx, ebx
jmp 0x4188dd
mov ecx, dword [ebp - 0x60]
call fcn.00594300
push dword [ebp - 0x48]
call fcn.00562f60
add esp, 4
jmp 0x418799
push dword [ebp - 0x48]
call fcn.00562f60
add esp, 4
jmp 0x4187ec