Function at 0x412130
Capabilities:
Reference sql statements

Disassembly:
mov eax, dword [0x476ecf4]
sub esp, 0x930
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x412150
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x930
ret
push 0x46054d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0xd8]
push eax
rep stosd dword es:[edi], eax
mov ecx, 0xd
lea edi, [esp + 0xa8]
rep stosd dword es:[edi], eax
mov ecx, 0xd
lea edi, [esp + 0x74]
rep stosd dword es:[edi], eax
mov ecx, 0xd
lea edi, [esp + 0x110]
rep stosd dword es:[edi], eax
push 0x476ed38
lea eax, [esp + 0x148]
mov ebx, 1
push str.SELECT_idlistkmaps_idlistkmaps2_idlistkmaps3_idlistkmaps4_FROM_GATC__sMAPS
push eax
mov dword [esp + 0x24], ebx
xor ebp, ebp
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x140]
push ebx
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, eax
xor eax, eax
test esi, esi
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x412278
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x24]
test al, al
jne 0x412278
mov al, byte [esi + 4]
test al, al
jne 0x412263
mov eax, dword [esi]
push 1
mov ecx, esi
inc ebp
call dword [eax + 0x10]
call fcn.0045f9d8
mov edx, dword [esi]
push 2
mov ecx, esi
mov dword [esp + ebp*4 + 0x110], eax
call dword [edx + 0x10]
call fcn.0045f9d8
mov dword [esp + ebp*4 + 0x70], eax
mov eax, dword [esi]
push 3
mov ecx, esi
call dword [eax + 0x10]
call fcn.0045f9d8
mov edx, dword [esi]
push 4
mov ecx, esi
mov dword [esp + ebp*4 + 0xa8], eax
call dword [edx + 0x10]
call fcn.0045f9d8
mov dword [esp + ebp*4 + 0xd8], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
mov al, byte [esi + 4]
test al, al
je 0x412203
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
test esi, esi
je 0x41227e
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
jmp 0x41227e
xor ebx, ebx
mov dword [esp + 0x14], ebx
cmp ebp, 1
mov dword [0x46023d0], 0
jl 0x412976
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], ebp
test ebx, ebx
je 0x412958
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + ecx + 0x110]
test eax, eax
jle 0x412450
cmp dword [0x46023d0], 0xd
jge 0x412450
push eax
push 0x476ed38
lea edx, [esp + 0x148]
push str.SELECT_ipaddress_FROM_GATC__sKCOM_IP_WHERE_idlist_d
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x140]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
call fcn.00445210
mov ecx, dword [0x516f90]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ebp, eax
xor eax, eax
test ebp, ebp
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x412950
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x24]
test al, al
jne 0x412950
mov al, byte [ebp + 4]
test al, al
jne 0x41243b
mov edx, dword [ebp]
lea eax, [esp + 0x60]
push 1
push eax
mov ecx, ebp
call dword [edx + 0x14]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
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 + 0x60]
call fcn.00445280
lea ecx, [esp + 0x20]
push 0x46e08c
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov ebx, dword [0x46023d0]
mov edi, 1
cmp ebx, edi
jl 0x4123df
mov dword [esp + 0x10], 0x523968
mov eax, dword [esp + 0x10]
lea esi, [esp + 0x20]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4123c6
test cl, cl
je 0x4123c2
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4123c6
add eax, 2
add esi, 2
test cl, cl
jne 0x4123a2
xor eax, eax
jmp 0x4123cb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x412423
mov ecx, dword [esp + 0x10]
inc edi
add ecx, 0x14
cmp edi, ebx
mov dword [esp + 0x10], ecx
jle 0x41239a
inc ebx
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + ebx*4]
mov dword [0x46023d0], ebx
shl edx, 2
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x523954]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [edx + 0x523950], 0
cmp ebx, 0xd
je 0x41243b
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x20]
mov al, byte [ebp + 4]
test al, al
je 0x412335
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x1c]
test ebp, ebp
je 0x412450
mov edx, dword [ebp]
push 1
mov ecx, ebp
call dword [edx]
mov eax, dword [esp + 0x18]
mov eax, dword [esp + eax + 0x74]
test eax, eax
jle 0x4125f8
cmp dword [0x46023d0], 0xd
jge 0x4125f8
push eax
push 0x476ed38
lea ecx, [esp + 0x148]
push str.SELECT_ipaddress_FROM_GATC__sKCOM_IP_WHERE_idlist_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x140]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ebp, eax
xor eax, eax
test ebp, ebp
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x412950
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x24]
test al, al
jne 0x412950
mov al, byte [ebp + 4]
test al, al
jne 0x4125e3
mov eax, dword [ebp]
lea ecx, [esp + 0x40]
push 1
push ecx
mov ecx, ebp
call dword [eax + 0x14]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
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 + 0x40]
call fcn.00445280
lea ecx, [esp + 0x20]
push 0x46e08c
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov ebx, dword [0x46023d0]
mov edi, 1
cmp ebx, edi
jl 0x412587
mov dword [esp + 0x10], 0x523968
mov eax, dword [esp + 0x10]
lea esi, [esp + 0x20]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x41256e
test cl, cl
je 0x41256a
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x41256e
add eax, 2
add esi, 2
test cl, cl
jne 0x41254a
xor eax, eax
jmp 0x412573
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4125cb
mov ecx, dword [esp + 0x10]
inc edi
add ecx, 0x14
cmp edi, ebx
mov dword [esp + 0x10], ecx
jle 0x412542
inc ebx
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + ebx*4]
mov dword [0x46023d0], ebx
shl edx, 2
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x523954]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [edx + 0x523950], 0
cmp ebx, 0xd
je 0x4125e3
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x20]
mov al, byte [ebp + 4]
test al, al
je 0x4124dd
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x1c]
test ebp, ebp
je 0x4125f8
mov edx, dword [ebp]
push 1
mov ecx, ebp
call dword [edx]
mov eax, dword [esp + 0x18]
mov eax, dword [esp + eax + 0xa8]
test eax, eax
jle 0x4127a3
cmp dword [0x46023d0], 0xd
jge 0x4127a3
push eax
push 0x476ed38
lea ecx, [esp + 0x148]
push str.SELECT_ipaddress_FROM_GATC__sKCOM_IP_WHERE_idlist_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x140]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ebp, eax
xor eax, eax
test ebp, ebp
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x412950
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x24]
test al, al
jne 0x412950
mov al, byte [ebp + 4]
test al, al
jne 0x41278e
mov eax, dword [ebp]
lea ecx, [esp + 0x50]
push 1
push ecx
mov ecx, ebp
call dword [eax + 0x14]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
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 + 0x50]
call fcn.00445280
lea ecx, [esp + 0x20]
push 0x46e08c
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov ebx, dword [0x46023d0]
mov edi, 1
cmp ebx, edi
jl 0x412732
mov dword [esp + 0x10], 0x523968
mov eax, dword [esp + 0x10]
lea esi, [esp + 0x20]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x412719
test cl, cl
je 0x412715
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x412719
add eax, 2
add esi, 2
test cl, cl
jne 0x4126f5
xor eax, eax
jmp 0x41271e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x412776
mov ecx, dword [esp + 0x10]
inc edi
add ecx, 0x14
cmp edi, ebx
mov dword [esp + 0x10], ecx
jle 0x4126ed
inc ebx
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + ebx*4]
mov dword [0x46023d0], ebx
shl edx, 2
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x523954]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [edx + 0x523950], 0
cmp ebx, 0xd
je 0x41278e
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x20]
mov al, byte [ebp + 4]
test al, al
je 0x412688
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x1c]
test ebp, ebp
je 0x4127a3
mov edx, dword [ebp]
push 1
mov ecx, ebp
call dword [edx]
mov eax, dword [esp + 0x18]
mov eax, dword [esp + eax + 0xdc]
test eax, eax
jle 0x412958
cmp dword [0x46023d0], 0xd
jge 0x412958
push eax
push 0x476ed38
lea ecx, [esp + 0x148]
push str.SELECT_ipaddress_FROM_GATC__sKCOM_IP_WHERE_idlist_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x140]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ebp, eax
xor eax, eax
test ebp, ebp
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x412950
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x24]
test al, al
jne 0x412950
mov al, byte [ebp + 4]
test al, al
jne 0x412939
mov eax, dword [ebp]
lea ecx, [esp + 0x30]
push 1
push ecx
mov ecx, ebp
call dword [eax + 0x14]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
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 + 0x30]
call fcn.00445280
lea ecx, [esp + 0x20]
push 0x46e08c
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
mov ebx, dword [0x46023d0]
mov edi, 1
cmp ebx, edi
jl 0x4128dd
mov dword [esp + 0x10], 0x523968
mov eax, dword [esp + 0x10]
lea esi, [esp + 0x20]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4128c4
test cl, cl
je 0x4128c0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4128c4
add eax, 2
add esi, 2
test cl, cl
jne 0x4128a0
xor eax, eax
jmp 0x4128c9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x412921
mov ecx, dword [esp + 0x10]
inc edi
add ecx, 0x14
cmp edi, ebx
mov dword [esp + 0x10], ecx
jle 0x412898
inc ebx
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + ebx*4]
mov dword [0x46023d0], ebx
shl edx, 2
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + 0x523954]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [edx + 0x523950], 0
cmp ebx, 0xd
je 0x412939
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x20]
mov al, byte [ebp + 4]
test al, al
je 0x412833
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x1c]
test ebp, ebp
je 0x412958
mov edx, dword [ebp]
push 1
mov ecx, ebp
call dword [edx]
jmp 0x412958
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
add ecx, 4
dec eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
jne 0x41229d
push 0x476ed38
lea eax, [esp + 0x144]
push str.SELECT_idkcom_FROM_GATD__sDEVICE_WHERE_flenabmaps1
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x140]
push 1
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
call fcn.00445210
mov ecx, dword [0x516f90]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ebp, eax
xor eax, eax
test ebp, ebp
sete al
test eax, eax
mov dword [0x476ecf4], eax
jne 0x412a5c
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x24]
test al, al
jne 0x412a5c
mov al, byte [ebp + 4]
test al, al
jne 0x412a1a
mov edi, 0x45e3111
or ecx, 0xffffffff
xor eax, eax
mov dword [0x46023d0], 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x523968
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [0x523964], 0
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 0x1c]
test ebp, ebp
je 0x412a2f
mov eax, dword [ebp]
push 1
mov ecx, ebp
call dword [eax]
test ebx, ebx
je 0x412a5e
mov edi, 0x514f20
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 + 0x944]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x412a9c
xor ebx, ebx
mov ecx, dword [0x516f90]
lea edx, [esp + 0x30]
push edx
mov eax, dword [ecx]
call dword [eax + 0x24]
mov edi, dword [eax + 4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x944]
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 + 0x30]
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, 0x930
ret