Function at 0x406fc0
Capabilities:
Reference sql statements

Disassembly:
push 0xffffffffffffffff
push 0x521b99
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56a260]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x60]
xor edi, edi
lea ecx, [esp + 0x3c]
mov dword [esp + 0x38], edi
call fcn.00434f90
mov dword [esp + 0x58], edi
push edi
lea ecx, [esp + 0x64]
mov dword [esp + 0x64], edi
call fcn.00402700
cmp eax, 1
jne 0x407018
mov eax, dword [esp + 0x60]
mov dword [eax - 4], edi
mov byte [esp + 0x58], 1
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], edi
call fcn.00402700
cmp eax, 1
jne 0x407037
mov ecx, dword [esp + 0x18]
mov dword [ecx - 4], edi
mov byte [esp + 0x58], 2
mov edx, dword [ebp + 0x5c]
mov eax, dword [ebp + 0x50]
mov ecx, dword [ebp + 0x4c]
push edx
mov edx, dword [ebp + 0x48]
push eax
mov eax, dword [ebp + 0x44]
push ecx
mov ecx, dword [ebp + 0x40]
push edx
mov edx, dword [ebp + 0x3c]
push eax
mov eax, dword [ebp + 0x38]
push ecx
push edx
push eax
lea ecx, [esp + 0x38]
push 0x547fa8
push ecx
call fcn.00402230
add esp, 0x28
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], edi
call fcn.00402700
cmp eax, 1
jne 0x407088
mov edx, dword [esp + 0x14]
mov dword [edx - 4], edi
push 0x2800
lea ecx, [esp + 0x18]
mov byte [esp + 0x5c], 3
call fcn.00402700
cmp eax, 1
jne 0x4070aa
mov eax, dword [esp + 0x14]
mov word [eax], di
mov dword [eax - 4], edi
push 0x547f4c
lea ecx, [esp + 0x18]
call fcn.00402060
mov esi, 2
cmp dword [ebp + 0x64], esi
jl 0x40710e
mov bl, 4
push esi
lea eax, [esp + 0x28]
push str._A_d
push eax
call fcn.0040f1d0
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x5c], bl
call fcn.0040e610
mov byte [esp + 0x58], 3
mov eax, dword [esp + 0x24]
cmp eax, edi
je 0x407106
sub eax, 8
push eax
mov dword [esp + 0x28], eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x24], edi
add esi, 1
cmp esi, dword [ebp + 0x64]
jle 0x4070c4
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
push edi
push esi
lea ecx, [esp + 0x68]
push str.SELECT__s_FROM_AnswerTable_WHERE__s
push ecx
call fcn.00402230
add esp, 0x10
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x64]
call fcn.0040eef0
lea ecx, [esp + 0x3c]
push ecx
push eax
push ebp
mov byte [esp + 0x64], 5
call fcn.004081a0
test eax, eax
mov byte [esp + 0x58], 3
mov eax, dword [esp + 0x34]
sete bl
test eax, eax
je 0x40716b
sub eax, 8
push eax
mov dword [esp + 0x38], eax
call fcn.004d37ab
add esp, 4
test bl, bl
je 0x4071bb
test esi, esi
je 0x40717f
add esi, 0xfffffff8
push esi
call fcn.004d37ab
add esp, 4
test edi, edi
je 0x40718f
add edi, 0xfffffff8
push edi
call fcn.004d37ab
add esp, 4
mov eax, dword [esp + 0x60]
test eax, eax
je 0x4071a3
add eax, 0xfffffff8
push eax
call fcn.004d37ab
add esp, 4
lea ecx, [esp + 0x3c]
mov dword [esp + 0x58], 0xffffffff
call fcn.00435090
xor eax, eax
jmp 0x4079a3
lea ecx, [esp + 0x3c]
call fcn.004354a0
test eax, eax
jle 0x407635
xor edi, edi
push edi
lea ecx, [esp + 0x40]
call fcn.00435770
push 9
call fcn.004d37a6
mov ebx, eax
add ebx, 8
mov dword [ebx - 8], 1
mov byte [ebx], 0
add esp, 4
mov dword [esp + 0x1c], ebx
mov dword [ebx - 4], edi
mov byte [esp + 0x58], 6
cmp dword [ebp + 0x64], edi
mov dword [esp + 0x20], edi
jle 0x407491
mov dword [esp + 0x24], edi
mov eax, dword [ebp + 8]
xor esi, esi
cmp eax, esi
je 0x407233
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x407238
call fcn.004f2608
mov eax, dword [ebp + 8]
add eax, dword [esp + 0x24]
mov edx, dword [eax + 4]
push edx
lea eax, [esp + 0x30]
push 0x548558
push eax
call fcn.0040f1d0
add esp, 0xc
lea ecx, [esp + 0x28]
push ecx
mov ecx, eax
mov byte [esp + 0x5c], 7
call fcn.0040eef0
mov byte [esp + 0x58], 8
mov eax, dword [eax]
push 0x5476a1
push eax
lea ecx, [esp + 0x44]
call fcn.00435c10
mov edi, eax
cmp edi, esi
je 0x4072e2
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407285
sub eax, edx
test ebx, ebx
mov esi, eax
je 0x4072b1
lea ecx, [ebx - 8]
lea eax, [esi + 1]
cmp dword [ecx], eax
jae 0x4072cc
push ecx
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x1c], 0
lea edx, [esi + 9]
push edx
call fcn.004d37a6
mov ebx, eax
add esp, 4
add ebx, 8
lea eax, [esi + 1]
mov dword [esp + 0x1c], ebx
mov dword [ebx - 8], eax
push edi
push eax
push ebx
mov byte [esi + ebx], 0
call fcn.004f299b
add esp, 0xc
mov dword [ebx - 4], esi
xor esi, esi
jmp 0x40731c
cmp ebx, esi
je 0x4072fc
cmp dword [ebx - 8], 1
lea eax, [ebx - 8]
jae 0x407316
push eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x1c], esi
push 9
call fcn.004d37a6
mov ebx, eax
add esp, 4
add ebx, 8
mov dword [esp + 0x1c], ebx
mov dword [ebx - 8], 1
mov byte [ebx], 0
mov dword [ebx - 4], esi
mov eax, dword [esp + 0x28]
cmp eax, esi
je 0x407338
sub eax, 8
push eax
mov dword [esp + 0x2c], eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x28], esi
mov byte [esp + 0x58], 6
mov eax, dword [esp + 0x2c]
cmp eax, esi
je 0x407359
sub eax, 8
push eax
mov dword [esp + 0x30], eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x2c], esi
cmp dword [ebx - 4], esi
je 0x407478
mov edi, 0x548560
mov esi, ebx
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4073fd
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
add ecx, 1
push ecx
push edx
lea eax, [esp + 0x3c]
push 0x548564
push eax
call fcn.0040f1d0
add esp, 0x10
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
mov byte [esp + 0x5c], 9
call fcn.0040eef0
lea edx, [esp + 0x1c]
push edx
xor esi, esi
push esi
push eax
push ebp
mov byte [esp + 0x68], 0xa
call fcn.00408590
mov eax, dword [esp + 0x30]
cmp eax, esi
je 0x4073d8
sub eax, 8
push eax
mov dword [esp + 0x34], eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x30], esi
mov byte [esp + 0x58], 6
mov eax, dword [esp + 0x34]
cmp eax, esi
je 0x4073f9
sub eax, 8
push eax
mov dword [esp + 0x38], eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x34], esi
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x407478
cmp dword [ebx - 4], 0
je 0x407478
mov eax, dword [ebp + 8]
test eax, eax
je 0x40742c
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x20], eax
jb 0x407431
call fcn.004f2608
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x24]
push 0xffffffffffffffff
push ebx
lea ecx, [ecx + eax + 0x5c]
call fcn.0040f0c0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x64]
mov esi, dword [eax + 4]
add edx, 1
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 4]
push ecx
push edx
push esi
call fcn.0041f1e0
mov ecx, dword [esp + 0x64]
mov edi, eax
call fcn.0040db60
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov edi, dword [esp + 0x20]
add dword [esp + 0x24], 0x7c
add edi, 1
cmp edi, dword [ebp + 0x64]
mov dword [esp + 0x20], edi
jl 0x40720e
xor edi, edi
xor esi, esi
cmp dword [ebp + 0x64], edi
mov dword [ebp + 0x68], edi
jle 0x4074e5
mov eax, dword [ebp + 8]
test eax, eax
je 0x4074c0
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x4074c5
call fcn.004f2608
mov eax, dword [ebp + 8]
mov eax, dword [edi + eax + 0x5c]
test eax, eax
je 0x4074da
cmp dword [eax - 4], 0
jle 0x4074da
add dword [ebp + 0x68], 1
add esi, 1
add edi, 0x7c
cmp esi, dword [ebp + 0x64]
jl 0x40749d
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x68]
push ecx
push edx
lea eax, [esp + 0x68]
push str.UPDATE_AnswerTable_SET_MARK_COUNT_d_WHERE__s
push eax
call fcn.00402230
xor ecx, ecx
mov eax, 5
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004d37a6
add eax, 8
mov dword [eax - 8], 1
mov word [eax], 0
add esp, 0x14
mov dword [esp + 0x34], eax
mov dword [eax - 4], 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x64]
mov byte [esp + 0x5c], 0xb
call fcn.0040eef0
lea ecx, [esp + 0x34]
push ecx
push 0
push eax
push ebp
mov byte [esp + 0x68], 0xc
call fcn.004080a0
test eax, eax
mov byte [esp + 0x58], 0xb
mov eax, dword [esp + 0x30]
sete byte [esp + 0x64]
test eax, eax
je 0x40757f
sub eax, 8
push eax
mov dword [esp + 0x34], eax
call fcn.004d37ab
add esp, 4
cmp byte [esp + 0x64], 0
je 0x40760c
mov esi, dword [esp + 0x34]
push 0
push 0
push esi
call fcn.004db332
test esi, esi
je 0x4075a8
lea eax, [esi - 8]
push eax
call fcn.004d37ab
add esp, 4
test ebx, ebx
je 0x4075b8
add ebx, 0xfffffff8
push ebx
call fcn.004d37ab
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4075cc
add eax, 0xfffffff8
push eax
call fcn.004d37ab
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4075e0
add eax, 0xfffffff8
push eax
call fcn.004d37ab
add esp, 4
mov eax, dword [esp + 0x60]
test eax, eax
je 0x4075f4
add eax, 0xfffffff8
push eax
call fcn.004d37ab
add esp, 4
lea ecx, [esp + 0x3c]
mov dword [esp + 0x58], 0xffffffff
call fcn.00435090
xor eax, eax
jmp 0x4079a3
mov eax, dword [esp + 0x34]
test eax, eax
je 0x407620
add eax, 0xfffffff8
push eax
call fcn.004d37ab
add esp, 4
test ebx, ebx
mov byte [esp + 0x58], 3
je 0x407635
add ebx, 0xfffffff8
push ebx
call fcn.004d37ab
add esp, 4
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
push edi
push esi
lea edx, [esp + 0x68]
push str.SELECT__s_FROM_MarkInfoTable_WHERE__s
push edx
call fcn.00402230
add esp, 0x10
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x64]
call fcn.0040eef0
lea ecx, [esp + 0x3c]
push ecx
push eax
mov byte [esp + 0x60], 0xd
push ebp
mov dword [esp + 0x44], 1
call fcn.004081a0
test eax, eax
je 0x40768d
lea ecx, [esp + 0x3c]
call fcn.004354a0
test eax, eax
jle 0x40768d
mov bl, 1
jmp 0x40768f
xor bl, bl
mov dword [esp + 0x58], 3
mov eax, dword [esp + 0x64]
test eax, eax
je 0x4076af
sub eax, 8
push eax
mov dword [esp + 0x68], eax
call fcn.004d37ab
add esp, 4
test bl, bl
je 0x407959
xor edi, edi
push edi
lea ecx, [esp + 0x40]
call fcn.00435770
push 9
call fcn.004d37a6
mov esi, eax
add esi, 8
lea eax, [esi - 8]
mov dword [eax], 1
mov byte [esi], 0
add esp, 4
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
mov dword [esi - 4], edi
mov byte [esp + 0x58], 0xe
cmp dword [ebp + 0x64], edi
mov dword [esp + 0x1c], edi
jle 0x407945
mov dword [esp + 0x64], edi
nop
mov eax, dword [ebp + 8]
test eax, eax
je 0x407725
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x1c], eax
jb 0x40772a
call fcn.004f2608
mov eax, dword [ebp + 8]
add eax, dword [esp + 0x64]
mov edx, dword [eax + 4]
push edx
lea eax, [esp + 0x34]
push 0x548558
push eax
call fcn.0040f1d0
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
mov ecx, eax
mov byte [esp + 0x5c], 0xf
call fcn.0040eef0
mov byte [esp + 0x58], 0x10
mov eax, dword [eax]
push 0x5476a1
push eax
lea ecx, [esp + 0x44]
call fcn.00435c10
mov edi, eax
xor ebx, ebx
cmp edi, ebx
je 0x4077e5
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407780
sub eax, edx
mov edx, dword [esp + 0x20]
mov ebx, eax
lea eax, [ebx + 1]
cmp dword [edx], eax
jae 0x4077cc
mov eax, edx
push eax
call fcn.004d37ab
lea ecx, [ebx + 9]
add esp, 4
push ecx
mov dword [esp + 0x28], 0
call fcn.004d37a6
mov esi, eax
add esp, 4
add esi, 8
lea eax, [esi - 8]
lea ecx, [ebx + 1]
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
mov dword [eax], ecx
push edi
lea eax, [ebx + 1]
push eax
push esi
mov byte [ebx + esi], 0
call fcn.004f299b
add esp, 0xc
mov dword [esi - 4], ebx
xor ebx, ebx
jmp 0x407821
mov eax, dword [esp + 0x20]
cmp dword [eax], 1
jae 0x40781b
push eax
call fcn.004d37ab
add esp, 4
push 9
mov dword [esp + 0x28], ebx
call fcn.004d37a6
mov esi, eax
add esp, 4
add esi, 8
lea eax, [esi - 8]
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
mov dword [eax], 1
mov byte [esi], 0
mov dword [esi - 4], ebx
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x40783d
sub eax, 8
push eax
mov dword [esp + 0x38], eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x34], ebx
mov byte [esp + 0x58], 0xe
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x40785e
sub eax, 8
push eax
mov dword [esp + 0x34], eax
call fcn.004d37ab
add esp, 4
mov dword [esp + 0x30], ebx
cmp dword [esi - 4], ebx
je 0x40792c
push 0xa
push 0
push esi
call fcn.004f381b
mov edi, dword [esp + 0x28]
mov ebx, eax
mov eax, dword [ebp + 8]
add esp, 0xc
test eax, eax
mov dword [esp + 0x38], ebx
je 0x4078a1
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x4078a6
call fcn.004f2608
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x64]
mov edx, ebx
shr edx, 0x18
mov dword [ecx + eax + 0x68], edx
mov eax, dword [ebp + 8]
test eax, eax
je 0x4078d9
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x4078de
call fcn.004f2608
movzx edx, byte [esp + 0x3a]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x64]
mov dword [ecx + eax + 0x6c], edx
mov eax, dword [ebp + 8]
test eax, eax
je 0x407911
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x407916
call fcn.004f2608
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x64]
and ebx, 0xffff
imul ebx, ebx, 0x64
mov dword [eax + edx + 0x64], ebx
jmp 0x407930
mov edi, dword [esp + 0x1c]
add dword [esp + 0x64], 0x7c
add edi, 1
cmp edi, dword [ebp + 0x64]
mov dword [esp + 0x1c], edi
jl 0x407700
add esi, 0xfffffff8
push esi
call fcn.004d37ab
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
add esp, 4
test esi, esi
je 0x407969
lea eax, [esi - 8]
push eax
call fcn.004d37ab
add esp, 4
test edi, edi
je 0x407979
lea eax, [edi - 8]
push eax
call fcn.004d37ab
add esp, 4
mov eax, dword [esp + 0x60]
test eax, eax
je 0x40798d
add eax, 0xfffffff8
push eax
call fcn.004d37ab
add esp, 4
lea ecx, [esp + 0x3c]
mov dword [esp + 0x58], 0xffffffff
call fcn.00435090
mov eax, 1
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 8