Function at 0x476130
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x44
mov esi, ecx
mov eax, dword [0x5c7040]
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 0x47618f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [esi + 0x60]
inc eax
cmp eax, 2
jae 0x47633c
mov eax, edi
inc eax
cmp eax, 2
jb 0x476185
mov dword [esi + 0x60], edi
call fcn.004b97f0
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esi + 0x60]
inc edi
cmp edi, 2
jb 0x476383
lea edi, [esi + 8]
mov ecx, edi
push 1
call fcn.00463850
test al, al
je 0x476383
mov eax, dword [esi + 0x60]
lea edx, [ebp - 0x14]
mov dword [edx], eax
mov ecx, edi
push 4
push edx
push 0x20002
call fcn.00463900
mov ebx, eax
test al, al
je 0x476326
mov dword [ebp - 0x50], ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
xor ecx, ecx
dec ecx
lea edi, [ebp - 0x3c]
mov dword [edi + 0x24], ecx
mov dword [edi + 0x20], ecx
pcmpeqd xmm0, xmm0
movdqu xmmword [edi + 0x10], xmm0
movdqu xmmword [edi], xmm0
mov ecx, edi
push eax
call fcn.004520f0
mov ecx, edi
push ebx
push 8
push str.database
call fcn.00452eb0
lea edi, [ebp - 0x48]
push esi
push edi
call fcn.004b2790
add esp, 8
movsx eax, byte [edi + 0xb]
test eax, eax
jns 0x476222
mov eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x48]
test eax, eax
js 0x47636d
sete cl
test edi, edi
setne dl
or dl, cl
je 0x476374
lea ecx, [ebp - 0x3c]
push eax
push edi
push 0x12
push str.exception_pointers
call fcn.004531b0
cmp byte [ebp - 0x3d], 0
js 0x476387
lea edi, [ebp - 0x48]
push dword [esi + 0x60]
push edi
call fcn.004b2790
add esp, 8
movsx eax, byte [edi + 0xb]
test eax, eax
jns 0x476272
mov eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x48]
test eax, eax
js 0x47636d
sete cl
test edi, edi
setne dl
or dl, cl
je 0x476374
lea ecx, [ebp - 0x3c]
push eax
push edi
push 7
push 0x5a70d7
call fcn.004531b0
cmp byte [ebp - 0x3d], 0
js 0x476397
lea edi, [ebp - 0x48]
xor eax, eax
dec eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
lea ecx, [ebp - 0x3c]
push edi
call fcn.00453740
mov ecx, edi
push 0xa
push str.___thread
call fcn.004a57f0
lea ebx, [esi + 0x54]
movsx eax, byte [edi + 0xb]
test eax, eax
jns 0x4762db
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
lea edx, [edi + eax*2]
mov ecx, ebx
push eax
push edx
push edi
call fcn.004763b0
mov word [ebp - 0x4a], 0
mov ecx, dword [esi + 0x54]
mov eax, dword [esi + 0x58]
mov edx, eax
sub edx, ecx
cmp edx, 0xffffffbf
ja 0x476358
lea eax, [ebp - 0x4a]
mov ecx, ebx
push eax
push 0x20
call fcn.0043be40
cmp byte [ebp - 0x3d], 0
mov ebx, dword [ebp - 0x50]
jns 0x47631e
push dword [ebp - 0x48]
call fcn.004f50ae
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.00452240
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f5620
mov eax, ebx
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret 8
call fcn.004b97f0
push dword [esi + 0x60]
call fcn.004a6b40
add esp, 4
mov dword [esi + 0x60], 0
jmp 0x476175
add ecx, edx
add ecx, 0x40
cmp eax, ecx
je 0x476368
add eax, 0xfffffffe
jne 0x47635d
jmp 0x4763a7
mov dword [esi + 0x58], ecx
jmp 0x47630a
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 0x476379
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 0x59f83f
call fcn.00526860
xor ebx, ebx
jmp 0x476326
push dword [ebp - 0x48]
call fcn.004f50ae
add esp, 4
jmp 0x476255
push dword [ebp - 0x48]
call fcn.004f50ae
add esp, 4
jmp 0x4762a5
push str....._third_partylibc_srcinclude__memoryconstruct_at.h:66:_assertion___loc___nullptr_failed:_null_pointer_given_to_destroy_at_n
jmp 0x476379