Function at 0x1006b310
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x154
mov eax, dword [0x101f62b4]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
xor ebx, ebx
mov dword [esp + 0x18], 0
mov eax, ecx
mov dword [esp + 0x10], ebx
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x30], eax
mov ecx, dword [eax + 0x34]
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebx
mov dword [esp + 0x150], ebx
mov byte [esp + 0x154], bl
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xc4], ebx
mov dword [esp + 0x34], ecx
push edi
test esi, esi
jne 0x1006b38b
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.1015c7a5
mov esp, ebp
pop ebp
ret
movzx esi, word [eax + 0x18]
movzx ecx, byte [eax + 0xc]
lea edi, [ecx + esi]
cmp edi, 2
jae 0x1006b39f
xor edx, edx
jmp 0x1006b3bc
test edx, edx
je 0x1006b3b2
cmp edx, edi
jne 0x1006b3b1
mov eax, dword [ebp + 0x10]
lea edx, [eax - 2]
add edx, edi
jmp 0x1006b3b5
dec edx
mov eax, dword [ebp + 0x10]
mov edi, 2
sub edi, eax
lea eax, [edi + 1]
mov dword [esp + 0x54], edx
mov dword [esp + 0x44], eax
mov eax, edx
sub eax, ecx
mov dword [esp + 0x64], edi
lea ecx, [eax + edi]
cmp ecx, esi
jne 0x1006b3e8
mov eax, dword [esp + 0x34]
movzx ecx, byte [eax + 9]
mov eax, dword [eax + 0x38]
add ecx, 8
add ecx, eax
jmp 0x1006b403
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 0x40]
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [edx + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [edx + 0x38]
mov edx, dword [ecx]
lea esi, [esp + 0x134]
push 0
bswap edx
mov dword [esp + 0x50], ecx
lea esi, [esi + edi*4]
mov ecx, dword [esp + 0x3c]
push 0
push esi
mov dword [esp + 0x5c], edx
mov dword [esp + 0x3c], edx
call fcn.10065620
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
test eax, eax
jne 0x1006b5df
nop
mov ecx, dword [esi]
mov edx, edi
mov dword [esp + 0x1c], edx
cmp dword [ecx + 0x14], 0
jge 0x1006b467
call fcn.100650b0
mov esi, eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], esi
test esi, esi
jne 0x1006b676
mov edx, edi
mov eax, edi
dec edi
test eax, eax
je 0x1006b6b0
mov esi, dword [esp + 0x34]
mov al, byte [esi + 0xc]
test al, al
je 0x1006b4ce
mov eax, dword [esp + 0x54]
movzx ecx, word [esi + 0x1c]
add eax, edi
cmp eax, ecx
jne 0x1006b4cb
mov eax, dword [esi + 0x24]
push eax
push esi
mov esi, dword [esi + 0x4c]
mov ecx, dword [eax]
bswap ecx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x38], ecx
mov ecx, esi
mov dword [esp + edi*4 + 0x70], eax
call dword [0x1019a4f8]
call esi
movzx eax, ax
lea esi, [edi*4]
mov dword [esp + esi + 0x88], eax
mov eax, dword [esp + 0x3c]
mov byte [eax + 0xc], 0
jmp 0x1006b5ae
mov al, byte [esi + 0xc]
movzx eax, al
mov ecx, edx
sub ecx, eax
mov eax, dword [esi + 0x40]
add ecx, dword [esp + 0x54]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [esi + 0x1a]
movzx ecx, cx
and ecx, eax
lea eax, [edx*4 - 4]
add ecx, dword [esi + 0x38]
mov dword [esp + eax + 0x68], ecx
mov dword [esp + 0x28], eax
push ecx
mov eax, dword [ecx]
bswap eax
push esi
mov esi, dword [esi + 0x4c]
mov dword [esp + 0x34], ecx
mov ecx, esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x38], eax
call dword [0x1019a4f8]
call esi
mov ecx, dword [esp + 0x40]
add esp, 8
mov esi, dword [esp + 0x28]
movzx eax, ax
mov dword [esp + 0x40], eax
test byte [ecx + 0x18], 0xc
mov dword [esp + esi + 0x80], eax
je 0x1006b58a
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
mov ecx, edx
sub ecx, dword [ebx + 0x38]
mov ebx, dword [esp + 0x38]
add eax, ecx
cmp eax, dword [ebx + 0x28]
mov ebx, 0
jg 0x1006b682
push dword [esp + 0x40]
mov eax, dword [esp + 0x7c]
push edx
add eax, ecx
push eax
call fcn.1015f820
mov ecx, dword [esp + 0x40]
add esp, 0xc
mov eax, dword [esp + 0x78]
sub eax, dword [ecx + 0x38]
add eax, dword [esp + 0x2c]
mov dword [esp + esi + 0x68], eax
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x20]
dec edx
push eax
mov eax, dword [esp + 0x3c]
movzx eax, byte [eax + 0xc]
sub ecx, eax
add edx, ecx
mov ecx, dword [esp + 0x3c]
call fcn.1006a260
mov edx, dword [esp + 0x58]
lea eax, [esp + 0x13c]
mov ecx, dword [esp + 0x40]
add esp, 8
add esi, eax
push 0
push 0
push esi
call fcn.10065620
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
test eax, eax
je 0x1006b440
lea eax, [edi*4 + 4]
push eax
lea eax, [esp + 0x138]
push 0
push eax
call fcn.10160390
add esp, 0xc
xor ebx, ebx
cmp dword [esp + 0x44], ebx
jle 0x1006c7c3
nop word [eax + eax]
mov edx, dword [esp + ebx*4 + 0x134]
test edx, edx
je 0x1006c7b8
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1006c7b1
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.1015d970
push edx
push eax
push esi
mov esi, dword [edi + 0x48]
mov ecx, esi
call dword [0x1019a4f8]
call esi
add esp, 0x10
jmp 0x1006c7b8
lea eax, [edi*4]
jmp 0x1006b5e6
push 0x101d02b4
push 0x1192d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10053700
add esp, 0x14
mov dword [esp + 0x14], 0xb
lea eax, [esi + 4]
jmp 0x1006b5e6
mov eax, dword [esp + 0x38]
mov esi, dword [eax + 0x24]
mov eax, 0xaaaaaaab
lea ecx, [esi - 8]
mul ecx
mov edi, edx
shr edi, 2
add edi, 4
imul edi, dword [esp + 0x44]
add edi, 3
and edi, 0xfffffffc
lea eax, [edi + edi*2]
lea eax, [esi + eax*2]
cdq
push edx
push eax
call fcn.100509f0
add esp, 8
mov dword [esp + 0xc8], eax
test eax, eax
jne 0x1006b6fd
mov dword [esp + 0x14], 7
jmp 0x1006b5f9
mov ecx, dword [esp + 0x134]
lea eax, [eax + edi*4]
mov dword [esp + 0xcc], eax
lea eax, [eax + edi*2]
mov dword [esp + 0x28], eax
mov dword [esp + 0xc4], ecx
movzx eax, byte [ecx + 8]
shl ax, 2
movzx eax, ax
mov dword [esp + 0x5c], eax
mov al, byte [ecx + 3]
mov byte [esp + 0x13], al
movzx eax, al
mov dword [esp + 0xa8], eax
xor eax, eax
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x44], eax
jle 0x1006b98f
nop dword [eax]
shl eax, 2
mov dword [esp + 0x48], eax
mov edi, dword [esp + eax + 0x134]
mov dword [esp + 0x58], edi
movzx eax, word [edi + 0x18]
mov edx, dword [edi + 0x38]
movzx esi, word [edi + 0x12]
mov dword [esp + 0x2c], eax
add esi, edx
movzx eax, word [edi + 0x1a]
mov ecx, eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x3c], esi
mov ecx, dword [eax + 0x38]
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x1006bba8
movzx eax, byte [edi + 0xc]
add eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0xcc]
add eax, eax
push eax
mov eax, dword [esp + 0xc4]
push 0
lea eax, [ecx + eax*2]
push eax
call fcn.10160390
mov al, byte [edi + 0xc]
add esp, 0xc
test al, al
je 0x1006b866
movzx edx, word [edi + 0x1c]
cmp dword [esp + 0x2c], edx
jb 0x1006bb99
test edx, edx
je 0x1006b82e
mov edi, dword [esp + 0x40]
mov ebx, dword [esp + 0xc0]
nop dword [eax]
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x7c]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0xc8]
add ecx, edi
mov dword [eax + ebx*4], ecx
inc ebx
sub edx, 1
jne 0x1006b7f0
mov edi, dword [esp + 0x58]
mov dword [esp + 0xc0], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x3c], esi
mov al, byte [edi + 0xc]
xor edx, edx
test al, al
je 0x1006b866
mov ebx, dword [esp + 0xc0]
lea ecx, [edi + 0x24]
mov esi, dword [esp + 0xc8]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
mov dword [esi + ebx*4], eax
inc edx
movzx eax, byte [edi + 0xc]
inc ebx
cmp edx, eax
jl 0x1006b845
mov esi, dword [esp + 0x3c]
mov dword [esp + 0xc0], ebx
mov ebx, dword [esp + 0x18]
movzx eax, word [edi + 0x12]
add eax, dword [esp + 0x40]
movzx ecx, word [edi + 0x18]
lea edx, [eax + ecx*2]
cmp esi, edx
jae 0x1006b8ba
mov edi, dword [esp + 0x40]
mov ebx, dword [esp + 0xc0]
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x60]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0xc8]
add ecx, edi
mov dword [eax + ebx*4], ecx
inc ebx
cmp esi, edx
jb 0x1006b884
mov edi, dword [esp + 0x58]
mov dword [esp + 0xc0], ebx
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0xc0]
mov dword [esp + ecx + 0xac], edx
cmp eax, dword [esp + 0x64]
jge 0x1006b980
cmp byte [esp + 0x13], 0
jne 0x1006b980
movzx eax, word [esp + ecx + 0x80]
mov ecx, dword [esp + 0xcc]
mov esi, dword [esp + 0x28]
push eax
add esi, ebx
add ebx, eax
mov word [ecx + edx*2], ax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x1c], ebx
push dword [esp + eax + 0x6c]
push esi
call fcn.1015f820
mov eax, dword [esp + 0x68]
add esp, 0xc
mov edx, dword [esp + 0xc0]
mov ecx, dword [esp + 0xcc]
movzx eax, ax
add eax, esi
mov esi, dword [esp + 0xc8]
mov dword [esi + edx*4], eax
mov eax, dword [esp + 0x5c]
sub word [ecx + edx*2], ax
cmp byte [edi + 8], 0
jne 0x1006b952
mov eax, dword [edi + 0x38]
mov ecx, dword [esi + edx*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x1006b974
cmp word [ecx + edx*2], 4
jae 0x1006b974
mov eax, dword [esp + 0x28]
nop dword [eax]
mov byte [eax + ebx], 0
inc ebx
inc word [ecx + edx*2]
cmp word [ecx + edx*2], 4
jb 0x1006b960
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x1c]
inc edx
mov dword [esp + 0xc0], edx
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x44]
jl 0x1006b750
mov eax, dword [esp + 0x5c]
xor ecx, ecx
movzx ebx, ax
xor esi, esi
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x58], esi
mov eax, dword [eax + 0x28]
add eax, 0xfffffff4
add ebx, eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x40], ebx
test eax, eax
jle 0x1006baab
nop
mov edi, dword [esp + esi*4 + 0x134]
mov edx, dword [esp + esi*4 + 0xac]
mov dword [esp + 0x60], edx
mov eax, dword [edi + 0x3c]
mov dword [esp + ecx*4 + 0xd0], eax
mov dword [esp + ecx*4 + 0xe8], edx
test ecx, ecx
je 0x1006b9f5
cmp edx, dword [esp + ecx*4 + 0xe4]
jne 0x1006b9f5
dec ecx
mov dword [esp + 0x1c], ecx
cmp byte [esp + 0x13], 0
jne 0x1006ba19
mov eax, dword [esp + 0x34]
inc ecx
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 0x3c]
mov dword [esp + ecx*4 + 0xd0], eax
lea eax, [edx + 1]
mov dword [esp + ecx*4 + 0xe8], eax
sub ebx, dword [edi + 0x14]
lea eax, [esp + 0x80]
cmp byte [edi + 0xc], 0
lea eax, [eax + esi*4]
mov dword [esp + 0x64], eax
mov dword [eax], ebx
mov dword [esp + 0x28], 0
jbe 0x1006ba8a
lea ecx, [edi + 0x24]
mov dword [esp + 0x48], ecx
push dword [ecx]
mov esi, dword [edi + 0x4c]
mov ecx, esi
push edi
call dword [0x1019a4f8]
call esi
mov edx, dword [esp + 0x30]
add esp, 8
mov ecx, dword [esp + 0x48]
inc edx
movzx eax, ax
add ecx, 4
add eax, 2
mov dword [esp + 0x28], edx
add ebx, eax
mov dword [esp + 0x48], ecx
movzx eax, byte [edi + 0xc]
cmp edx, eax
jl 0x1006ba41
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x60]
mov esi, dword [esp + 0x58]
mov dword [eax], ebx
mov eax, dword [esp + 0x44]
inc ecx
mov ebx, dword [esp + 0x40]
mov dword [esp + esi*4 + 0x94], edx
inc esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x1c], ecx
cmp esi, eax
jl 0x1006b9c0
mov ebx, dword [esp + 0xc0]
mov edx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], 0
test eax, eax
jle 0x1006bcc8
mov eax, 1
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], ecx
nop word [eax + eax]
mov edi, dword [esp + ecx + 0x80]
cmp edi, dword [esp + 0x40]
jle 0x1006bbfc
cmp eax, edx
jl 0x1006bb1e
lea edx, [eax + 1]
mov dword [esp + 0x18], edx
cmp edx, 5
jg 0x1006bd82
mov dword [esp + ecx + 0x84], 0
mov edi, dword [esp + ecx + 0x80]
mov dword [esp + ecx + 0x98], ebx
mov esi, dword [esp + ecx + 0x94]
mov edx, dword [esp + 0xcc]
lea ebx, [esi - 1]
movzx eax, word [edx + ebx*2]
test ax, ax
jne 0x1006bb54
mov edx, ebx
lea ecx, [esp + 0xc0]
call fcn.1006a5d0
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0xcc]
movzx eax, ax
movzx eax, ax
add eax, 2
sub edi, eax
cmp byte [esp + 0x13], 0
mov dword [esp + ecx + 0x80], edi
jne 0x1006bbd5
cmp esi, dword [esp + 0xc0]
jge 0x1006bbd3
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x1006bb8d
mov edx, esi
lea ecx, [esp + 0xc0]
call fcn.1006a5d0
movzx eax, ax
mov ecx, dword [esp + 0x3c]
movzx eax, ax
add eax, 2
jmp 0x1006bbd5
mov ecx, 0x11988
call fcn.100df020
jmp 0x1006c790
push 0x101d02b4
push 0x11970
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10053700
add esp, 0x14
mov dword [esp + 0x14], 0xb
jmp 0x1006c794
xor eax, eax
add dword [esp + ecx + 0x84], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov dword [esp + ecx + 0x94], ebx
mov ebx, dword [esp + 0xc0]
cmp edi, dword [esp + 0x40]
jg 0x1006baf1
mov esi, dword [esp + ecx + 0x94]
cmp esi, ebx
jge 0x1006bca5
mov edx, dword [esp + 0xcc]
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x1006bc37
mov edx, esi
lea ecx, [esp + 0xc0]
call fcn.1006a5d0
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0xcc]
movzx eax, ax
movzx eax, ax
add eax, 2
add edi, eax
cmp edi, dword [esp + 0x40]
jg 0x1006bd57
inc esi
mov dword [esp + ecx + 0x80], edi
cmp byte [esp + 0x13], 0
mov dword [esp + ecx + 0x94], esi
jne 0x1006bc92
cmp esi, ebx
jge 0x1006bc90
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x1006bc84
mov edx, esi
lea ecx, [esp + 0xc0]
call fcn.1006a5d0
mov edx, dword [esp + 0xcc]
movzx eax, ax
mov ecx, dword [esp + 0x3c]
movzx eax, ax
add eax, 2
jmp 0x1006bc92
xor eax, eax
sub dword [esp + ecx + 0x84], eax
cmp esi, ebx
jl 0x1006bc12
mov eax, dword [esp + 0x1c]
mov edx, eax
mov dword [esp + 0x18], edx
mov esi, dword [esp + 0x2c]
add ecx, 4
inc esi
mov dword [esp + 0x3c], ecx
inc eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x1c], eax
cmp esi, edx
jl 0x1006bae0
lea eax, [edx - 1]
mov ecx, eax
mov dword [esp + 0x3c], eax
test ecx, ecx
jle 0x1006bede
nop dword [eax]
shl ecx, 2
lea eax, [esp + 0x80]
add eax, ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x58], eax
mov edi, dword [eax]
lea eax, [esp + ecx + 0x7c]
mov dword [esp + 0x68], eax
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x94]
sub eax, 4
mov dword [esp + 0x48], eax
mov eax, dword [eax + ecx]
mov ecx, dword [esp + 0xcc]
mov dword [esp + 0x28], eax
lea esi, [eax - 1]
mov edx, esi
sub edx, dword [esp + 0xa8]
inc edx
cmp word [ecx + edx*2], 0
lea eax, [ecx + edx*2]
mov dword [esp + 0x2c], eax
jne 0x1006bd4e
lea ecx, [esp + 0xc0]
call fcn.1006a5d0
mov ecx, dword [esp + 0xcc]
mov ebx, dword [esp + 0x2c]
jmp 0x1006bde7
cmp esi, ebx
jge 0x1006bca1
cmp dword [esp + 0x2c], 0
jle 0x1006bd6f
mov eax, dword [esp + ecx + 0x90]
jmp 0x1006bd71
xor eax, eax
cmp esi, eax
jle 0x1006bdad
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
jmp 0x1006bcab
push 0x101d02b4
push 0x119ed
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10053700
add esp, 0x14
mov dword [esp + 0x14], 0xb
jmp 0x1006c794
push 0x101d02b4
push 0x11a0e
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10053700
add esp, 0x14
mov dword [esp + 0x14], 0xb
jmp 0x1006c794
mov ecx, dword [esp + 0xcc]
cmp word [ecx + esi*2], 0
mov dword [esp + 0x7c], esi
mov dword [esp + 0x60], esi
jne 0x1006be04
mov edx, esi
lea ecx, [esp + 0xc0]
call fcn.1006a5d0
test edi, edi
je 0x1006be51
cmp dword [ebp + 0x10], 0
mov eax, dword [esp + 0x28]
mov edx, eax
jne 0x1006be96
mov ecx, dword [esp + 0x18]
mov eax, 2
mov ebx, dword [esp + 0x2c]
dec ecx
cmp dword [esp + 0x3c], ecx
mov ecx, 0
cmove eax, ecx
mov ecx, dword [esp + 0x1c]
sub ecx, eax
mov eax, dword [esp + 0xcc]
movzx eax, word [eax + esi*2]
sub ecx, eax
movzx eax, word [ebx]
add eax, 2
add eax, edi
cmp eax, ecx
jg 0x1006be96
movzx eax, word [ebx]
mov ecx, 0xfffffffe
mov edx, dword [esp + 0x7c]
add eax, 2
add edi, eax
sub ebx, 2
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x2c], ebx
movzx eax, word [eax + esi*2]
sub ecx, eax
mov eax, dword [esp + 0x64]
add dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x48]
mov dword [ecx + eax], esi
sub esi, 1
mov eax, dword [esp + 0x60]
mov dword [esp + 0x28], eax
jns 0x1006bde0
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x68]
mov ebx, dword [esp + 0xc0]
mov dword [eax], edi
mov eax, dword [esp + 0x1c]
mov dword [ecx], eax
mov ecx, dword [esp + 0x3c]
cmp ecx, 1
jle 0x1006bec7
mov esi, dword [esp + 0x48]
lea eax, [ecx*4]
mov eax, dword [eax + esi - 4]
jmp 0x1006bec9
xor eax, eax
cmp edx, eax
jle 0x1006bf48
dec ecx
mov dword [esp + 0x3c], ecx
test ecx, ecx
jg 0x1006bce0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x134]
xor esi, esi
mov eax, dword [eax + 0x38]
movzx eax, byte [eax]
mov dword [esp + 0x48], eax
lea eax, [esi + 1]
test edx, edx
jle 0x1006c05f
nop dword [eax]
cmp esi, dword [esp + 0x44]
jge 0x1006bfba
mov eax, dword [esp + esi*4 + 0x134]
mov dword [esp + esi*4 + 0x140], eax
mov dword [esp + esi*4 + 0x134], 0
mov dword [esp + 0x28], eax
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x1006bf77
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x1006bf77
cmp dword [edx + 0x60], 0
je 0x1006bf73
call fcn.1005e190
jmp 0x1006bf9c
push 0x101d02b4
push 0x11a38
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10053700
add esp, 0x14
mov dword [esp + 0x14], 0xb
jmp 0x1006c794
xor eax, eax
jmp 0x1006bf9c
mov eax, dword [edx + 0x28]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1006bfa0
mov eax, dword [edx + 0x94]
cmp eax, dword [edx + 0x98]
jbe 0x1006bf97
call fcn.1005fa90
jmp 0x1006bf9c
call fcn.1005f860
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x20]
inc edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edi
test eax, eax
jne 0x1006c794
jmp 0x1006c04d
cmp dword [ebp + 0x10], 0
lea edx, [esp + 0x28]
mov ecx, dword [esp + 0x50]
cmovne ecx, eax
lea eax, [esp + 0x30]
push 0
push ecx
mov ecx, dword [esp + 0x40]
push eax
call fcn.10069320
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
test eax, eax
jne 0x1006c794
mov edi, dword [esp + 0x28]
mov ecx, edi
mov edx, dword [esp + 0x48]
call fcn.10065420
mov ecx, dword [esp + 0x38]
inc dword [esp + 0x20]
mov dword [esp + esi*4 + 0x140], edi
mov dword [esp + esi*4 + 0xac], ebx
cmp byte [ecx + 0x11], 0
je 0x1006c041
mov edx, dword [edi + 4]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x38]
push dword [eax + 4]
push 5
call fcn.10064180
mov edi, dword [esp + 0x30]
add esp, 0xc
mov dword [esp + 0x14], edi
test edi, edi
jne 0x1006c794
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x50], edx
inc esi
mov eax, 1
cmp esi, dword [esp + 0x18]
jl 0x1006bf00
jmp 0x1006c061
xor edi, edi
xor ecx, ecx
test edi, edi
jle 0x1006c0b7
nop word [eax + eax]
mov eax, dword [esp + ecx*4 + 0x140]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x48]
mov dword [esp + ecx*4 + 0x118], edx
mov dword [esp + ecx*4 + 0x100], edx
mov ax, word [eax + 0x1c]
mov word [esp + ecx*2 + 0x68], ax
xor eax, eax
test ecx, ecx
jle 0x1006c0b2
nop word [eax + eax]
cmp dword [esp + eax*4 + 0x118], edx
je 0x1006c240
inc eax
cmp eax, ecx
jl 0x1006c0a0
inc ecx
cmp ecx, edi
jl 0x1006c070
xor ebx, ebx
mov dword [esp + 0x28], ebx
test edi, edi
jle 0x1006c170
xor esi, esi
lea ecx, [esi + 1]
cmp edi, ecx
jle 0x1006c104
mov ebx, dword [esp + 0x20]
xor edi, edi
nop dword [eax]
nop dword [eax + eax]
lea edx, [ecx*4]
mov eax, dword [esp + edx + 0x100]
cmp eax, dword [esp + edi + 0x100]
jae 0x1006c0fb
mov esi, ecx
mov edi, edx
inc ecx
cmp ecx, ebx
jl 0x1006c0e0
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + esi*4 + 0x100]
mov dword [esp + esi*4 + 0x100], 0xffffffff
cmp esi, ebx
je 0x1006c15f
jle 0x1006c13b
mov eax, dword [esp + 0x38]
mov edx, dword [eax + 0x30]
mov eax, dword [esp + esi*4 + 0x140]
inc edx
add edx, esi
mov ecx, dword [eax + 0x48]
xor eax, eax
mov word [ecx + 0x1c], ax
call fcn.10059d30
mov eax, dword [esp + ebx*4 + 0x140]
mov edx, edi
mov ecx, dword [eax + 0x48]
mov ax, word [esp + esi*2 + 0x68]
mov word [ecx + 0x1c], ax
call fcn.10059d30
mov eax, dword [esp + ebx*4 + 0x140]
mov dword [eax + 4], edi
mov edi, dword [esp + 0x20]
inc ebx
mov dword [esp + 0x28], ebx
cmp ebx, edi
jl 0x1006c0c5
test byte [esp + 0x48], 8
mov eax, dword [esp + edi*4 + 0x13c]
mov ecx, dword [esp + 0x4c]
mov eax, dword [eax + 4]
bswap eax
mov dword [ecx], eax
jne 0x1006c1b9
mov ecx, dword [esp + 0x44]
cmp ecx, edi
je 0x1006c1b9
lea edx, [esp + 0x134]
lea eax, [esp + 0x140]
cmovge eax, edx
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [esp + edi*4 + 0x13c]
mov ecx, dword [eax + 0x38]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x38]
cmp byte [eax + 0x11], 0
je 0x1006c3f4
mov edi, dword [esp + 0x140]
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], esi
movzx edx, word [edi + 0x18]
movzx eax, byte [edi + 0xc]
add edx, eax
mov dword [esp + 0x30], edx
cmp dword [esp + 0xc0], ebx
jle 0x1006c3fb
mov eax, edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], eax
nop dword [eax]
nop word [eax + eax]
mov ecx, dword [esp + 0xc8]
mov ecx, dword [ecx + esi*4]
mov dword [esp + 0x2c], ecx
cmp esi, edx
jne 0x1006c292
xor eax, eax
cmp byte [esp + 0x13], al
sete al
mov dword [esp + 0x68], eax
nop
inc ebx
cmp ebx, dword [esp + 0x20]
jge 0x1006c26b
mov edi, dword [esp + ebx*4 + 0x140]
jmp 0x1006c272
push 0x101d02b4
push 0x11a82
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10053700
add esp, 0x14
mov dword [esp + 0x14], 0xb
jmp 0x1006c794
mov edi, dword [esp + ebx*4 + 0x134]
movzx eax, word [edi + 0x18]
add eax, dword [esp + 0x68]
movzx ecx, byte [edi + 0xc]
add ecx, eax
add edx, ecx
cmp esi, edx
je 0x1006c230
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x28]
cmp esi, dword [esp + edx + 0x94]
mov edx, dword [esp + 0x30]
jne 0x1006c2c9
mov eax, dword [esp + 0x4c]
inc eax
mov dword [esp + 0x4c], eax
shl eax, 2
cmp byte [esp + 0x13], 0
mov dword [esp + 0x28], eax
mov eax, dword [esp + eax + 0x140]
mov dword [esp + 0x18], eax
je 0x1006c3e2
cmp ebx, dword [esp + 0x20]
jge 0x1006c2ed
mov eax, dword [eax + 4]
cmp eax, dword [esp + ebx*4 + 0x118]
mov eax, dword [esp + 0x18]
jne 0x1006c2ed
cmp ecx, dword [edi + 0x38]
jb 0x1006c2ed
cmp ecx, dword [edi + 0x3c]
jb 0x1006c3e2
cmp word [esp + 0x5c], 0
jne 0x1006c317
lea edx, [esp + 0x24]
push edx
push dword [eax + 4]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x40]
push 5
bswap edx
call fcn.10064180
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xcc]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x1006c338
mov edx, esi
lea ecx, [esp + 0xc0]
call fcn.1006a5d0
movzx eax, ax
mov ecx, dword [esp + 0x18]
cmp ax, word [ecx + 0x10]
jbe 0x1006c3c9
cmp dword [esp + 0x14], 0
jne 0x1006c794
mov esi, dword [ecx + 0x50]
lea eax, [esp + 0x100]
push eax
push dword [esp + 0x30]
push ecx
mov ecx, esi
call dword [0x1019a4f8]
call esi
movzx eax, word [esp + 0x11c]
add esp, 0xc
cmp eax, dword [esp + 0x10c]
jae 0x1006c3d6
mov ecx, dword [edi + 0x3c]
mov edx, dword [esp + 0x2c]
cmp ecx, edx
jb 0x1006c394
add eax, edx
cmp ecx, eax
jb 0x1006c46a
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
movzx eax, word [esp + 0x116]
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
mov edx, dword [eax + edx - 4]
push 3
bswap edx
call fcn.10064180
mov eax, dword [esp + 0x30]
add esp, 0xc
mov esi, dword [esp + 0x50]
mov dword [esp + 0x14], eax
jmp 0x1006c3cd
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1006c3da
jmp 0x1006c794
mov esi, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
inc esi
mov dword [esp + 0x50], esi
cmp esi, dword [esp + 0xc0]
jl 0x1006c210
mov edi, dword [esp + 0x140]
mov eax, dword [esp + 0x20]
xor ebx, ebx
dec eax
test eax, eax
jle 0x1006c5a0
nop word [eax + eax]
mov eax, dword [esp + ebx*4 + 0x94]
mov edx, dword [esp + 0xc8]
mov edi, dword [edx + eax*4]
lea edx, [edx + eax*4]
mov ecx, dword [esp + ebx*4 + 0x140]
mov esi, dword [esp + 0x74]
add esi, dword [esp + 0x78]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0xcc]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x4c], esi
movzx eax, word [edx + eax*2]
movzx edx, cx
mov ecx, dword [esp + 0x30]
add edx, eax
cmp byte [ecx + 8], 0
jne 0x1006c495
mov ecx, dword [ecx + 0x38]
mov eax, dword [edi]
mov dword [ecx + 8], eax
jmp 0x1006c555
push 0x101d02b4
push 0x100bc
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10053700
add esp, 0x14
mov dword [esp + 0x14], 0xb
jmp 0x1006c794
cmp byte [esp + 0x13], 0
je 0x1006c530
mov esi, dword [ecx + 0x50]
lea eax, [esp + 0x118]
push eax
mov eax, dword [esp + 0x6c]
push dword [eax - 4]
push ecx
mov ecx, esi
call dword [0x1019a4f8]
call esi
mov eax, dword [esp + 0x58]
add esp, 0xc
mov edx, dword [esp + 0x11c]
mov edi, eax
mov ecx, dword [esp + 0x118]
lea esi, [eax + 4]
test edx, edx
ja 0x1006c51d
jb 0x1006c4e2
cmp ecx, 0x7f
ja 0x1006c4f3
mov eax, 1
and cl, 0x7f
mov byte [esi], cl
xor esi, esi
lea edx, [eax + 4]
jmp 0x1006c555
test edx, edx
ja 0x1006c51d
jb 0x1006c501
cmp ecx, 0x3fff
ja 0x1006c51d
mov eax, ecx
and cl, 0x7f
shrd eax, edx, 7
mov byte [esi + 1], cl
or al, 0x80
mov byte [esi], al
mov eax, 2
xor esi, esi
lea edx, [eax + 4]
jmp 0x1006c555
push edx
push ecx
mov ecx, esi
call fcn.10054ee0
add esp, 8
xor esi, esi
lea edx, [eax + 4]
jmp 0x1006c555
sub edi, 4
cmp eax, 4
jne 0x1006c559
mov eax, dword [esp + 0x34]
push edi
push eax
mov esi, dword [eax + 0x4c]
mov ecx, esi
call dword [0x1019a4f8]
call esi
mov esi, dword [esp + 0x54]
add esp, 8
movzx edx, ax
mov ecx, dword [esp + 0x30]
add dword [esp + 0x74], edx
lea eax, [esp + 0x24]
push eax
push dword [ecx + 4]
mov ecx, dword [esp + 0x3c]
push esi
push edx
mov edx, dword [esp + 0x64]
push edi
lea edx, [edx + ebx]
call fcn.1006a380
mov edi, dword [esp + 0x38]
add esp, 0x14
mov dword [esp + 0x14], edi
test edi, edi
jne 0x1006c794
mov eax, dword [esp + 0x20]
inc ebx
dec eax
cmp ebx, eax
jl 0x1006c410
mov edi, dword [esp + 0x140]
mov esi, 1
sub esi, dword [esp + 0x20]
mov dword [esp + 0x4c], esi
cmp esi, dword [esp + 0x20]
jge 0x1006c69e
nop word [eax + eax]
mov eax, esi
lea ebx, [esp + 0x154]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
add ebx, ecx
cmp byte [ebx], 0
jne 0x1006c688
test esi, esi
jns 0x1006c5f3
mov eax, dword [esp + ecx*4 + 0xa8]
cmp eax, dword [esp + ecx*4 + 0x90]
jl 0x1006c688
test ecx, ecx
jne 0x1006c604
mov esi, dword [esp + 0x94]
xor edx, edx
xor eax, eax
jmp 0x1006c63c
cmp ecx, dword [esp + 0x44]
jge 0x1006c61c
xor edx, edx
cmp byte [esp + 0x13], dl
sete dl
add edx, dword [esp + ecx*4 + 0xa8]
jmp 0x1006c623
mov edx, dword [esp + 0xc0]
mov esi, dword [esp + ecx*4 + 0x94]
xor eax, eax
cmp byte [esp + 0x13], al
sete al
add eax, dword [esp + ecx*4 + 0x90]
sub esi, eax
lea edi, [ecx*4]
lea ecx, [esp + 0xc0]
push ecx
mov ecx, dword [esp + edi + 0x144]
push esi
push eax
call fcn.1006ad50
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
test eax, eax
jne 0x1006c794
mov eax, dword [esp + edi + 0x140]
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + edi + 0x80]
mov esi, dword [esp + 0x4c]
mov byte [ebx], 1
mov dword [eax + 0x14], ecx
inc esi
mov dword [esp + 0x4c], esi
cmp esi, dword [esp + 0x20]
jl 0x1006c5c0
mov edi, dword [esp + 0x140]
cmp dword [ebp + 0xc], 0
je 0x1006c705
mov ebx, dword [esp + 0x34]
cmp word [ebx + 0x18], 0
jne 0x1006c705
movzx eax, byte [ebx + 9]
cmp eax, dword [edi + 0x14]
jg 0x1006c705
or edx, 0xffffffff
mov ecx, edi
call fcn.10064790
mov ecx, dword [esp + 0x140]
mov edx, ebx
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
call fcn.1006b240
mov eax, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1006c75f
mov ecx, dword [esp + 0x140]
mov edx, ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
call fcn.10069b10
add esp, 4
mov dword [esp + 0x14], eax
jmp 0x1006c75f
mov ecx, dword [esp + 0x38]
cmp byte [ecx + 0x11], 0
je 0x1006c75b
cmp word [esp + 0x5c], 0
mov edi, dword [esp + 0x20]
jne 0x1006c755
xor esi, esi
test edi, edi
jle 0x1006c755
mov eax, dword [esp + esi*4 + 0x140]
lea edx, [esp + 0x24]
push edx
push dword [eax + 4]
mov eax, dword [eax + 0x38]
push 5
mov edx, dword [eax + 8]
bswap edx
call fcn.10064180
mov ecx, dword [esp + 0x44]
inc esi
add esp, 0xc
cmp esi, edi
jl 0x1006c721
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
jmp 0x1006c763
mov eax, dword [esp + 0x14]
jmp 0x1006c763
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x44]
mov esi, edi
cmp edi, ebx
jge 0x1006c794
nop dword [eax]
mov ecx, dword [esp + esi*4 + 0x134]
test eax, eax
jne 0x1006c78b
push dword [ecx + 4]
mov edx, ecx
mov ecx, dword [ecx + 0x34]
call fcn.10069b10
add esp, 4
inc esi
cmp esi, ebx
jl 0x1006c770
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc8]
test eax, eax
je 0x1006b5f9
push eax
call fcn.10050ca0
add esp, 4
jmp 0x1006b5f9
mov ecx, edx
call fcn.10059aa0
inc ebx
cmp ebx, dword [esp + 0x44]
jl 0x1006b610
xor ebx, ebx
cmp dword [esp + 0x20], ebx
jle 0x1006c839
nop dword [eax + eax]
mov edx, dword [esp + ebx*4 + 0x140]
test edx, edx
je 0x1006c832
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1006c82b
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.1015d970
push edx
push eax
push esi
mov esi, dword [edi + 0x48]
mov ecx, esi
call dword [0x1019a4f8]
call esi
add esp, 0x10
jmp 0x1006c832
mov ecx, edx
call fcn.10059aa0
inc ebx
cmp ebx, dword [esp + 0x20]
jl 0x1006c7d0
mov ecx, dword [esp + 0x15c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1015c7a5
mov esp, ebp
pop ebp
ret