Function at 0x4083c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
cmp eax, esi
mov ebx, ecx
mov dword [ebp - 4], esi
je 0x4089ce
cmp dword [ebp + 0xc], esi
je 0x4089ce
push edi
cmp esi, 6
ja case.default.0x4083f0
jmp dword [esi*4 + 0x4089e0]
xor edi, edi
mov dword [ebx + 0x4ffc], edi
mov dword [ebx + 0x5000], edi
mov dword [ebx + 0x501c], edi
mov dword [ebx + 0x5020], edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x502c]
cmp eax, edi
je 0x40870d
cmp dword [ebx + 0x5034], edi
je 0x40870d
cmp dword [ebx + 0x5018], edi
je 0x408448
cmp dword [ebx + 0x2cec], 1
je 0x408457
mov ecx, ebx
call fcn.00406c30
test eax, eax
je 0x408694
mov eax, dword [ebx + 0x10ac]
lea edi, [ebx + 0x500c]
push 0
push 0
push edi
push 0
push 0
push 4
push 0xfffffffffffffff0
push 1
push 1
push eax
call sub.ODBC32.dll_SQLBindParameter
and al, 0xfe
test ax, ax
je 0x408494
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004056f0
mov esi, 5
jmp 0x4083e7
mov ecx, dword [ebx + 0x10ac]
lea esi, [ebx + 0x5008]
push 0
push 0
push esi
push 0
push 0
push 4
push 0xfffffffffffffff0
push 1
push 2
push ecx
call sub.ODBC32.dll_SQLBindParameter
and al, 0xfe
test ax, ax
je 0x4084d1
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004056f0
mov esi, 5
jmp 0x4083e7
mov ecx, ebx
call fcn.00406c30
test eax, eax
je 0x408668
mov eax, dword [ebx + 0x2d00]
test eax, eax
jne 0x408668
mov eax, dword [ebx + 0x10ac]
push 0
lea edx, [ebp - 0xc]
push 0
push edx
push 0
push 0
push 4
push 0xfffffffffffffff0
push 1
push 3
push eax
mov dword [ebp - 0xc], 0xffffffff
call sub.ODBC32.dll_SQLBindParameter
and al, 0xfe
test ax, ax
je 0x408525
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004056f0
mov edi, dword [ebx + 0x5044]
test edi, edi
je 0x408578
mov ecx, dword [ebx + 0x5038]
mov esi, dword [ebx + 0x5034]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x408578
mov edx, dword [ebx + 0x5008]
mov eax, dword [ebx + 0x4fb8]
push edx
mov edx, dword [ebx + 0x500c]
mov ecx, dword [eax]
push edx
lea edx, [ebx + 0x10b4]
push edx
push str._s:_call_sp_replcmds___d___d__r_n
push eax
call dword [ecx + 0x10]
add esp, 0x14
push 0
push 0
push str.call_sp_replcmds________
jmp 0x4086f6
mov eax, dword [ebx + 0x5038]
mov ecx, dword [ebx + 0x5034]
lea esi, [ebx + 0x5038]
mov edx, dword [ebx + 0x10ac]
push esi
push eax
push ecx
push 0
push eax
push 0xfffffffffffffffe
push 0xfffffffffffffffe
push 1
push 4
push edx
call sub.ODBC32.dll_SQLBindParameter
and al, 0xfe
test ax, ax
je 0x4085be
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004056f0
mov esi, 5
jmp 0x4083e7
mov ecx, dword [ebx + 0x10ac]
push 0
lea eax, [ebp + 0x10]
push 0
push eax
push 0
push 0
push 4
push 0xfffffffffffffff0
push 1
push 5
push ecx
call sub.ODBC32.dll_SQLBindParameter
and al, 0xfe
test ax, ax
je 0x4085f8
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004056f0
mov esi, 5
jmp 0x4083e7
mov eax, dword [ebx + 0x4fb8]
push eax
mov edx, dword [eax]
call dword [edx + 0x1c]
cmp eax, 1
jle 0x40865a
mov eax, dword [esi]
mov ecx, dword [ebx + 0x5034]
push eax
push ecx
lea edx, [ebp - 0x210]
push 0x1fe
push edx
call fcn.0040d550
mov edx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x4fb8]
push edx
lea edx, [ebp - 0x210]
push edx
mov edx, dword [ebx + 0x5008]
mov ecx, dword [eax]
push 0
push edx
mov edx, dword [ebx + 0x500c]
push edx
lea edx, [ebx + 0x10b4]
push edx
push str._s:_call_sp_replcmds___d___d___d___s___d__r_n
push eax
call dword [ecx + 0x10]
add esp, 0x30
push 0
push 0
push str.call_sp_replcmds____________
jmp 0x4086f6
mov edx, dword [esi]
mov eax, dword [ebx + 0x4fb8]
push edx
mov edx, dword [edi]
mov ecx, dword [eax]
push edx
lea edx, [ebx + 0x10b4]
push edx
push str._s:_call_sp_replcmds___d___d__r_n
push eax
call dword [ecx + 0x10]
add esp, 0x14
push 0
push 0
push str.call_sp_replcmds______
jmp 0x4086f6
mov edx, dword [ebx + 0x500c]
mov eax, dword [ebx + 0x4fb8]
lea esi, [ebx + 0x500c]
push edx
mov ecx, dword [eax]
lea edx, [ebx + 0x10b4]
push edx
push str._s:_call_sp_replcmds___d__r_n
push eax
call dword [ecx + 0x10]
add esp, 0x10
mov eax, dword [ebx + 0x10ac]
push edi
push edi
push esi
push edi
push edi
push 4
push 0xfffffffffffffff0
push 1
push 1
push eax
call sub.ODBC32.dll_SQLBindParameter
and al, 0xfe
test ax, ax
je 0x4086ef
push 0xffffffffffffffff
mov ecx, ebx
call fcn.004056f0
mov esi, 5
jmp 0x4083e7
push edi
push edi
push str.call_sp_replcmds____
mov ecx, ebx
call fcn.00405d70
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 4
inc esi
jmp 0x4083e7
mov ecx, dword [ebp + 0xc]
push 0x398
push str.q:SPHINXSQLREPLlogreadSRCpublish.cpp
call fcn.00409250
mov dword [ebx + 0xa0c], edi
mov esi, 6
jmp 0x4083e7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp + 8]
lea edx, [ebp - 4]
push edx
push esi
mov ecx, dword [esi]
mov edi, eax
call dword [ecx + 0x10]
test eax, eax
je 0x40889a
mov eax, dword [ebp - 4]
test eax, eax
je 0x40889a
mov esi, 2
jmp 0x4088b9
mov eax, dword [ebp - 4]
mov ecx, ebx
push eax
call fcn.00408a00
cmp eax, 1
jne 0x40886d
mov edx, dword [ebp - 4]
mov al, byte [edx + 0x1c]
test al, al
jne 0x4087f6
mov eax, dword [ebx + 0x5000]
inc eax
mov dword [ebx + 0x5000], eax
mov al, byte [edx + 0x1c]
test al, al
jne 0x4087f6
mov eax, dword [ebx + 0x5000]
dec eax
test eax, eax
je 0x4087f6
cdq
idiv dword [ebx + 0x5004]
test edx, edx
jne 0x4087f3
push 0x4e53
push ebx
call fcn.00401540
mov ecx, dword [ebx + 0x5000]
mov eax, dword [ebx + 0x5004]
add esp, 8
dec ecx
cmp ecx, eax
lea esi, [ebx + 8]
jne 0x4087d4
mov edx, dword [ebx + 4]
push 0
push esi
push edx
jmp 0x4087db
mov eax, dword [ebx + 4]
push 1
push esi
push eax
mov ecx, dword [ebp + 0xc]
push 0x419e58
push 2
push 0
push 4
call fcn.004096c0
mov word [esi], 0
mov edx, dword [ebp - 4]
cmp dword [edx + 0x20], 1
jne 0x408863
mov eax, dword [ebx + 0x4ffc]
mov esi, dword [ebx + 0x5034]
inc eax
xor ecx, ecx
mov dword [ebx + 0x4ffc], eax
mov cl, byte [edx + 0xc]
mov edi, dword [edx + 0x10]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x408822
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jge 0x408863
mov ecx, dword [ebx + 0x5030]
mov esi, dword [edx + 8]
mov edi, dword [ebx + 0x502c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x5038]
mov eax, dword [ebp - 4]
mov edi, dword [ebx + 0x5034]
mov edx, ecx
mov esi, dword [eax + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, 3
jmp 0x4083e7
xor ecx, ecx
cmp eax, 2
setne cl
add ecx, 4
mov esi, ecx
jmp 0x4083e7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp + 8]
mov edi, eax
mov eax, dword [ebp - 4]
push 1
mov edx, dword [esi]
push eax
push esi
call dword [edx + 0x14]
test eax, eax
jne 0x4088b4
mov ecx, dword [ebp + 0xc]
push esi
call fcn.00409130
mov dword [ebx + 0xa0c], 0
mov esi, 6
jmp 0x4088b9
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, edi
jb 0x4088c7
sub eax, edi
jmp 0x4088ca
sub eax, edi
dec eax
add dword [ebp - 8], eax
cmp esi, 7
je 0x4089bf
jmp 0x4083e7
mov esi, dword [ebp + 8]
mov edx, dword [ebp - 4]
xor edi, edi
mov ecx, dword [esi]
push edi
push edx
push esi
call dword [ecx + 0x14]
test eax, eax
jne 0x4088fe
mov ecx, dword [ebp + 0xc]
push esi
call fcn.00409130
mov dword [ebx + 0xa0c], edi
cmp dword [ebx + 0x5000], edi
je 0x40892f
mov eax, dword [esi]
push esi
call dword [eax + 0x18]
test eax, eax
jne 0x408929
mov ecx, dword [ebp + 0xc]
push esi
call fcn.00409130
mov dword [ebx + 0xa0c], edi
mov esi, 6
jmp 0x4083e7
inc dword [ebx + 0x501c]
mov esi, 6
jmp 0x4083e7
cmp dword [ebx + 0xa0c], 3
je 0x408965
lea ecx, [ebx + 0x16c0]
push ecx
push str.sp_replcmds
push 0x4e2b
push ebx
call fcn.00401540
mov ecx, dword [ebp + 0xc]
add esp, 0x10
push ebx
call fcn.00409590
mov eax, dword [ebx + 0xa0c]
mov esi, 6
cmp eax, 1
jne 0x4083e7
mov dword [ebx + 0xa0c], 0
jmp 0x4083e7
mov edx, dword [ebx + 0x10ac]
push edx
call sub.ODBC32.dll_SQLCancel
mov eax, dword [ebx + 0x10ac]
push 3
push eax
call sub.ODBC32.dll_SQLFreeStmt
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
jb 0x4089b3
sub eax, ecx
jmp 0x4089b6
sub eax, ecx
dec eax
sub eax, dword [ebp - 8]
mov dword [ebx + 0x5020], eax
mov eax, dword [ebx + 0xa0c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebx + 0xa0c], esi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc