Function at 0x509ecc
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6cc
push ebx
push esi
lea eax, [ebp - 0xcc]
push edi
mov edi, dword [0x5c5b18]
xor esi, esi
push eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
xor ebx, ebx
mov dword [ebp - 0xcc], 0x94
call dword [0x5701cc]
cmp dword [ebp - 0xbc], 2
je 0x509f15
xor eax, eax
jmp 0x50a138
lea eax, [ebp - 0x14]
push eax
push 0x588568
push 1
push esi
push 0x588558
call dword [0x571694]
test eax, eax
jl 0x50a10f
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 4]
push edx
push esi
mov ecx, dword [eax]
push esi
push esi
push esi
push esi
push esi
push str.ROOTCIMV2
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x50a10f
push 0x20
push esi
push 3
push 6
push esi
push esi
push 0xa
push dword [ebp - 4]
call dword [0x571684]
cmp edi, esi
jne 0x509f7f
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push esi
mov ecx, dword [eax]
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE0
jmp 0x509fc5
cmp edi, 1
jne 0x509f97
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push esi
mov ecx, dword [eax]
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE1
jmp 0x509fc5
cmp edi, 2
jne 0x509faf
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push esi
mov ecx, dword [eax]
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE2
jmp 0x509fc5
cmp edi, 3
jne 0x509fce
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push esi
mov ecx, dword [eax]
push 0x30
push str.SELECT_SerialNumber_FROM_Win32_PhysicalMedia_WHERE_TAG.PHYSICALDRIVE3
push 0x5c3800
push eax
call dword [ecx + 0x50]
cmp eax, esi
jl 0x50a10f
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x28]
push edx
lea edx, [ebp - 0xc]
push edx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0xc], esi
mov ecx, dword [eax]
push 1
push 0xffffffffffffffff
push eax
call dword [ecx + 0x10]
cmp eax, esi
jl 0x50a10f
cmp dword [ebp - 0xc], esi
jne 0x50a007
cmp eax, esi
je 0x509fd6
jmp 0x50a10f
lea eax, [ebp - 0x38]
push eax
call dword [0x5713bc]
mov eax, dword [ebp - 0xc]
push esi
lea edx, [ebp - 0x38]
push esi
mov ecx, dword [eax]
push edx
push esi
push str.SerialNumber
push eax
call dword [ecx + 0x10]
mov edi, dword [ebp - 0x30]
push edi
call dword [0x570154]
cmp eax, 0x14
mov dword [ebp - 0x18], eax
jle 0x50a0d7
cmp dword [ebp - 0xc8], 6
jne 0x50a0d7
push 0x200
lea eax, [ebp - 0x2cc]
push esi
push eax
mov word [ebp - 0x1c], si
call fcn.005149ac
add esp, 0xc
cmp dword [ebp - 0x18], esi
mov dword [ebp - 0x10], esi
jle 0x50a0bc
add edi, 4
mov ax, word [edi - 4]
push 0x10
mov word [ebp - 0x24], ax
mov ax, word [edi - 2]
mov word [ebp - 0x22], ax
mov ax, word [edi]
mov word [ebp - 0x20], ax
mov ax, word [edi + 2]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x24]
push esi
push eax
call fcn.005149ee
add esp, 0xc
mov ecx, eax
mov eax, dword [ebp - 0x10]
add edi, 8
push 4
cdq
pop ebx
idiv ebx
add dword [ebp - 0x10], ebx
mov word [ebp + eax*2 - 0x2cc], cx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jl 0x50a06d
lea eax, [ebp - 0x2cc]
push 0x400
push eax
lea eax, [ebp - 0x6cc]
push eax
call dword [0x570244]
jmp 0x50a0f0
push esi
push esi
lea eax, [ebp - 0x6cc]
push 0x400
push eax
push 0xffffffffffffffff
push edi
push esi
push esi
call dword [0x570158]
lea eax, [ebp - 0x6cc]
push eax
push 0x5c6b50
call fcn.005149a6
mov eax, dword [ebp - 0xc]
pop ecx
pop ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push 1
pop ebx
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x50a11c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 4]
cmp eax, esi
je 0x50a129
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x14]
cmp eax, esi
je 0x50a136
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret