Function at 0x512704
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x18
push 0
push 0
dec ecx
jne 0x51270c
push ecx
push ebx
push esi
push edi
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5132aa
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x41b9c8]
call fcn.00403504
mov dword [ebp - 0x20], eax
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x324]
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.00511ff8
mov dword [ebp - 0x18], eax
xor edx, edx
push ebp
push 0x513224
push dword fs:[edx]
mov dword fs:[edx], esp
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.005179a8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jl 0x5127f8
inc eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
mov eax, dword [eax + edx*8]
lea edx, [ebp - 0x50]
call fcn.00408da4
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
lea eax, [eax + ecx*8]
call fcn.0040449c
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
mov eax, dword [eax + edx*8 + 4]
lea edx, [ebp - 0x54]
call fcn.00408da4
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
lea eax, [eax + ecx*8 + 4]
call fcn.0040449c
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
cmp dword [eax + edx*8 + 4], 0
jne 0x5127f0
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
lea eax, [eax + edx*8 + 4]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
mov edx, dword [edx + ecx*8]
call fcn.0040449c
inc dword [ebp - 0x38]
dec dword [ebp - 0x4c]
jne 0x512785
cmp dword [ebp - 0x1c], 0
jle 0x51280b
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
call fcn.004044e0
mov byte [ebp - 0x29], 0
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jl 0x512964
inc eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x38], 0
mov dl, 1
mov eax, dword [0x511f28]
call fcn.00403504
mov ebx, eax
mov edx, ebx
mov eax, dword [ebp - 0x20]
call fcn.0041e1dc
mov byte [ebx + 0x14], 0
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x38]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 4]
lea edx, [ebp - 0x58]
call fcn.00408da4
mov edx, dword [ebp - 0x58]
lea eax, [ebx + 4]
call fcn.0040449c
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x38]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 8]
lea edx, [ebp - 0x5c]
call fcn.00408da4
mov edx, dword [ebp - 0x5c]
lea eax, [ebx + 8]
call fcn.0040449c
cmp dword [ebx + 8], 0
je 0x5128bb
mov edi, dword [ebp - 0x1c]
dec edi
test edi, edi
jl 0x5128bb
inc edi
xor esi, esi
mov eax, dword [ebx + 8]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + esi*8 + 4]
call fcn.00404854
jne 0x5128b7
lea eax, [ebx + 8]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + esi*8]
call fcn.0040449c
jmp 0x5128bb
inc esi
dec edi
jne 0x512896
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x38]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x60]
call fcn.00408da4
mov edx, dword [ebp - 0x60]
lea eax, [ebx + 0xc]
call fcn.0040449c
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x38]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + 0x10]
lea edx, [ebp - 0x64]
call fcn.00408da4
mov edx, dword [ebp - 0x64]
lea eax, [ebx + 0x10]
call fcn.0040449c
mov eax, dword [ebx + 4]
mov edx, 0x5132c0
call fcn.00404854
jne 0x512924
inc dword [ebp - 0x28]
cmp dword [ebx + 8], 0
je 0x51291e
lea eax, [ebp - 0x24]
mov edx, dword [ebx + 8]
call fcn.004044e0
jmp 0x512958
mov byte [ebp - 0x29], 1
jmp 0x512958
cmp dword [ebx + 0x10], 0
jne 0x512948
cmp dword [ebx + 4], 0
je 0x51293d
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 4]
call fcn.0040449c
jmp 0x512948
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 0xc]
call fcn.0040449c
cmp dword [ebx + 4], 0
je 0x512958
cmp dword [ebx + 8], 0
jne 0x512958
mov byte [ebp - 0x29], 1
inc dword [ebp - 0x38]
dec dword [ebp - 0x4c]
jne 0x51282b
cmp dword [ebp - 0x1c], 1
jle 0x512976
cmp byte [ebp - 0x29], 0
jne 0x512980
cmp dword [ebp - 0x28], 1
jg 0x512980
cmp byte [ebp - 5], 0
jne 0x512980
xor eax, eax
jmp 0x512982
mov al, 1
xor edx, edx
mov dword [ebp - 0x3c], edx
xor edx, edx
push ebp
push 0x5131e6
push dword fs:[edx]
mov dword fs:[edx], esp
test al, al
je 0x512e0f
lea eax, [ebp - 0xc]
call fcn.00404448
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jl 0x512b06
inc eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
mov edx, dword [edx + ecx*8]
call fcn.004044e0
mov edx, dword [ebp - 0x48]
mov eax, 0x5132cc
call fcn.00404a4c
mov esi, eax
test esi, esi
jle 0x512a34
push 0x5132d8
lea eax, [ebp - 0x68]
push eax
mov ecx, esi
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x48]
call fcn.00404968
push dword [ebp - 0x68]
push 0x5132d8
lea eax, [ebp - 0x44]
mov edx, 3
call fcn.004047c8
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x48]
call fcn.00404708
mov ecx, eax
lea edx, [esi + 1]
mov eax, dword [ebp - 0x48]
call fcn.00404968
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x40]
call fcn.004044e0
jmp 0x512a49
push ebp
lea eax, [ebp - 0x6c]
call fcn.0051262c
pop ecx
mov edx, dword [ebp - 0x6c]
lea eax, [ebp - 0x44]
call fcn.004044e0
cmp dword [ebp - 0x38], 0
jle 0x512a6e
push dword [ebp - 0xc]
push 0x5132e4
push 0x5132f0
push 0x5132e4
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.004047c8
push dword [ebp - 0xc]
push 0x513300
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 0x38]
inc eax
call fcn.0040937c
push dword [ebp - 0x70]
push 0x513328
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.004047c8
cmp byte [ebp - 5], 0
je 0x512ab0
cmp dword [ebp - 0x1c], 1
jne 0x512ab0
lea eax, [ebp - 0xc]
mov edx, 0x51333c
call fcn.00404710
push dword [ebp - 0xc]
push 0x513354
push dword [ebp - 0x44]
push 0x513398
push dword [ebp - 0x48]
push 0x5132d8
lea eax, [ebp - 0xc]
mov edx, 6
call fcn.004047c8
cmp dword [ebp - 0x38], 0
jle 0x512afa
push dword [ebp - 0xc]
push 0x5132e4
push 0x5133b4
push 0x5132e4
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.004047c8
inc dword [ebp - 0x38]
dec dword [ebp - 0x4c]
jne 0x5129bc
cmp dword [ebp - 0x1c], 1
jle 0x512b30
push 0x5133c0
push dword [ebp - 0xc]
push 0x5133b4
push 0x5132e4
push 0x5133f8
lea eax, [ebp - 0xc]
mov edx, 5
call fcn.004047c8
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x29c]
mov edx, dword [eax]
call dword [edx + 0xa4]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov byte [eax + 0x242], 1
mov eax, dword [ebp - 0x3c]
call fcn.004c93ec
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x3c]
call fcn.004a6f90
xor eax, eax
mov dword [ebp - 0x38], eax
jmp 0x512e00
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
call fcn.0041e338
mov ebx, eax
mov eax, dword [ebx + 4]
mov edx, 0x5132c0
call fcn.00404854
jne 0x512d1b
lea eax, [ebp - 0x48]
mov edx, dword [ebx + 8]
call fcn.004044e0
xor ebx, ebx
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
call fcn.0041e338
call fcn.00403534
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
call fcn.0041e228
mov eax, dword [ebp - 0x3c]
call fcn.004a93c8
jmp 0x512d06
cmp dword [ebp - 0x48], 0
je 0x512c14
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
xor edx, edx
call fcn.0049cff8
lea edx, [ebp - 0x74]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x48]
call fcn.00404854
jne 0x512cfe
test ebx, ebx
je 0x512c14
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 2
call fcn.0049cff8
mov edx, dword [eax]
call dword [edx + 0x58]
cmp ebx, eax
jne 0x512cfe
mov dl, 1
mov eax, dword [0x511f28]
call fcn.00403504
mov ebx, eax
mov ecx, ebx
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
call fcn.0041e3b4
mov byte [ebx + 0x14], 0
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
xor edx, edx
call fcn.0049cff8
lea edx, [ebp - 0x78]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edx, dword [ebp - 0x78]
lea eax, [ebx + 8]
call fcn.0040449c
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 1
call fcn.0049cff8
lea edx, [ebp - 0x7c]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edx, dword [ebp - 0x7c]
lea eax, [ebx + 4]
call fcn.0040449c
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 4]
call fcn.0040449c
cmp byte [ebp - 5], 0
je 0x512ce4
cmp dword [ebp - 0x1c], 1
jne 0x512ce4
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 5
call fcn.0049cff8
lea edx, [ebp - 0x84]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x84]
push eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 3
call fcn.0049cff8
lea edx, [ebp - 0x88]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x88]
lea ecx, [ebp - 0x80]
pop edx
call fcn.00512534
mov edx, dword [ebp - 0x80]
lea eax, [ebx + 0xc]
call fcn.0040449c
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 2
call fcn.0049cff8
mov edx, dword [eax]
call dword [edx + 0x58]
mov ebx, eax
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x3c]
call fcn.004a9644
mov eax, dword [ebp - 0x3c]
cmp byte [eax + 0xa1], 0
je 0x512bc7
jmp 0x512e00
cmp dword [ebx + 4], 0
je 0x512dfd
cmp dword [ebx + 8], 0
jne 0x512dfd
mov al, byte [0x513414]
push eax
lea eax, [ebp - 0x98]
mov edx, dword [ebx + 4]
call fcn.0041564c
lea ecx, [ebp - 0x98]
mov edx, 0x513420
mov eax, dword [ebp - 0x3c]
mov esi, dword [eax]
call dword [esi + 0x244]
test al, al
je 0x512df2
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
xor edx, edx
call fcn.0049cff8
lea edx, [ebp - 0x9c]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edx, dword [ebp - 0x9c]
lea eax, [ebx + 8]
call fcn.0040449c
cmp byte [ebp - 5], 0
je 0x512dfd
cmp dword [ebp - 0x1c], 1
jne 0x512dfd
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 5
call fcn.0049cff8
lea edx, [ebp - 0xa4]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0xa4]
push eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 3
call fcn.0049cff8
lea edx, [ebp - 0xa8]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0xa8]
lea ecx, [ebp - 0xa0]
pop edx
call fcn.00512534
mov edx, dword [ebp - 0xa0]
lea eax, [ebx + 0xc]
call fcn.0040449c
jmp 0x512dfd
lea eax, [ebx + 8]
mov edx, dword [ebp - 0x24]
call fcn.0040449c
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
cmp eax, dword [ebp - 0x38]
jg 0x512b72
cmp byte [ebp - 5], 0
je 0x51303c
cmp dword [ebp - 0x1c], 1
jle 0x51303c
mov eax, dword [ebp - 0x1c]
dec eax
test eax, eax
jl 0x51303c
inc eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
mov edx, dword [edx + ecx*8]
call fcn.004044e0
mov edx, dword [ebp - 0x48]
mov eax, 0x5132cc
call fcn.00404a4c
mov esi, eax
test esi, esi
jle 0x512ec4
push 0x5132d8
lea eax, [ebp - 0xac]
push eax
mov ecx, esi
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x48]
call fcn.00404968
push dword [ebp - 0xac]
push 0x5132d8
lea eax, [ebp - 0x44]
mov edx, 3
call fcn.004047c8
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
lea eax, [eax + edx*8]
push eax
mov eax, dword [ebp - 0x48]
call fcn.00404708
mov ecx, eax
lea edx, [esi + 1]
mov eax, dword [ebp - 0x48]
call fcn.00404968
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
mov edx, dword [edx + ecx*8]
call fcn.004044e0
jmp 0x512edf
push ebp
lea eax, [ebp - 0xb0]
call fcn.0051262c
pop ecx
mov edx, dword [ebp - 0xb0]
lea eax, [ebp - 0x44]
call fcn.004044e0
push 0x513434
push dword [ebp - 0x44]
push 0x513398
push dword [ebp - 0x48]
push 0x5132d8
lea eax, [ebp - 0xc]
mov edx, 5
call fcn.004047c8
mov eax, dword [ebp - 0x3c]
call fcn.004c93ec
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x3c]
call fcn.004a6f90
jmp 0x513020
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 1
call fcn.0049cff8
lea edx, [ebp - 0xb4]
mov ecx, dword [eax]
call dword [ecx + 0x60]
cmp dword [ebp - 0xb4], 0
je 0x513018
mov eax, dword [ebp - 0x20]
mov edi, dword [eax + 8]
dec edi
test edi, edi
jl 0x513018
inc edi
xor esi, esi
mov edx, esi
mov eax, dword [ebp - 0x20]
call fcn.0041e338
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x48]
call fcn.00404854
jne 0x513010
mov edx, esi
mov eax, dword [ebp - 0x20]
call fcn.0041e338
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
xor edx, edx
call fcn.0049cff8
lea edx, [ebp - 0xb8]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edx, dword [ebp - 0xb8]
pop eax
call fcn.00404854
jne 0x513010
mov edx, esi
mov eax, dword [ebp - 0x20]
call fcn.0041e338
add eax, 0xc
push eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 2
call fcn.0049cff8
lea edx, [ebp - 0xc0]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0xc0]
push eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x30]
mov edx, 1
call fcn.0049cff8
lea edx, [ebp - 0xc4]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0xc4]
lea ecx, [ebp - 0xbc]
pop edx
call fcn.00512534
mov edx, dword [ebp - 0xbc]
pop eax
call fcn.0040449c
inc esi
dec edi
jne 0x512f58
mov eax, dword [ebp - 0x3c]
call fcn.004a9644
mov eax, dword [ebp - 0x3c]
cmp byte [eax + 0xa1], 0
je 0x512f1e
inc dword [ebp - 0x38]
dec dword [ebp - 0x4c]
jne 0x512e3a
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
call fcn.0049d030
dec eax
test eax, eax
jl 0x5131bf
inc eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, dword [ebp - 0x38]
call fcn.0049cff8
cmp byte [eax + 0x42], 0
jne 0x513198
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, dword [ebp - 0x38]
call fcn.0049cff8
mov edx, dword [eax + 0x38]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x198]
call fcn.004b0d04
mov eax, dword [eax + 8]
lea edx, [ebp - 0x30]
call fcn.00408da4
cmp dword [ebp - 0x30], 0
jne 0x5130b7
mov ecx, 0x1543
mov edx, 0x51348c
mov eax, 0x5134c4
call fcn.004043a4
lea eax, [ebp - 0x34]
call fcn.00404448
xor esi, esi
jmp 0x51314b
mov edx, esi
mov eax, dword [ebp - 0x20]
call fcn.0041e338
mov ebx, eax
mov eax, dword [ebp - 0x30]
mov edx, dword [ebx + 0x10]
call fcn.00404854
jne 0x51314a
cmp byte [ebx + 0x14], 0
jne 0x51314a
cmp dword [ebx + 4], 0
je 0x513157
mov byte [ebx + 0x14], 1
cmp dword [ebx + 8], 0
je 0x51310f
push dword [ebx + 8]
push 0x5132cc
push dword [ebx + 4]
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.004047c8
jmp 0x513127
push dword [ebp - 0x24]
push 0x5132cc
push dword [ebx + 4]
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.004047c8
cmp dword [ebx + 0xc], 0
je 0x513157
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, dword [ebp - 0x38]
call fcn.0049cff8
add eax, 0x8c
mov edx, dword [ebx + 0xc]
call fcn.0040449c
jmp 0x513157
inc esi
mov eax, dword [ebp - 0x20]
cmp esi, dword [eax + 8]
jl 0x5130c6
mov eax, dword [ebp - 0x20]
cmp esi, dword [eax + 8]
jne 0x51317d
cmp dword [ebp - 0x1c], 1
jne 0x51317d
push dword [ebp - 0x24]
push 0x5132cc
push dword [ebp - 0x30]
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.004047c8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, dword [ebp - 0x38]
call fcn.0049cff8
add eax, 0x90
mov edx, dword [ebp - 0x34]
call fcn.0040449c
inc dword [ebp - 0x38]
dec dword [ebp - 0x4c]
jne 0x51305b
jmp 0x5131bf
xor edx, edx
mov eax, dword [ebp - 0x20]
call fcn.0041e338
call fcn.00403534
xor edx, edx
mov eax, dword [ebp - 0x20]
call fcn.0041e228
mov eax, dword [ebp - 0x20]
cmp dword [eax + 8], 0
jg 0x5131a6
mov eax, dword [ebp - 0x20]
call fcn.00403534
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5131ed
mov eax, dword [ebp - 0x3c]
call fcn.00403534
ret