Function at 0x40fd20
Capabilities:
Reference sql statements

Disassembly:
mov eax, dword [0x476ecf4]
sub esp, 0x858
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x40fd40
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x858
ret
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x476edd0]
lea ecx, [esp + 0x68]
push eax
push 0x476ed38
push str.SELECT_channel_device_cproword_dsdido_ipdido_rele_time_timekind_versus_idtime_fldevice_desdevice_neventkind_nactionkind_ninput_naction_FROM_GATD__sDEVOUT_WHERE_kcom_d
push ecx
mov dword [esp + 0x20], 1
mov dword [0x5584f4], 0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x68]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ebx, eax
xor eax, eax
test ebx, ebx
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x410161
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x24]
test al, al
jne 0x410161
mov al, byte [ebx + 4]
test al, al
jne 0x410121
mov ebp, dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov eax, dword [ebx]
push 1
mov ecx, ebx
call dword [eax + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 2
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c4f0], eax
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 3
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c4f4], eax
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 4
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c4f8], eax
mov edx, dword [ebx]
lea eax, [esp + 0x4c]
mov ecx, ebx
push eax
call dword [edx + 0x14]
mov ecx, dword [0x5584f4]
mov edi, dword [eax + 4]
xor eax, eax
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
lea edx, [ecx*4 + 0x475c4fc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x48]
call fcn.00445280
mov edx, dword [ebx]
lea eax, [esp + 0x28]
push 5
push eax
mov ecx, ebx
call dword [edx + 0x14]
mov ecx, dword [0x5584f4]
mov edi, dword [eax + 4]
xor eax, eax
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
lea edx, [ecx*4 + 0x475c525]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call fcn.00445280
mov eax, dword [0x5584f4]
push 0x46e08c
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4]
lea eax, [edx*4 + 0x475c525]
push eax
call ebp
mov edx, dword [ebx]
push 6
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 7
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c544], eax
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 8
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c548], eax
mov edx, dword [ebx]
lea eax, [esp + 0x5c]
mov ecx, ebx
push eax
call dword [edx + 0x14]
mov ecx, dword [0x5584f4]
mov edi, dword [eax + 4]
xor eax, eax
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
lea edx, [ecx*4 + 0x475c54c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x58]
call fcn.00445280
mov edx, dword [ebx]
lea eax, [esp + 0x38]
push 9
push eax
mov ecx, ebx
call dword [edx + 0x14]
mov ecx, dword [0x5584f4]
mov edi, dword [eax + 4]
xor eax, eax
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
lea edx, [ecx*4 + 0x475c53c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x38]
call fcn.00445280
mov edx, dword [ebx]
push 0xa
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
lea edx, [ecx + ecx*8]
push 0xb
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c540], eax
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 0xc
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c550], eax
mov edx, dword [ebx]
lea eax, [esp + 0x1c]
mov ecx, ebx
push eax
call dword [edx + 0x14]
mov ecx, dword [0x5584f4]
mov edi, dword [eax + 4]
xor eax, eax
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
lea edx, [ecx*4 + 0x475c554]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call fcn.00445280
mov eax, dword [0x5584f4]
push 0x46e08c
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4]
lea eax, [edx*4 + 0x475c554]
push eax
call ebp
mov edx, dword [ebx]
push 0xd
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 0xe
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c574], eax
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 0xf
lea edx, [ecx + ecx*8]
lea ecx, [ecx + edx*4]
mov dword [ecx*4 + 0x475c578], eax
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x10]
call fcn.0045f9d8
mov ecx, dword [0x5584f4]
push 0x10
lea edx, [ecx + ecx*8]
lea edx, [ecx + edx*4]
mov dword [edx*4 + 0x475c57c], eax
mov edx, dword [ebx]
lea eax, [ecx + ecx*8]
lea esi, [ecx + eax*4]
mov ecx, ebx
shl esi, 2
call dword [edx + 0x10]
call fcn.0045f9d8
mov dword [esi + 0x475c580], eax
mov edx, dword [esi + 0x475c548]
lea eax, [esi + 0x475c535]
lea ecx, [esi + 0x475c54c]
push eax
mov eax, dword [esi + 0x475c544]
push ecx
push edx
push eax
call fcn.00408140
mov ecx, dword [0x5584f4]
add esp, 0x10
inc ecx
mov dword [0x5584f4], ecx
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x20]
mov al, byte [ebx + 4]
test al, al
je 0x40fdd1
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
test ebx, ebx
je 0x410134
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx]
mov edi, 0x514f20
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x86c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4101a1
mov ecx, dword [0x516f90]
lea eax, [esp + 0x18]
push eax
xor ebx, ebx
mov edx, dword [ecx]
call dword [edx + 0x24]
mov edi, dword [eax + 4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x86c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call fcn.00445280
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x858
ret