Function at 0x1006603e
Capabilities:
Check for time delay via gettickcount
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x1008cc74]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x2c], 0
jne 0x10066061
xor eax, eax
jmp 0x1006638e
push 0
mov eax, dword [ebp - 0x30]
push dword [eax + 0x2c]
call fcn.100665bf
pop ecx
pop ecx
mov ecx, dword [ebp - 0x30]
call fcn.10065cdc
mov ecx, eax
call fcn.100109d5
push eax
push 1
mov eax, dword [ebp - 0x30]
push dword [eax + 0x2c]
call fcn.1006645b
add esp, 0xc
test eax, eax
je 0x100660dc
mov ecx, dword [ebp - 0x30]
call fcn.10065d08
mov ecx, eax
call fcn.100109d5
push eax
push 4
mov eax, dword [ebp - 0x30]
push dword [eax + 0x2c]
call fcn.1006645b
add esp, 0xc
test eax, eax
je 0x100660dc
mov ecx, dword [ebp - 0x30]
call fcn.10065ccd
mov ecx, eax
call fcn.100109d5
push eax
push 2
mov eax, dword [ebp - 0x30]
push dword [eax + 0x2c]
call fcn.1006645b
add esp, 0xc
test eax, eax
jne 0x100660e3
xor eax, eax
jmp 0x1006638e
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 0x35]
test eax, eax
jne 0x1006622b
push 0
push 0
push str.SQL_STATION
push 0
push 0
push 0x13
call fcn.10060070
add esp, 0x18
push 4
pop ecx
imul ecx, ecx, 0
mov dword [ebp + ecx - 0x1c], eax
push 0
push 0
push str.SQL_USER
push 0
push 0
push 0x13
call fcn.10060070
add esp, 0x18
push 4
pop ecx
shl ecx, 0
mov dword [ebp + ecx - 0x1c], eax
push 0
push 0
push str.SQL_FIRM
push 0
push 0
push 0x13
call fcn.10060070
add esp, 0x18
push 4
pop ecx
shl ecx, 1
mov dword [ebp + ecx - 0x1c], eax
push 0
push 0
push str.SQL_CDSTE
push 0
push 0
push 0x13
call fcn.10060070
add esp, 0x18
push 4
pop ecx
imul ecx, ecx, 3
mov dword [ebp + ecx - 0x1c], eax
push 0
push 0
push str.SQL_LNGWIN
push 0
push 0
push 0x13
call fcn.10060070
add esp, 0x18
push 4
pop ecx
shl ecx, 2
mov dword [ebp + ecx - 0x1c], eax
push 4
pop eax
imul eax, eax, 5
and dword [ebp + eax - 0x1c], 0
call fcn.10065310
push 4
pop ecx
imul ecx, ecx, 0
mov ecx, dword [ebp + ecx - 0x1c]
mov ecx, dword [ecx + 0x12]
mov dword [ecx], eax
call fcn.10007bc7
push 4
pop ecx
shl ecx, 0
mov ecx, dword [ebp + ecx - 0x1c]
mov ecx, dword [ecx + 0x12]
mov eax, dword [eax + 8]
mov dword [ecx], eax
call fcn.10007bc7
push 4
pop ecx
shl ecx, 1
mov ecx, dword [ebp + ecx - 0x1c]
mov ecx, dword [ecx + 0x12]
mov eax, dword [eax + 0xc]
mov dword [ecx], eax
call fcn.10007bc7
push 4
pop ecx
imul ecx, ecx, 3
mov ecx, dword [ebp + ecx - 0x1c]
mov ecx, dword [ecx + 0x12]
mov eax, dword [eax + 0x51a]
mov dword [ecx], eax
call fcn.10007bc7
movzx eax, byte [eax + 0x2f3]
push 4
pop ecx
shl ecx, 2
mov ecx, dword [ebp + ecx - 0x1c]
mov ecx, dword [ecx + 0x12]
mov dword [ecx], eax
lea eax, [ebp - 0x1c]
push eax
push 1
mov eax, dword [ebp - 0x30]
push dword [eax + 0x2c]
call fcn.1006645b
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x44], eax
movzx eax, byte [ebp + 0xc]
push eax
movzx eax, byte [ebp + 8]
push eax
mov eax, dword [ebp - 0x30]
push dword [eax + 0x2c]
call fcn.1006650c
add esp, 0xc
mov dword [ebp - 0x48], eax
call fcn.10007bc7
mov eax, dword [eax + 0x1a]
shr eax, 6
and eax, 1
je 0x10066310
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x30], 0
je 0x10066277
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x3c], eax
jmp 0x10066280
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x13]
mov ecx, dword [ebp - 0x34]
mov eax, dword [eax]
push dword [ecx + 0x13]
call dword [eax + 0x22c]
cmp dword [ebp - 0x38], 0
je 0x10066310
call fcn.10060990
mov eax, dword [eax + 0x34]
and eax, 0x40
je 0x100662ea
push dword [ebp - 0x34]
call fcn.10066603
pop ecx
mov dword [ebp - 0x40], eax
push dword [ebp - 0x40]
push 0
push dword [0x1008dd74]
push dword [ebp - 0x38]
mov eax, dword [ebp - 0x34]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x44]
push eax
call fcn.100667bf
add esp, 0x18
push dword [ebp - 0x34]
call fcn.10006470
push dword [ebp - 0x38]
call fcn.1006671e
pop ecx
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x13]
mov ecx, dword [ebp - 0x34]
mov eax, dword [eax]
push dword [ecx + 0x13]
call dword [eax + 0x230]
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 0x35]
test eax, eax
jne 0x1006635c
push 4
pop eax
imul eax, eax, 0
push dword [ebp + eax - 0x1c]
call fcn.10060140
pop ecx
push 4
pop eax
shl eax, 0
push dword [ebp + eax - 0x1c]
call fcn.10060140
pop ecx
push 4
pop eax
shl eax, 1
push dword [ebp + eax - 0x1c]
call fcn.10060140
pop ecx
push 4
pop eax
imul eax, eax, 3
push dword [ebp + eax - 0x1c]
call fcn.10060140
pop ecx
jmp 0x1006638b
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x1006638b
lea eax, [ebp - 0x2c]
push eax
call fcn.10065cad
pop ecx
cmp dword [ebp - 0x2c], 0xc
jne 0x1006638b
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 0x36]
test eax, eax
je 0x1006638b
mov eax, dword [ebp - 0x30]
push dword [eax + 0x2c]
call fcn.100664cb
pop ecx
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10066a47
leave
ret 8