Function at 0x4093e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4137f5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x8e0c
call fcn.0040a780
mov eax, dword [0x41c08c]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x8e10], eax
mov eax, dword [esi + 0xc]
mov ebx, 1
cmp eax, ebx
push edi
jne 0x409449
mov eax, dword [esi + 0x18]
test eax, eax
je 0x409635
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
test eax, eax
je 0x409635
push 0x14
call fcn.00409ed9
add esp, 4
mov dword [esp + 0xc], eax
xor edi, edi
cmp eax, edi
mov dword [esp + 0x8e24], edi
je 0x409471
mov edx, dword [esi + 4]
push edx
mov ecx, eax
call fcn.004081a0
mov edi, eax
test edi, edi
mov dword [esp + 0x8e24], 0xffffffff
jne 0x4094b5
add esi, 8
push esi
push 2
lea ecx, [esp + 0x3d68]
call fcn.004068a0
mov esi, eax
push 0x41a2b0
lea eax, [esp + 0x14]
mov ecx, 0x51c
lea edi, [esp + 0x14]
push eax
mov dword [esp + 0x8e2c], ebx
rep movsd dword es:[edi], dword [esi]
call fcn.0040a733
mov ecx, dword [esi + 0x10]
push ecx
lea edx, [esp + 0x51d4]
push str.select__from__s_where__
push edx
call fcn.0040a126
add esp, 0xc
lea eax, [esp + 0x51d0]
push eax
mov ecx, edi
call fcn.00408330
mov ecx, edi
call fcn.00408700
mov ecx, edi
mov ebx, eax
mov dword [esp + 0xc], ebx
call fcn.00408560
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
push eax
mov eax, dword [esi + 0x14]
push ecx
mov ecx, dword [esi + 8]
push edx
lea edi, [esi + 8]
push eax
push ecx
call sub.odbcbcp.dll_Ordinal_18
test ax, ax
jne 0x409550
push edi
push 2
lea ecx, [esp + 0x3d68]
call fcn.004068a0
push 0x41a2b0
lea edx, [esp + 0x14]
mov esi, eax
mov ecx, 0x51c
lea edi, [esp + 0x14]
push edx
mov dword [esp + 0x8e2c], 2
rep movsd dword es:[edi], dword [esi]
call fcn.0040a733
mov eax, dword [esi + 0x88]
test eax, eax
je 0x409566
mov eax, dword [edi]
push 1
push 9
push eax
call sub.odbcbcp.dll_Ordinal_9
mov eax, dword [esi + 0x84]
test eax, eax
je 0x40957b
mov ecx, dword [edi]
push eax
push 0xb
push ecx
call sub.odbcbcp.dll_Ordinal_9
cmp dword [esi + 0xc], 1
jne 0x409594
mov eax, dword [esi + 0x78]
test eax, eax
je 0x409594
mov edx, dword [edi]
push 1
push 8
push edx
call sub.odbcbcp.dll_Ordinal_9
mov eax, dword [esi + 0x6c]
mov ecx, dword [edi]
push eax
push 4
push ecx
call sub.odbcbcp.dll_Ordinal_9
mov edx, dword [esi + 0x70]
mov eax, dword [edi]
push edx
push 1
push eax
call sub.odbcbcp.dll_Ordinal_9
mov ecx, dword [esi + 0x64]
mov edx, dword [edi]
push ecx
push 2
push edx
call sub.odbcbcp.dll_Ordinal_9
mov eax, dword [esi + 0x68]
mov ecx, dword [edi]
push eax
push 3
push ecx
call sub.odbcbcp.dll_Ordinal_9
mov edx, dword [esi + 0x7c]
mov eax, dword [edi]
push edx
push 5
push eax
call sub.odbcbcp.dll_Ordinal_9
mov eax, dword [esi + 0x90]
cmp eax, 0x7fffffff
je 0x4095f2
mov ecx, dword [edi]
push eax
push 0xc
push ecx
call sub.odbcbcp.dll_Ordinal_9
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x409608
mov edx, dword [edi]
push 1
push 0xd
push edx
call sub.odbcbcp.dll_Ordinal_9
mov eax, dword [esi + 0x20]
cmp eax, 1
je 0x409668
cmp eax, 4
je 0x409668
cmp eax, 2
jne 0x40963c
lea eax, [esi + 0x46]
push eax
mov eax, dword [edi]
lea ecx, [esi + 0x28]
push ecx
movsx edx, bx
push edx
push eax
mov ecx, esi
call fcn.00408ab0
test ax, ax
jne 0x4096b3
xor eax, eax
jmp 0x4097ea
cmp eax, 3
jne 0x4096b3
mov ecx, dword [esi + 0x24]
push ecx
mov ecx, esi
call fcn.00407640
test eax, eax
je 0x409635
mov edx, dword [esi + 0x24]
mov eax, dword [edi]
push edx
push eax
call sub.odbcbcp.dll_Ordinal_19
test ax, ax
jne 0x4096b3
xor eax, eax
jmp 0x4097ea
mov dx, word [0x418cf4]
lea eax, [esi + 0x28]
mov ecx, eax
mov word [ecx], dx
mov dl, byte [0x418cf6]
mov byte [ecx + 2], dl
mov bx, word [0x418cf0]
lea ecx, [esi + 0x46]
mov edx, ecx
mov word [edx], bx
mov bl, byte [0x418cf2]
mov byte [edx + 2], bl
mov edx, dword [esi + 0x20]
push edx
push ecx
mov ecx, dword [edi]
push eax
movsx eax, word [esp + 0x18]
push eax
push ecx
mov ecx, esi
call fcn.004089c0
test ax, ax
je 0x409635
mov edx, dword [edi]
push 1
push 4
push edx
call sub.ODBC32.dll_SQLSetConnectOptionW
cmp ax, 1
mov word [esi], ax
je 0x409703
test ax, ax
je 0x409703
push edi
push 2
lea ecx, [esp + 0x3d68]
call fcn.004068a0
mov esi, eax
push 0x41a2b0
lea eax, [esp + 0x14]
mov ecx, 0x51c
lea edi, [esp + 0x14]
push eax
mov dword [esp + 0x8e2c], 3
rep movsd dword es:[edi], dword [esi]
call fcn.0040a733
mov ecx, dword [edi]
lea ebx, [esi + 0x80]
push ebx
push ecx
call sub.odbcbcp.dll_Ordinal_12
cmp ax, 3
mov word [esi], ax
jne 0x409742
jmp 0x409720
mov edx, dword [esi + 4]
mov eax, dword [edx]
push eax
push 2
call fcn.00406b50
mov ecx, dword [edi]
add esp, 8
push ebx
push ecx
call sub.odbcbcp.dll_Ordinal_12
cmp ax, 3
mov word [esi], ax
je 0x409720
mov ax, word [esi]
cmp ax, 1
je 0x409786
test ax, ax
je 0x409786
push edi
push 2
lea ecx, [esp + 0x3d68]
call fcn.004068a0
push 0x41a2b0
lea edx, [esp + 0x14]
mov esi, eax
mov ecx, 0x51c
lea edi, [esp + 0x14]
push edx
mov dword [esp + 0x8e2c], 4
rep movsd dword es:[edi], dword [esi]
call fcn.0040a733
mov eax, dword [edi]
push 0
push 4
push eax
call sub.ODBC32.dll_SQLSetConnectOptionW
cmp ax, 1
mov word [esi], ax
je 0x4097e5
test ax, ax
je 0x4097dc
push edi
push 2
lea ecx, [esp + 0x28f8]
call fcn.004068a0
mov esi, eax
mov ecx, 0x51c
lea edi, [esp + 0x1480]
rep movsd dword es:[edi], dword [esi]
push 0x41a2b0
lea ecx, [esp + 0x1484]
push ecx
mov dword [esp + 0x8e2c], 5
call fcn.0040a733
cmp dword [ebx], 1
jl 0x409635
mov eax, 1
mov ecx, dword [esp + 0x8e1c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x8e14]
call fcn.0040a62a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret