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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [esp + 0x94]
push edi
xor edi, edi
mov dword [esp + 0x4c], edx
push 0x40
mov ebx, ecx
mov dword [esp + 0x74], esi
push edi
push eax
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x158], edi
mov byte [esp + 0x15c], 0
call fcn.1012a970
mov eax, dword [ebx + 0x34]
add esp, 0xc
mov dword [esp + 0x38], eax
test esi, esi
jne 0x1003c1c5
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.10129081
mov esp, ebp
pop ebp
ret
movzx edx, word [ebx + 0x18]
movzx ecx, byte [ebx + 0xc]
lea esi, [ecx + edx]
cmp esi, 2
jae 0x1003c1db
mov dword [esp + 0x50], edi
jmp 0x1003c20a
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x1003c1e9
mov dword [esp + 0x50], edi
jmp 0x1003c200
cmp eax, esi
jne 0x1003c1fb
mov eax, dword [ebp + 0x10]
add esi, 0xfffffffe
add esi, eax
mov dword [esp + 0x50], esi
jmp 0x1003c203
dec eax
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0x10]
mov esi, 2
sub esi, eax
lea eax, [esi + 1]
mov dword [esp + 0x68], esi
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x50]
sub eax, ecx
lea ecx, [eax + esi]
cmp ecx, edx
jne 0x1003c22b
movzx ecx, byte [ebx + 9]
add ecx, 8
jmp 0x1003c23f
mov eax, dword [ebx + 0x40]
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [ebx + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [ebx + 0x38]
mov dword [esp + 0x58], ecx
mov eax, dword [ecx]
bswap eax
mov dword [esp + 0x34], eax
mov ebx, eax
mov dword [esp + 0x6c], eax
test edi, edi
jne 0x1003c337
mov eax, dword [esp + 0x38]
cmp ebx, dword [eax + 0x30]
jbe 0x1003c28d
push 0x10156d84
push 0x1142d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
jmp 0x1003c323
mov eax, dword [eax]
lea ecx, [esp + 0x2c]
push 0
push ecx
push ebx
push eax
mov eax, dword [eax + 0xdc]
call eax
mov edi, eax
add esp, 0x10
mov dword [esp + 0x14], edi
test edi, edi
jne 0x1003c327
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 8]
mov dword [esp + esi*4 + 0xdc], eax
cmp byte [eax], 0
jne 0x1003c321
mov ecx, dword [edx + 8]
cmp ebx, dword [ecx + 4]
je 0x1003c2e8
mov eax, dword [edx + 4]
cmp ebx, 1
mov dword [ecx + 0x38], eax
mov eax, dword [esp + 0x38]
mov dword [ecx + 0x34], eax
setne al
dec al
mov dword [ecx + 0x48], edx
and al, 0x64
mov dword [ecx + 4], ebx
mov byte [ecx + 9], al
mov ecx, dword [esp + esi*4 + 0xdc]
call fcn.10035af0
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
je 0x1003c321
mov ecx, dword [esp + esi*4 + 0xdc]
test ecx, ecx
je 0x1003c327
mov ecx, dword [ecx + 0x48]
call fcn.1002fa10
mov ebx, 4
mov dword [esp + 0x20], edi
mov eax, esi
imul ebx, eax
jmp 0x1003c33e
xor edi, edi
mov dword [esp + 0x14], edi
mov ebx, 4
mov dword [esp + 0x20], edi
mov eax, esi
imul ebx, eax
jmp 0x1003c33e
lea ebx, [esi*4]
test edi, edi
jne 0x1003d5e8
lea eax, [esp + 0xdc]
add eax, ebx
mov dword [esp + 0x3c], eax
mov ecx, dword [eax]
cmp dword [ecx + 0x14], edi
jge 0x1003c375
call fcn.100358c0
mov edi, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], edi
test edi, edi
jne 0x1003c4a8
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax]
mov eax, dword [esp + 0x1c]
add eax, 4
movzx ecx, word [ecx + 0x18]
add eax, ecx
mov ecx, esi
dec esi
mov dword [esp + 0x1c], eax
test ecx, ecx
je 0x1003c4c2
mov ebx, dword [esp + 0x40]
mov dl, byte [ebx + 0xc]
test dl, dl
je 0x1003c3e4
mov eax, dword [esp + 0x50]
movzx ecx, word [ebx + 0x1c]
add eax, esi
cmp eax, ecx
jne 0x1003c3e4
mov eax, dword [ebx + 0x24]
push eax
mov dword [esp + esi*4 + 0x7c], eax
mov ebx, dword [eax]
mov eax, dword [esp + 0x44]
bswap ebx
push eax
mov dword [esp + 0x3c], ebx
mov eax, dword [eax + 0x4c]
mov dword [esp + 0x74], ebx
call eax
movzx eax, ax
add esp, 8
mov dword [esp + esi*4 + 0xfc], eax
mov eax, dword [esp + 0x40]
mov byte [eax + 0xc], 0
jmp 0x1003c254
mov ecx, dword [esp + 0x50]
movzx eax, dl
sub ecx, eax
mov eax, dword [ebx + 0x40]
add ecx, esi
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [ebx + 0x1a]
movzx edi, cx
and edi, eax
add edi, dword [ebx + 0x38]
push edi
mov dword [esp + esi*4 + 0x7c], edi
mov eax, dword [edi]
bswap eax
mov dword [esp + 0x38], eax
mov ebx, eax
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x44]
push eax
mov eax, dword [eax + 0x4c]
call eax
movzx edx, ax
add esp, 8
mov eax, dword [esp + 0x38]
mov dword [esp + 0x30], edx
mov dword [esp + esi*4 + 0xfc], edx
test byte [eax + 0x18], 0xc
je 0x1003c47b
mov eax, dword [esp + 0x40]
mov ecx, edi
sub ecx, dword [eax + 0x38]
lea eax, [edx + ecx]
mov edx, dword [esp + 0x38]
cmp eax, dword [edx + 0x28]
mov edx, dword [esp + 0x30]
jg 0x1003c47b
mov eax, dword [esp + 0x70]
push edx
add eax, ecx
push edi
push eax
call fcn.1012be10
mov eax, dword [esp + 0x4c]
add esp, 0xc
mov edx, dword [esp + 0x30]
sub edi, dword [eax + 0x38]
add edi, dword [esp + 0x70]
mov dword [esp + esi*4 + 0x78], edi
mov edi, dword [esp + 0x40]
lea eax, [esp + 0x20]
push eax
push edx
mov edx, dword [esp + 0x58]
mov ecx, edi
movzx eax, byte [edi + 0xc]
sub edx, eax
add edx, esi
call fcn.1003b2b0
mov edi, dword [esp + 0x28]
add esp, 8
mov dword [esp + 0x14], edi
jmp 0x1003c254
push ebx
lea eax, [esp + 0xe0]
push 0
push eax
call fcn.1012a970
add esp, 0xc
xor ebx, ebx
jmp 0x1003d5f9
lea esi, [eax + 3]
mov eax, dword [esp + 0x38]
and esi, 0xfffffffc
mov eax, dword [eax + 0x24]
lea ecx, [esi + esi*2]
lea eax, [eax + ecx*2]
cdq
push edx
push eax
call fcn.1001e110
mov ebx, eax
add esp, 8
mov dword [esp + 0xa0], ebx
test ebx, ebx
jne 0x1003c4f5
lea edi, [eax + 7]
jmp 0x1003d5f9
mov ecx, dword [esp + 0xdc]
lea eax, [ebx + esi*4]
mov dword [esp + 0xa4], eax
lea eax, [eax + esi*2]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x9c], ecx
movzx eax, byte [ecx + 8]
shl ax, 2
movzx eax, ax
mov dword [esp + 0x64], eax
mov al, byte [ecx + 2]
mov byte [esp + 0xf], al
movzx eax, al
mov dword [esp + 0x60], eax
xor eax, eax
mov dword [esp + 0x30], eax
cmp dword [esp + 0x44], eax
jle 0x1003c762
mov ebx, dword [esp + 0x98]
nop dword [eax + eax]
shl eax, 2
mov dword [esp + 0x48], eax
mov edi, dword [esp + eax + 0xdc]
mov dword [esp + 0x28], edi
movzx eax, word [edi + 0x18]
mov edx, dword [edi + 0x38]
movzx esi, word [edi + 0x12]
mov dword [esp + 0x1c], eax
add esi, edx
movzx eax, word [edi + 0x1a]
mov ecx, eax
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x54], edx
mov dword [esp + 0x24], esi
mov ecx, dword [eax + 0x38]
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x1003c9c6
movzx eax, byte [edi + 0xc]
add eax, dword [esp + 0x1c]
add eax, eax
push eax
mov eax, dword [esp + 0xa8]
push 0
lea eax, [eax + ebx*2]
push eax
call fcn.1012a970
add esp, 0xc
cmp byte [edi + 0xc], 0
jbe 0x1003c645
movzx edx, word [edi + 0x1c]
cmp dword [esp + 0x1c], edx
jb 0x1003c99c
test edx, edx
je 0x1003c617
mov edi, dword [esp + 0x54]
nop dword [eax]
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x2c]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0xa0]
add ecx, edi
mov dword [eax + ebx*4], ecx
inc ebx
sub edx, 1
jne 0x1003c5e0
mov edi, dword [esp + 0x28]
mov dword [esp + 0x98], ebx
mov dword [esp + 0x24], esi
xor edx, edx
cmp byte [edi + 0xc], dl
jbe 0x1003c645
mov esi, dword [esp + 0xa0]
lea ecx, [edi + 0x24]
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 0x1003c628
mov esi, dword [esp + 0x24]
mov dword [esp + 0x98], ebx
movzx eax, word [edi + 0x12]
mov edx, dword [esp + 0x54]
add eax, edx
movzx ecx, word [edi + 0x18]
lea eax, [eax + ecx*2]
mov dword [esp + 0x2c], eax
cmp esi, eax
jae 0x1003c692
mov edi, eax
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x74]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0xa0]
add ecx, edx
mov dword [eax + ebx*4], ecx
inc ebx
cmp esi, edi
jb 0x1003c660
mov edi, dword [esp + 0x28]
mov dword [esp + 0x98], ebx
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x30]
mov dword [esp + ecx + 0x124], ebx
cmp eax, dword [esp + 0x68]
jge 0x1003c753
cmp byte [esp + 0xf], 0
jne 0x1003c753
movzx eax, word [esp + ecx + 0xfc]
mov ecx, dword [esp + 0xa4]
mov esi, dword [esp + 0x3c]
push eax
mov word [ecx + ebx*2], ax
mov ecx, dword [esp + 0x14]
add esi, ecx
add ecx, eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x14], ecx
push dword [esp + eax + 0x7c]
push esi
call fcn.1012be10
mov ecx, dword [esp + 0x70]
add esp, 0xc
mov edx, dword [esp + 0xa4]
movzx eax, cx
add eax, esi
mov esi, dword [esp + 0xa0]
mov dword [esi + ebx*4], eax
mov ax, word [edx + ebx*2]
sub ax, cx
mov word [edx + ebx*2], ax
cmp byte [edi + 8], 0
movzx ecx, ax
jne 0x1003c726
mov eax, dword [edi + 0x38]
mov ecx, dword [esi + ebx*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x1003c747
cmp ecx, 4
jae 0x1003c747
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
mov byte [ecx + eax], 0
inc eax
inc word [edx + ebx*2]
cmp word [edx + ebx*2], 4
jb 0x1003c733
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
inc ebx
mov dword [esp + 0x98], ebx
inc eax
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x44]
jl 0x1003c550
mov eax, dword [esp + 0x64]
xor ecx, ecx
movzx esi, ax
xor ebx, ebx
mov eax, dword [esp + 0x38]
add esi, 0xfffffff4
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ebx
add esi, dword [eax + 0x28]
mov dword [esp + 0x54], esi
cmp dword [esp + 0x44], ecx
jle 0x1003c869
nop dword [eax]
mov esi, dword [esp + ebx*4 + 0xdc]
mov edx, dword [esp + ebx*4 + 0x124]
mov dword [esp + 0x74], edx
mov eax, dword [esi + 0x3c]
mov dword [esp + ecx*4 + 0xa8], eax
mov dword [esp + ecx*4 + 0xc0], edx
test ecx, ecx
je 0x1003c7c5
cmp edx, dword [esp + ecx*4 + 0xbc]
jne 0x1003c7c5
dec ecx
mov dword [esp + 0x10], ecx
cmp byte [esp + 0xf], 0
jne 0x1003c7e9
mov eax, dword [esp + 0x40]
inc ecx
mov dword [esp + 0x10], ecx
mov eax, dword [eax + 0x3c]
mov dword [esp + ecx*4 + 0xa8], eax
lea eax, [edx + 1]
mov dword [esp + ecx*4 + 0xc0], eax
mov edi, dword [esp + 0x54]
lea eax, [esp + 0xfc]
sub edi, dword [esi + 0x14]
lea eax, [eax + ebx*4]
cmp byte [esi + 0xc], 0
mov dword [esp + 0x68], eax
mov dword [eax], edi
mov dword [esp + 0x3c], 0
jbe 0x1003c84a
lea ebx, [esi + 0x24]
push dword [ebx]
mov eax, dword [esi + 0x4c]
push esi
call eax
mov ecx, dword [esp + 0x44]
lea ebx, [ebx + 4]
movzx eax, ax
inc ecx
add eax, 2
mov dword [esp + 0x44], ecx
add edi, eax
add esp, 8
movzx eax, byte [esi + 0xc]
cmp ecx, eax
jl 0x1003c811
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x74]
mov ebx, dword [esp + 0x1c]
mov dword [eax], edi
mov dword [esp + ebx*4 + 0x110], edx
inc ecx
inc ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ebx
cmp ebx, dword [esp + 0x44]
jl 0x1003c790
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x110]
mov ebx, dword [esp + 0x98]
sub edx, 4
mov dword [esp + 0x1c], 0
mov eax, ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x48], edx
test ecx, ecx
jle 0x1003cb69
xor edx, edx
mov dword [esp + 0x30], 1
mov dword [esp + 0x10], edx
nop word [eax + eax]
lea eax, [esp + 0xfc]
add eax, edx
mov dword [esp + 0x2c], eax
mov edi, dword [eax]
cmp edi, esi
jle 0x1003ca19
mov esi, dword [esp + 0x98]
lea ecx, [esp + 0x100]
add ecx, edx
nop word [eax + eax]
mov ebx, dword [esp + 0x30]
lea eax, [esp + 0xfc]
lea eax, [eax + edx]
mov dword [esp + 0x3c], ecx
cmp ebx, dword [esp + 0x28]
jl 0x1003c915
inc ebx
mov dword [esp + 0x28], ebx
cmp ebx, 5
jg 0x1003cb0f
mov dword [ecx], 0
mov edi, dword [eax]
mov dword [esp + edx + 0x114], esi
lea eax, [esp + 0x110]
add eax, edx
mov dword [esp + 0x24], eax
mov ebx, dword [eax]
mov eax, dword [esp + 0xa4]
lea edx, [ebx - 1]
movzx eax, word [eax + edx*2]
mov dword [esp + 0x68], edx
test ax, ax
jne 0x1003c94e
lea ecx, [esp + 0x98]
call fcn.1003b710
mov ecx, dword [esp + 0x3c]
movzx eax, ax
mov edx, dword [esp + 0x2c]
movzx eax, ax
add eax, 2
sub edi, eax
cmp byte [esp + 0xf], 0
mov dword [edx], edi
jne 0x1003c9f2
cmp ebx, esi
jge 0x1003c9f0
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + ebx*2]
test ax, ax
jne 0x1003c990
mov edx, ebx
lea ecx, [esp + 0x98]
call fcn.1003b710
movzx eax, ax
mov ecx, dword [esp + 0x3c]
movzx eax, ax
add eax, 2
jmp 0x1003c9f2
push 0x10156d84
push 0x12ada
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
xor ebx, ebx
jmp 0x1003d5f9
push 0x10156d84
push 0x12ac2
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
xor ebx, ebx
jmp 0x1003d5f9
xor eax, eax
mov edx, dword [esp + 0x24]
add dword [ecx], eax
mov eax, dword [esp + 0x68]
mov dword [edx], eax
mov edx, dword [esp + 0x10]
cmp edi, dword [esp + 0x54]
jg 0x1003c8e0
mov ebx, dword [esp + 0x98]
mov ecx, dword [esp + 0x24]
jmp 0x1003ca26
lea ecx, [esp + 0x110]
add ecx, edx
mov dword [esp + 0x24], ecx
mov esi, dword [ecx]
cmp esi, ebx
jge 0x1003cac3
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x1003ca55
mov edx, esi
lea ecx, [esp + 0x98]
call fcn.1003b710
mov ecx, dword [esp + 0x24]
movzx eax, ax
movzx eax, ax
add eax, 2
add edi, eax
cmp edi, dword [esp + 0x54]
jg 0x1003cabb
mov edx, dword [esp + 0x2c]
inc esi
cmp byte [esp + 0xf], 0
mov dword [ecx], esi
mov dword [edx], edi
jne 0x1003caa6
cmp esi, ebx
jge 0x1003caa4
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x1003ca9c
mov edx, esi
lea ecx, [esp + 0x98]
call fcn.1003b710
mov ecx, dword [esp + 0x24]
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x1003caa6
xor eax, eax
mov edx, dword [esp + 0x10]
sub dword [esp + edx + 0x100], eax
cmp esi, ebx
jl 0x1003ca30
jmp 0x1003cabf
mov edx, dword [esp + 0x10]
cmp esi, ebx
jl 0x1003cacf
mov ecx, dword [esp + 0x30]
mov eax, ecx
mov dword [esp + 0x28], eax
jmp 0x1003caed
cmp dword [esp + 0x1c], 0
jle 0x1003cadf
mov eax, dword [esp + 0x48]
mov eax, dword [edx + eax]
jmp 0x1003cae1
xor eax, eax
cmp esi, eax
jle 0x1003cb3f
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x1c]
add edx, 4
inc esi
mov dword [esp + 0x10], edx
inc ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x30], ecx
cmp esi, eax
jge 0x1003cb39
mov esi, dword [esp + 0x54]
jmp 0x1003c8b0
push 0x10156d84
push 0x12b3f
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
xor ebx, ebx
jmp 0x1003d5f9
mov edx, dword [esp + 0x48]
jmp 0x1003cb6d
push 0x10156d84
push 0x12b60
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
xor ebx, ebx
jmp 0x1003d5f9
mov dword [esp + 0x48], edx
dec eax
mov ecx, eax
mov dword [esp + 0x24], eax
test ecx, ecx
jle 0x1003ccb3
nop dword [eax]
shl ecx, 2
mov dword [esp + 0x30], ecx
mov esi, dword [ecx + edx]
mov eax, dword [esp + ecx + 0xf8]
dec esi
mov edi, dword [esp + ecx + 0xfc]
mov edx, esi
sub edx, dword [esp + 0x60]
mov dword [esp + 0x10], eax
inc edx
mov eax, dword [esp + 0xa4]
cmp word [eax + edx*2], 0
lea eax, [eax + edx*2]
mov dword [esp + 0x1c], eax
jne 0x1003cbc5
lea ecx, [esp + 0x98]
call fcn.1003b710
mov ebx, dword [esp + 0x1c]
nop dword [eax]
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x1003cbf1
mov edx, esi
lea ecx, [esp + 0x98]
call fcn.1003b710
movzx eax, ax
movzx edx, word [ebx]
movzx eax, ax
mov dword [esp + 0x2c], eax
test edi, edi
je 0x1003cc32
cmp dword [ebp + 0x10], 0
jne 0x1003cc65
mov ecx, dword [esp + 0x28]
add edx, edi
mov ebx, dword [esp + 0x1c]
dec ecx
cmp dword [esp + 0x24], ecx
mov eax, 2
mov ecx, 0
cmove eax, ecx
mov ecx, dword [esp + 0x10]
sub ecx, eax
lea eax, [edx + 2]
sub ecx, dword [esp + 0x2c]
cmp eax, ecx
jg 0x1003cc65
mov ecx, dword [esp + 0x10]
lea edi, [edx + 2]
mov edx, dword [esp + 0x30]
mov eax, 0xfffffffe
sub eax, dword [esp + 0x2c]
sub ebx, 2
add ecx, eax
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], ecx
mov dword [edx + eax], esi
sub esi, 1
jns 0x1003cbd0
jmp 0x1003cc71
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x98]
mov dword [esp + edx + 0xf8], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + edx + 0xfc], edi
cmp ecx, 1
jbe 0x1003cc95
mov eax, dword [edx + eax - 4]
jmp 0x1003cc97
xor eax, eax
mov esi, dword [esp + 0x48]
cmp dword [edx + esi], eax
jle 0x1003cd1f
dec ecx
mov edx, esi
mov dword [esp + 0x24], ecx
test ecx, ecx
jg 0x1003cb80
mov eax, dword [esp + 0xdc]
xor esi, esi
mov eax, dword [eax + 0x38]
movzx eax, byte [eax]
mov dword [esp + 0x3c], eax
lea eax, [esi + 1]
cmp dword [esp + 0x28], esi
jle 0x1003ce7e
cmp esi, dword [esp + 0x44]
jge 0x1003cdb4
mov eax, dword [esp + esi*4 + 0xdc]
mov dword [esp + esi*4 + 0xe8], eax
mov dword [esp + esi*4 + 0xdc], 0
mov dword [esp + 0x60], eax
mov ecx, dword [eax + 0x48]
mov dword [esp + 0x2c], eax
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x1003cd4d
mov eax, dword [edx + 0x1c]
cmp eax, dword [ecx + 0x18]
jb 0x1003cd4d
cmp dword [edx + 0x68], 0
je 0x1003cd49
call fcn.1002e3e0
jmp 0x1003cd72
push 0x10156d84
push 0x12b8c
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
xor ebx, ebx
jmp 0x1003d5f9
xor edi, edi
jmp 0x1003cd74
mov edi, dword [edx + 0x2c]
mov dword [esp + 0x14], edi
test edi, edi
jne 0x1003cd78
mov eax, dword [edx + 0x9c]
cmp eax, dword [edx + 0xa8]
jbe 0x1003cd6d
call fcn.1002ffb0
jmp 0x1003cd72
call fcn.1002ff20
mov edi, eax
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x4c]
xor ecx, ecx
sub eax, dword [esp + 0x50]
inc dword [esp + 0x18]
cmp esi, eax
mov eax, dword [esp + 0x60]
sete cl
mov dword [esp + 0x20], edi
inc ecx
mov eax, dword [eax + 0x48]
movsx eax, word [eax + 0x1e]
cmp eax, ecx
je 0x1003cda7
test edi, edi
je 0x1003ce56
test edi, edi
jne 0x1003d5f5
jmp 0x1003ce45
cmp dword [ebp + 0x10], 0
lea edx, [esp + 0x2c]
mov ecx, dword [esp + 0x34]
cmovne ecx, eax
lea eax, [esp + 0x6c]
push 0
push ecx
mov ecx, dword [esp + 0x40]
push eax
call fcn.1003a1e0
mov edi, eax
add esp, 0xc
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], edi
test edi, edi
jne 0x1003d5f5
mov edi, dword [esp + 0x2c]
mov ecx, edi
mov edx, dword [esp + 0x3c]
call fcn.10035c00
mov ecx, dword [esp + 0x38]
inc dword [esp + 0x18]
mov dword [esp + esi*4 + 0xe8], edi
mov dword [esp + esi*4 + 0x124], ebx
cmp byte [ecx + 0x11], 0
je 0x1003ce3d
mov edx, dword [edi + 4]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x44]
push dword [eax + 4]
push 5
call fcn.100346f0
mov edi, dword [esp + 0x2c]
add esp, 0xc
mov dword [esp + 0x14], edi
test edi, edi
jne 0x1003d5f5
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x34], eax
inc esi
cmp esi, dword [esp + 0x28]
jge 0x1003ce7e
mov eax, 1
jmp 0x1003ccd3
push 0x10156d84
push 0x12bad
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
jmp 0x1003d5f5
mov edx, dword [esp + 0x18]
xor ecx, ecx
test edx, edx
jle 0x1003cea6
nop dword [eax + eax]
mov eax, dword [esp + ecx*4 + 0xe8]
mov eax, dword [eax + 4]
mov dword [esp + ecx*4 + 0x138], eax
inc ecx
cmp ecx, edx
jl 0x1003ce90
lea eax, [edx - 1]
xor edi, edi
mov dword [esp + 0x34], edi
test eax, eax
jle 0x1003cfab
lea eax, [edi + 1]
mov ebx, edi
mov dword [esp + 0x2c], eax
mov esi, eax
cmp eax, edx
jge 0x1003cf9a
mov edi, dword [esp + 0x18]
nop
mov eax, dword [esp + esi*4 + 0xe8]
mov ecx, esi
mov edx, dword [esp + ebx*4 + 0xe8]
mov eax, dword [eax + 4]
cmp eax, dword [edx + 4]
cmovae ecx, ebx
inc esi
mov ebx, ecx
cmp esi, edi
jl 0x1003ced0
mov edi, dword [esp + 0x34]
mov dword [esp + 0x4c], ebx
cmp ebx, edi
je 0x1003cf92
mov ecx, dword [esp + edi*4 + 0xe8]
xor edx, edx
mov esi, dword [esp + 0x38]
mov edi, dword [esp + ebx*4 + 0xe8]
mov eax, dword [ecx + 4]
mov dword [esp + 0x60], eax
mov eax, dword [0x10167ac0]
div dword [esi + 0x24]
mov ecx, dword [ecx + 0x48]
mov ebx, dword [edi + 4]
movzx esi, word [ecx + 0x1c]
lea edx, [eax + 1]
mov eax, dword [edi + 0x48]
movzx edi, word [eax + 0x1c]
mov word [ecx + 0x1c], di
call fcn.1002a010
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + ecx*4 + 0xe8]
mov ecx, dword [eax + 0x48]
mov word [ecx + 0x1c], si
mov esi, dword [esp + 0x60]
mov edx, esi
call fcn.1002a010
mov ecx, dword [esp + 0x34]
mov edx, ebx
mov eax, dword [esp + ecx*4 + 0xe8]
mov ecx, dword [eax + 0x48]
mov word [ecx + 0x1c], di
call fcn.1002a010
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + ecx*4 + 0xe8]
mov dword [eax + 4], ebx
mov eax, dword [esp + 0x4c]
mov eax, dword [esp + eax*4 + 0xe8]
mov dword [eax + 4], esi
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
mov edi, eax
lea eax, [edx - 1]
mov dword [esp + 0x34], edi
cmp edi, eax
jl 0x1003ceb7
test byte [esp + 0x3c], 8
mov eax, dword [esp + edx*4 + 0xe4]
mov ecx, dword [esp + 0x58]
mov eax, dword [eax + 4]
bswap eax
mov dword [ecx], eax
jne 0x1003cff8
mov ecx, dword [esp + 0x44]
cmp ecx, edx
je 0x1003cff8
lea eax, [esp + 0xe8]
lea esi, [esp + 0xdc]
cmovge eax, esi
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [esp + 0x18]
mov eax, dword [esp + eax*4 + 0xe4]
mov ecx, dword [eax + 0x38]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x98]
cmp byte [eax + 0x11], 0
je 0x1003d1fe
mov edi, dword [esp + 0xe8]
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 0x58], 0
mov dword [esp + 0x24], ecx
movzx edx, word [edi + 0x18]
movzx eax, byte [edi + 0xc]
add edx, eax
mov dword [esp + 0x1c], edx
test esi, esi
jle 0x1003d1fe
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0xa0]
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x10], eax
cmp ecx, edx
jne 0x1003d09d
mov esi, dword [esp + 0x18]
xor eax, eax
cmp byte [esp + 0xf], al
sete al
mov dword [esp + 0x60], eax
inc ebx
cmp ebx, esi
jge 0x1003d073
mov edi, dword [esp + ebx*4 + 0xe8]
jmp 0x1003d07a
mov edi, dword [esp + ebx*4 + 0xdc]
movzx eax, word [edi + 0x18]
add eax, dword [esp + 0x60]
movzx ecx, byte [edi + 0xc]
add ecx, eax
add edx, ecx
mov ecx, dword [esp + 0x24]
cmp ecx, edx
je 0x1003d065
mov esi, dword [esp + 0x98]
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x4c]
cmp ecx, dword [esp + eax + 0x110]
jne 0x1003d0d2
mov eax, dword [esp + 0x58]
inc eax
mov dword [esp + 0x58], eax
shl eax, 2
cmp byte [esp + 0xf], 0
mov dword [esp + 0x4c], eax
mov eax, dword [esp + eax + 0xe8]
mov dword [esp + 0x28], eax
je 0x1003d1f1
jmp 0x1003d0d6
mov eax, dword [esp + 0x28]
cmp ebx, dword [esp + 0x18]
jge 0x1003d0fc
mov eax, dword [eax + 4]
cmp eax, dword [esp + ebx*4 + 0x138]
mov eax, dword [esp + 0x10]
jne 0x1003d100
cmp eax, dword [edi + 0x38]
jb 0x1003d100
cmp eax, dword [edi + 0x3c]
jb 0x1003d1f1
jmp 0x1003d100
mov eax, dword [esp + 0x10]
cmp word [esp + 0x64], 0
jne 0x1003d132
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x3c]
push dword [edx + 4]
mov edx, dword [eax]
push 5
bswap edx
call fcn.100346f0
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + ecx*2]
test ax, ax
jne 0x1003d153
mov edx, ecx
lea ecx, [esp + 0x98]
call fcn.1003b710
movzx eax, ax
mov ecx, dword [esp + 0x28]
cmp ax, word [ecx + 0x10]
jbe 0x1003d1dd
cmp dword [esp + 0x14], 0
jne 0x1003d5f1
lea eax, [esp + 0x80]
push eax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [ecx + 0x50]
push ecx
call eax
movzx eax, word [esp + 0x9c]
add esp, 0xc
cmp eax, dword [esp + 0x8c]
jae 0x1003d1e9
mov edx, dword [edi + 0x3c]
mov ecx, dword [esp + 0x10]
cmp edx, ecx
jb 0x1003d1a8
add eax, ecx
cmp edx, eax
jb 0x1003d26b
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x20]
push eax
movzx eax, word [esp + 0x96]
push dword [edx + 4]
mov edx, dword [eax + ecx - 4]
mov eax, dword [esp + 0x30]
push 3
bswap edx
mov ecx, dword [eax + 0x34]
call fcn.100346f0
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov dword [esp + 0x14], eax
jmp 0x1003d1e1
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x1003d5f1
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x24], ecx
cmp ecx, esi
jl 0x1003d042
mov eax, dword [esp + 0x18]
xor ebx, ebx
dec eax
mov dword [esp + 0x4c], ebx
test eax, eax
jle 0x1003d3dd
mov edi, dword [esp + ebx*4 + 0x110]
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + ebx*4 + 0xe8]
mov esi, dword [esp + 0x5c]
add esi, dword [esp + 0x70]
mov ebx, dword [eax + edi*4]
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x64]
movzx edx, cx
mov ecx, dword [esp + 0x58]
movzx eax, word [eax + edi*2]
add edx, eax
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x98]
cmp byte [ecx + 8], 0
jne 0x1003d293
mov ecx, dword [ecx + 0x38]
mov eax, dword [ebx]
mov dword [ecx + 8], eax
jmp 0x1003d35c
push 0x10156d84
push 0x11106
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
jmp 0x1003d5f5
cmp byte [esp + 0xf], 0
je 0x1003d343
lea eax, [esp + 0x80]
dec edi
push eax
mov eax, dword [esp + 0xa4]
push dword [eax + edi*4]
mov eax, dword [ecx + 0x50]
push ecx
call eax
mov edx, dword [esp + 0x90]
add esp, 0xc
mov eax, dword [esp + 0x34]
mov ebx, eax
mov ecx, dword [esp + 0x80]
test edx, edx
ja 0x1003d329
jb 0x1003d2d9
cmp ecx, 0x7f
ja 0x1003d2f4
and cl, 0x7f
mov dword [esp + 0x34], 0
mov byte [eax + 4], cl
mov eax, 1
lea edx, [eax + 4]
jmp 0x1003d35c
test edx, edx
ja 0x1003d329
jb 0x1003d302
cmp ecx, 0x3fff
ja 0x1003d329
mov eax, ecx
shrd eax, edx, 7
mov edx, dword [esp + 0x34]
or al, 0x80
mov dword [esp + 0x34], 0
and cl, 0x7f
mov byte [edx + 4], al
mov eax, 2
mov byte [edx + 5], cl
lea edx, [eax + 4]
jmp 0x1003d35c
push edx
push ecx
lea ecx, [eax + 4]
call fcn.10023030
add esp, 8
mov dword [esp + 0x34], 0
lea edx, [eax + 4]
jmp 0x1003d35c
sub ebx, 4
cmp eax, 4
jne 0x1003d35c
mov eax, dword [esp + 0x40]
push ebx
push eax
mov eax, dword [eax + 0x4c]
call eax
add esp, 8
movzx edx, ax
add dword [esp + 0x5c], edx
xor eax, eax
cmp dword [esp + 0xc0], edi
jg 0x1003d37f
nop dword [eax + eax]
cmp eax, 6
jge 0x1003d37f
inc eax
cmp dword [esp + eax*4 + 0xc0], edi
jle 0x1003d370
mov ecx, dword [esp + eax*4 + 0xa8]
cmp ecx, ebx
jb 0x1003d395
lea eax, [edx + ebx]
cmp ecx, eax
jb 0x1003d442
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x40]
push dword [eax + 4]
push dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x5c]
push ebx
mov ebx, dword [esp + 0x5c]
lea edx, [edx + ebx]
call fcn.1003b3d0
mov edi, eax
add esp, 0x10
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], edi
test edi, edi
jne 0x1003d5f5
mov eax, dword [esp + 0x18]
inc ebx
dec eax
mov dword [esp + 0x4c], ebx
cmp ebx, eax
jl 0x1003d211
mov ebx, dword [esp + 0x18]
mov ecx, 1
sub ecx, ebx
mov dword [esp + 0x5c], ecx
cmp ecx, ebx
jge 0x1003d4fa
mov eax, ecx
lea ebx, [esp + 0x14c]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
add ebx, ecx
cmp byte [ebx], 0
jne 0x1003d4e5
cmp dword [esp + 0x5c], 0
lea edi, [ecx*4]
jge 0x1003d431
mov eax, dword [esp + edi + 0x120]
cmp eax, dword [esp + edi + 0x10c]
jl 0x1003d4e5
test ecx, ecx
jne 0x1003d46a
mov ecx, dword [esp + 0x110]
xor edx, edx
xor eax, eax
jmp 0x1003d49d
push 0x10156d84
push 0x12c75
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021490
add esp, 0x14
mov edi, 0xb
jmp 0x1003d5f5
cmp ecx, dword [esp + 0x44]
jge 0x1003d482
xor edx, edx
cmp byte [esp + 0xf], dl
sete dl
add edx, dword [esp + edi + 0x120]
jmp 0x1003d484
mov edx, esi
mov ecx, dword [esp + edi + 0x110]
xor eax, eax
cmp byte [esp + 0xf], al
sete al
add eax, dword [esp + edi + 0x10c]
sub ecx, eax
lea esi, [esp + 0x98]
push esi
push ecx
mov ecx, dword [esp + edi + 0xf0]
push eax
call fcn.1003bb60
mov esi, dword [esp + 0xa4]
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
test eax, eax
jne 0x1003d5f1
mov eax, dword [esp + edi + 0xe8]
mov ecx, dword [esp + 0x54]
sub ecx, dword [esp + edi + 0xfc]
mov byte [ebx], 1
mov dword [eax + 0x14], ecx
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x18]
inc ecx
mov dword [esp + 0x5c], ecx
cmp ecx, ebx
jl 0x1003d3f4
cmp dword [ebp + 0xc], 0
je 0x1003d564
mov esi, dword [esp + 0x40]
cmp word [esi + 0x18], 0
jne 0x1003d564
mov ecx, dword [esp + 0xe8]
movzx eax, byte [esi + 9]
cmp eax, dword [ecx + 0x14]
jg 0x1003d564
or edx, 0xffffffff
call fcn.10034e70
mov ecx, dword [esp + 0xe8]
mov edx, esi
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
call fcn.1003c060
mov edi, dword [esp + 0x24]
add esp, 4
test edi, edi
jne 0x1003d5b4
mov ecx, dword [esp + 0xe8]
mov edx, ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
call fcn.1003a870
add esp, 4
mov edi, eax
jmp 0x1003d5b4
mov ecx, dword [esp + 0x38]
cmp byte [ecx + 0x11], 0
je 0x1003d5b0
cmp word [esp + 0x64], 0
jne 0x1003d5b0
xor esi, esi
test ebx, ebx
jle 0x1003d5b0
nop dword [eax]
mov eax, dword [esp + esi*4 + 0xe8]
lea edx, [esp + 0x20]
push edx
push dword [eax + 4]
mov eax, dword [eax + 0x38]
push 5
mov edx, dword [eax + 8]
bswap edx
call fcn.100346f0
mov ecx, dword [esp + 0x44]
inc esi
add esp, 0xc
cmp esi, ebx
jl 0x1003d580
mov edi, dword [esp + 0x20]
jmp 0x1003d5b4
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
mov esi, ebx
cmp ebx, eax
jge 0x1003d5f9
nop
mov ecx, dword [esp + esi*4 + 0xdc]
test edi, edi
jne 0x1003d5e1
push dword [ecx + 4]
mov edx, ecx
mov ecx, dword [ecx + 0x34]
call fcn.1003a870
mov edi, eax
add esp, 4
mov eax, dword [esp + 0x44]
inc esi
cmp esi, eax
jl 0x1003d5c0
jmp 0x1003d5f9
lea eax, [ebx + 4]
push eax
jmp 0x1003c4a9
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x1003d60d
mov edx, eax
xor ecx, ecx
call fcn.1001e3f0
mov eax, dword [esp + 0x44]
xor esi, esi
test eax, eax
jle 0x1003d63c
nop word [eax + eax]
mov ecx, dword [esp + esi*4 + 0xdc]
test ecx, ecx
je 0x1003d637
mov ecx, dword [ecx + 0x48]
call fcn.1002fa10
mov eax, dword [esp + 0x44]
inc esi
cmp esi, eax
jl 0x1003d620
xor esi, esi
test ebx, ebx
jle 0x1003d65a
mov ecx, dword [esp + esi*4 + 0xe8]
test ecx, ecx
je 0x1003d655
mov ecx, dword [ecx + 0x48]
call fcn.1002fa10
inc esi
cmp esi, ebx
jl 0x1003d642
mov ecx, dword [esp + 0x154]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10129081
mov esp, ebp
pop ebp
ret