Function at 0x584e40
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 [0x7a9040]
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 0x584e9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [esi + 0x60]
inc eax
cmp eax, 2
jae 0x58504c
mov eax, edi
inc eax
cmp eax, 2
jb 0x584e95
mov dword [esi + 0x60], edi
call fcn.005e4650
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esi + 0x60]
inc edi
cmp edi, 2
jb 0x58507d
lea edi, [esi + 8]
mov ecx, edi
push 1
call fcn.0055b240
test al, al
je 0x58507d
mov eax, dword [esi + 0x60]
lea edx, [ebp - 0x14]
mov dword [edx], eax
mov ecx, edi
push 4
push edx
push 0x20002
call fcn.0055b2f0
mov ebx, eax
test al, al
je 0x585036
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.0053f430
mov ecx, edi
push ebx
push 8
push str.database
call fcn.005404e0
lea edi, [ebp - 0x48]
push esi
push edi
call fcn.005dc3f0
add esp, 8
movsx eax, byte [edi + 0xb]
test eax, eax
jns 0x584f32
mov eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x48]
test eax, eax
js 0x585076
sete cl
test edi, edi
setne dl
or dl, cl
je 0x585076
lea ecx, [ebp - 0x3c]
push eax
push edi
push 0x12
push str.exception_pointers
call fcn.005407d0
cmp byte [ebp - 0x3d], 0
js 0x585081
lea edi, [ebp - 0x48]
push dword [esi + 0x60]
push edi
call fcn.005dc3f0
add esp, 8
movsx eax, byte [edi + 0xb]
test eax, eax
jns 0x584f82
mov eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x48]
test eax, eax
js 0x585076
sete cl
test edi, edi
setne dl
or dl, cl
je 0x585076
lea ecx, [ebp - 0x3c]
push eax
push edi
push 7
push 0x740a91
call fcn.005407d0
cmp byte [ebp - 0x3d], 0
js 0x585091
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.00540d30
mov ecx, edi
push 0xa
push str.___thread
call fcn.005cdf60
lea ebx, [esi + 0x54]
movsx eax, byte [edi + 0xb]
test eax, eax
jns 0x584feb
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.005850b0
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 0x585068
lea eax, [ebp - 0x4a]
mov ecx, ebx
push eax
push 0x20
call fcn.005270e0
cmp byte [ebp - 0x3d], 0
mov ebx, dword [ebp - 0x50]
jns 0x58502e
push dword [ebp - 0x48]
call fcn.006507ee
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0053f570
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00650d60
mov eax, ebx
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret 8
call fcn.005e4650
push dword [esi + 0x60]
call fcn.005cf200
add esp, 4
mov dword [esi + 0x60], 0
jmp 0x584e85
add ecx, edx
add ecx, 0x40
cmp eax, ecx
je 0x585078
add eax, 0xfffffffe
jne 0x58506d
ud2
mov dword [esi + 0x58], ecx
jmp 0x58501a
xor ebx, ebx
jmp 0x585036
push dword [ebp - 0x48]
call fcn.006507ee
add esp, 4
jmp 0x584f65
push dword [ebp - 0x48]
call fcn.006507ee
add esp, 4
jmp 0x584fb5