Function at 0x4ae970
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
push ebx
push ebp
xor ebp, ebp
push edi
lea edi, [esp + 0x18]
lea ebx, [esp + 0x14]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0xc], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], ebp
call fcn.004ae560
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x4aeb71
push esi
mov dword [esp + 0x20], ebp
cmp dword [esp + 0x3c], ebp
jbe 0x4aeb47
mov ebx, dword [esp + 0x38]
add ebx, 8
mov ecx, dword [ebx - 8]
push ecx
push 0x58155c
call fcn.004e0140
mov edi, eax
add esp, 8
test edi, edi
je 0x4aebb4
mov edx, dword [esp + 0x1c]
push edx
push edi
push str.SELECT_ALL__s_FROM__s_WHERE_id_ID_
call fcn.004e0140
push edi
mov esi, eax
call fcn.004bf5d0
xor edi, edi
add esp, 0x10
cmp esi, edi
je 0x4aebb4
mov ecx, dword [esp + 0x18]
push edi
lea eax, [esp + 0x14]
push eax
push 0xffffffffffffffff
push esi
push ecx
call fcn.00524ff0
push esi
mov ebp, eax
call fcn.004bf5d0
add esp, 0x18
cmp ebp, 1
jne 0x4aea3b
mov dword [ebx], 0xffffffff
mov dword [esp + 0x30], 0x12
jmp 0x4aeb29
cmp ebp, edi
jne 0x4aeb41
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
push edx
push 1
push eax
call fcn.004f87c0
mov ebp, eax
add esp, 0xc
cmp ebp, edi
jne 0x4aeb41
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0052a970
mov ebp, eax
add esp, 4
cmp ebp, 5
jne 0x4aea91
push eax
call fcn.0054b220
mov eax, dword [esp + 0x18]
inc eax
add esp, 4
cmp eax, 0xa
mov dword [esp + 0x14], eax
jl 0x4aea61
jmp 0x4aeb0e
cmp ebp, 0x64
jne 0x4aeb0e
mov edx, dword [esp + 0x10]
push edi
push edx
call fcn.004db150
mov esi, eax
mov eax, dword [esp + 0x18]
push edi
push eax
call fcn.004e24b0
add esp, 0x10
cmp eax, edi
je 0x4aeaf6
cmp esi, 3
jne 0x4aeacd
cmp byte [eax], 0xa5
jne 0x4aeacd
cmp byte [eax + 1], 0
jne 0x4aeacd
cmp byte [eax + 2], 0x5a
jne 0x4aeacd
xor esi, esi
mov ecx, dword [ebx - 4]
cmp ecx, edi
je 0x4aeae3
cmp dword [ebx], esi
jb 0x4aeb00
push esi
push eax
push ecx
call fcn.0040dc50
add esp, 0xc
mov dword [ebx], esi
mov dword [esp + 0x24], 1
mov dword [esp + 0x14], edi
jmp 0x4aea61
mov dword [esp + 0x30], 0x12
jmp 0x4aeb08
mov dword [esp + 0x30], 0x150
mov dword [ebx], 0xffffffff
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0051a860
mov edx, dword [esp + 0x14]
push edx
call fcn.0051a790
add esp, 8
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x20]
inc eax
add ebx, 0xc
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x3c]
jb 0x4ae9c5
xor edi, edi
cmp dword [esp + 0x30], edi
jne 0x4aeb70
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x18]
push ecx
mov eax, ebp
call fcn.004ae230
add esp, 4
cmp dword [esp + 0x24], 0
mov dword [esp + 0x30], eax
jne 0x4aeb70
test eax, eax
jne 0x4aeb70
mov dword [esp + 0x30], 0x82
pop esi
mov eax, dword [esp + 0xc]
pop edi
pop ebp
pop ebx
test eax, eax
je 0x4aeb8f
push eax
call fcn.0051a860
mov edx, dword [esp + 4]
push edx
call fcn.0051a790
add esp, 8
mov eax, dword [esp + 8]
test eax, eax
je 0x4aebac
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 4], eax
je 0x4aebac
mov eax, dword [ecx + 0x24]
push eax
call fcn.0054b730
add esp, 4
mov eax, dword [esp + 0x20]
add esp, 0x1c
ret
mov dword [esp + 0x30], 2
jmp 0x4aeb70