Function at 0x4040b0
Capabilities:
Check if file exists
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bffb8
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x4e3a20]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebx + 0x30]
lea ecx, [ebx + 0x18]
mov dword [ebp - 4], 0
call fcn.00401740
add esp, 4
test al, al
jne 0x404116
mov esi, 0xa
jmp 0x4042f6
lea ecx, [ebp - 0x2c]
call fcn.004014c0
test al, al
jne 0x40417c
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
call fcn.004032e0
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete al
cmp dword [ebp - 0x30], 8
mov byte [ebp - 0x45], al
jb 0x40415c
push dword [ebp - 0x44]
call fcn.004a37d1
mov al, byte [ebp - 0x45]
add esp, 4
test al, al
je 0x40416a
mov esi, 1
jmp 0x4042f6
lea ecx, [ebx + 0x18]
call fcn.00403840
mov esi, eax
test esi, esi
jne 0x4042f6
cmp dword [ebp - 0x18], 0x10
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
push 0
push 1
lea edx, [ebx + 4]
call fcn.00481ff0
add esp, 8
test eax, eax
je 0x4041af
mov ecx, eax
mov dword [ebx + 4], 0
call fcn.00403770
mov esi, eax
jmp 0x4042f6
mov esi, dword [ebx + 4]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4041c3
push eax
call dword [0x4e5c5c]
add esp, 4
mov eax, dword [esi + 0xc]
mov dword [esi + 0x1b4], 0x4807d0
mov dword [esi + 0x1b8], esi
mov dword [esi + 0x1bc], 0
mov dword [esi + 0x1e4], 0
test eax, eax
je 0x4041f8
push eax
call dword [0x4e5c64]
add esp, 4
mov dword [esi + 0x1e4], 0x7d0
xor esi, esi
cmp byte [ebx + 0x4c], 0
mov dword [ebx], 0
je 0x4042f6
mov eax, dword [ebx + 0x50]
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x54], esi
sub eax, esi
je 0x404244
dec eax
je 0x40423d
dec eax
jne 0x404244
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x58], 1
lea edi, [esi + 3]
jmp 0x404249
mov edi, 1
jmp 0x404249
mov edi, 2
push str.SELECT_value_FROM_pcd_meta_WHERE_key__schema_version
lea eax, [ebp - 0x54]
push eax
push ebx
mov dword [ebp - 0x4c], edi
call fcn.00403e50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x404297
push dword [ebp - 0x54]
call fcn.004a3c03
add esp, 4
mov dword [ebp - 0x50], eax
push str.SELECT_value_FROM_pcd_meta_WHERE_key__schema_compatibility_version
lea eax, [ebp - 0x54]
push eax
push ebx
call fcn.00403e50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x404297
push dword [ebp - 0x54]
call fcn.004a3c03
add esp, 4
jmp 0x40429a
mov eax, dword [ebp - 0x58]
cmp edi, eax
jge 0x4042a5
mov esi, 0xd
jmp 0x4042d6
mov eax, dword [ebp - 0x50]
inc eax
mov edi, eax
mov dword [ebp - 0x50], eax
cmp edi, dword [ebp - 0x4c]
jg 0x4042d2
push edi
mov ecx, ebx
call fcn.004043e0
mov esi, eax
test esi, esi
jne 0x4042c9
inc edi
cmp edi, dword [ebp - 0x4c]
jle 0x4042b3
jmp 0x4042f6
cmp dword [ebp - 0x50], edi
jne 0x4042d2
xor esi, esi
jmp 0x4042f6
test esi, esi
je 0x4042f6
cmp dword [ebx], 0
jne 0x4042f6
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x4042f6
xor edx, edx
call fcn.004800b0
mov dword [ebx + 4], 0
mov dword [ebx], 1
cmp dword [ebp - 0x18], 0x10
jb 0x404307
push dword [ebp - 0x2c]
call fcn.004a37d1
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a2eda
mov esp, ebp
pop ebp
ret 4