Function at 0x40af40
Capabilities:
Reference sql statements

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40b4f1
sub esp, 0x50
mov edx, dword [esp + 0x54]
test byte [edx], al
nop
lea ebx, [edx + 0xf0]
mov ebp, dword [esp + 0x58]
add ebp, 0x3fffff
and ebp, 0xffc00000
mov dword [esp + 0x18], ebp
mov esi, dword [esp + 0x5c]
cmp esi, ebx
je 0x40af89
xor eax, eax
jmp 0x40b29b
lea eax, [edx + 0xf4]
mov dword [esp], eax
mov dword [esp + 4], ebp
mov dword [esp + 8], 0x400000
lea eax, [0x7f9600]
mov dword [esp + 0xc], eax
call fcn.0040c900
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40afc6
mov edx, dword [esp + 0x54]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x5c]
jmp 0x40b29b
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x38], ecx
mov edx, eax
shr eax, 0x16
mov ebx, dword [esp + 0x54]
jmp 0x40b008
mov ecx, dword [esp + 0x44]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004025a0
mov eax, dword [esp + 0x2c]
inc eax
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x38]
mov ecx, ebx
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x54]
mov ebp, edx
lea edx, [ecx + edx - 1]
shr edx, 0x16
cmp eax, edx
ja 0x40b1f5
mov dword [esp + 0x2c], eax
mov edx, dword [ebx + 0xdc]
test edx, edx
jne 0x40b090
nop
mov eax, dword [sym.imp.kernel32.dll_VirtualAlloc]
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0x1000
mov dword [esp + 0xc], 0x3000
mov dword [esp + 0x10], 4
call fcn.00434370
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40b259
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x54]
lea edx, [ecx + 0xdc]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.004025a0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
test byte [edx], al
cmp eax, 0x400
jae 0x40b24f
mov esi, dword [edx + eax*4]
lea edx, [edx + eax*4]
test esi, esi
jne 0x40b239
mov dword [esp + 0x44], edx
lea eax, [ebx + 0xe0]
mov dword [esp], eax
mov dword [esp + 4], 0x218c8
mov dword [esp + 8], 4
lea eax, [0x7fb470]
mov dword [esp + 0xc], eax
call fcn.0040c900
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40b109
mov dword [esp], 0x218c8
mov dword [esp + 4], 4
lea eax, [0x7fb470]
mov dword [esp + 8], eax
call fcn.0040c530
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40b223
movzx ebx, byte [esp + 0x60]
test bl, bl
je 0x40afdd
mov ebp, dword [esp + 0x54]
mov esi, dword [ebp + 0x10c]
cmp dword [ebp + 0x108], esi
jne 0x40b1c6
mov dword [esp + 0x20], eax
shl esi, 3
test esi, esi
jne 0x40b13d
mov esi, dword [0x7f8b94]
mov dword [esp + 0x1c], esi
mov dword [esp], esi
mov dword [esp + 4], 4
lea eax, [0x7fb470]
mov dword [esp + 8], eax
call fcn.0040c530
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40b20d
mov ebx, dword [esp + 0x54]
mov ebp, dword [ebx + 0x104]
mov esi, dword [ebx + 0x108]
mov dword [ebx + 0x104], eax
mov edi, dword [esp + 0x1c]
shr edi, 2
mov dword [ebx + 0x10c], edi
mov edi, dword [ebx + 0x104]
mov eax, ebx
mov ebx, dword [ebx + 0x108]
cmp ebx, esi
jg 0x40b19e
mov esi, ebx
cmp edi, ebp
je 0x40b1b9
mov dword [esp], edi
mov dword [esp + 4], ebp
shl esi, 2
mov dword [esp + 8], esi
call fcn.00464cc0
mov eax, dword [esp + 0x54]
mov eax, dword [esp + 0x20]
movzx ebx, byte [esp + 0x60]
mov ebp, dword [esp + 0x54]
mov esi, dword [ebp + 0x108]
mov edx, dword [ebp + 0x10c]
lea ecx, [esi + 1]
cmp edx, ecx
jb 0x40b208
mov dword [ebp + 0x108], ecx
mov edx, dword [ebp + 0x104]
cmp esi, ecx
jae 0x40b201
mov ecx, dword [esp + 0x2c]
mov dword [edx + esi*4], ecx
jmp 0x40afdd
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ecx
add esp, 0x50
ret
mov eax, esi
call fcn.00464400
call fcn.00464440
lea eax, [0x626410]
mov dword [esp], eax
mov dword [esp + 4], 0x22
call fcn.00436e90
lea eax, [0x628d06]
mov dword [esp], eax
mov dword [esp + 4], 0x2c
call fcn.00436e90
lea eax, [0x622b01]
mov dword [esp], eax
mov dword [esp + 4], 0x19
call fcn.00436e90
mov ecx, 0x400
call fcn.00464410
lea eax, [0x627a74]
mov dword [esp], eax
mov dword [esp + 4], 0x27
call fcn.00436e90
mov edi, dword [ebx + 8]
mov dword [esi], edi
nop
mov edi, dword [eax + 0x4618]
sub edi, dword [eax + 0x45fc]
mov dword [eax + 0x4618], edi
mov edi, dword [eax + 0x4608]
mov dword [ebx], edi
mov dword [eax + 0x4608], ebx
mov edx, eax
mov eax, dword [esp + 0x4c]
mov ebx, dword [esi]
test ebx, ebx
je 0x40b345
mov edi, dword [ebx]
mov eax, edx
movzx edx, byte [ebx + 4]
test dl, dl
je 0x40b2b3
sub edi, ebp
mov dword [esp + 0x34], ebx
lea edx, [edi + ebp]
cmp edi, edx
jbe 0x40b2c2
xor ecx, ecx
jmp 0x40b2f4
mov dword [esp + 0x28], edi
mov dword [esp + 0x38], edx
mov dword [esp], edi
mov dword [esp + 4], ebp
call fcn.00415300
mov eax, dword [esp + 8]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x28]
mov ecx, eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x4c], ecx
cmp ecx, edi
je 0x40b32d
mov edx, dword [esp + 0x4c]
test edx, edx
je 0x40b26f
mov dword [esp], edx
mov dword [esp + 4], ebp
call fcn.00415200
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x5c]
jmp 0x40b26f
movzx esi, byte [ebx + 4]
xchg esi, eax
test al, al
xchg esi, eax
jne 0x40b339
mov edi, edx
mov dword [ebx], edi
mov edx, eax
mov ecx, ebp
mov eax, dword [esp + 0x4c]
jmp 0x40b347
xor ecx, ecx
test ecx, ecx
jne 0x40b3e7
mov dword [esp], 0
mov dword [esp + 4], ebp
mov dword [esp + 8], 0x400000
call fcn.0040b500
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
test eax, eax
je 0x40b413
mov dword [esp + 0x4c], eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x54]
lea ecx, [eax + 0x45fc]
mov dword [esp + 0x40], ecx
mov dword [esp], ecx
call fcn.00416300
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x4c]
mov dword [eax], ecx
mov byte [eax + 4], 1
mov ecx, dword [0x7d8bf0]
mov dword [eax + 8], ecx
mov dword [0x7d8bf0], eax
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call fcn.00416300
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x38]
add ecx, ebx
mov dword [eax], ecx
mov ecx, dword [0x7d8bf0]
mov dword [eax + 8], ecx
mov dword [0x7d8bf0], eax
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x4c]
mov ecx, ebx
mov ebx, eax
lea ebp, [ecx + eax]
cmp eax, ebp
jbe 0x40b3fd
mov esi, 0x1c
lea edi, [0x62421d]
jmp 0x40b401
xor esi, esi
xor edi, edi
test esi, esi
jne 0x40b43d
test eax, 0x3fffff
jne 0x40b427
mov eax, ebx
jmp 0x40afca
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
add esp, 0x50
ret
lea eax, [0x625def]
mov dword [esp], eax
mov dword [esp + 4], 0x21
call fcn.00436e90
mov dword [esp + 0x24], eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x30], esi
mov dword [esp + 0x3c], edi
call fcn.004388b0
lea eax, [0x625fbd]
mov dword [esp], eax
mov dword [esp + 4], 0x21
call fcn.004391b0
mov dword [esp + 4], 0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00439030
lea eax, [0x61a76f]
mov dword [esp], eax
mov dword [esp + 4], 2
call fcn.004391b0
mov dword [esp + 4], 0
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00439030
lea eax, [0x624fa8]
mov dword [esp], eax
mov dword [esp + 4], 0x1f
call fcn.004391b0
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
call fcn.004391b0
call fcn.00438ad0
call fcn.00438920
lea eax, [0x629274]
mov dword [esp], eax
mov dword [esp + 4], 0x2e
call fcn.00436e90
nop
call fcn.00462f70
jmp fcn.0040af40