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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x13c
mov eax, dword [0x10166004]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [esp + 0x7c]
push edi
xor edi, edi
mov dword [esp + 0x40], edx
push 0x40
mov ebx, ecx
mov dword [esp + 0x70], esi
push edi
push eax
mov dword [esp + 0x54], ebx
mov dword [esp + 0x38], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x148], edi
mov byte [esp + 0x14c], 0
call fcn.1012ab60
mov eax, dword [ebx + 0x34]
add esp, 0xc
mov dword [esp + 0x34], eax
test esi, esi
jne 0x1003c5b2
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.10129271
mov esp, ebp
pop ebp
ret
movzx ecx, word [ebx + 0x18]
movzx edx, byte [ebx + 0xc]
lea esi, [edx + ecx]
cmp esi, 2
jae 0x1003c5c8
mov dword [esp + 0x50], edi
jmp 0x1003c5f7
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x1003c5d6
mov dword [esp + 0x50], edi
jmp 0x1003c5ed
cmp eax, esi
jne 0x1003c5e8
mov eax, dword [ebp + 0x10]
add esi, 0xfffffffe
add esi, eax
mov dword [esp + 0x50], esi
jmp 0x1003c5f0
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 + 0x54], eax
mov eax, dword [esp + 0x50]
sub eax, edx
lea edx, [eax + esi]
cmp edx, ecx
jne 0x1003c618
movzx ecx, byte [ebx + 9]
add ecx, 8
jmp 0x1003c62c
mov eax, dword [ebx + 0x40]
mov ax, word [eax + edx*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 + 0x44], ecx
mov eax, dword [ecx]
bswap eax
mov dword [esp + 0x28], eax
mov ebx, eax
mov dword [esp + 0x5c], eax
test edi, edi
jne 0x1003c748
mov edi, dword [esp + 0x34]
cmp ebx, dword [edi + 0x30]
jbe 0x1003c68c
push 0x10156e9c
push 0x1142d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021740
mov ebx, 0xb
mov edi, 4
mov eax, esi
mov dword [esp + 0x24], ebx
add esp, 0x14
mov dword [esp + 0x24], ebx
imul edi, eax
jmp 0x1003c753
mov eax, dword [edi]
lea ecx, [esp + 0x20]
push 0
push ecx
push ebx
push eax
mov eax, dword [eax + 0xdc]
call eax
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x1003c734
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 8]
mov dword [esp + esi*4 + 0xc4], eax
cmp byte [eax], 0
jne 0x1003c71e
mov ecx, dword [edx + 8]
cmp ebx, dword [ecx + 4]
je 0x1003c6e5
mov eax, dword [edx + 4]
cmp ebx, 1
mov dword [ecx + 0x38], eax
setne al
mov dword [ecx + 0x48], edx
dec al
mov dword [ecx + 0x34], edi
and al, 0x64
mov dword [ecx + 4], ebx
mov byte [ecx + 9], al
mov ecx, dword [esp + esi*4 + 0xc4]
call fcn.10035fc0
mov ebx, eax
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x1003c71e
mov ecx, dword [esp + esi*4 + 0xc4]
test ecx, ecx
je 0x1003c738
mov ecx, dword [ecx + 0x48]
call fcn.1002fd50
mov edi, 4
mov dword [esp + 0x24], ebx
mov eax, esi
imul edi, eax
jmp 0x1003c753
xor ebx, ebx
mov edi, 4
mov eax, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ebx
imul edi, eax
jmp 0x1003c753
mov ebx, dword [esp + 0x10]
mov edi, 4
mov dword [esp + 0x24], ebx
mov eax, esi
imul edi, eax
jmp 0x1003c753
mov ebx, dword [esp + 0x10]
lea edi, [esi*4]
test ebx, ebx
jne 0x1003d9e1
lea eax, [esp + 0xc4]
add eax, edi
mov dword [esp + 0x30], eax
mov ecx, dword [eax]
cmp dword [ecx + 0x14], ebx
jge 0x1003c78a
call fcn.10035d90
mov ebx, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x1003c8bb
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov ecx, dword [esp + 0x2c]
add ecx, 4
movzx eax, word [eax + 0x18]
add ecx, eax
mov eax, esi
dec esi
mov dword [esp + 0x2c], ecx
test eax, eax
je 0x1003c8d5
mov edi, dword [esp + 0x48]
mov dl, byte [edi + 0xc]
test dl, dl
je 0x1003c7f5
mov eax, dword [esp + 0x50]
movzx ecx, word [edi + 0x1c]
add eax, esi
cmp eax, ecx
jne 0x1003c7f5
mov eax, dword [edi + 0x24]
push eax
mov dword [esp + esi*4 + 0x7c], eax
push edi
mov ebx, dword [eax]
mov eax, dword [edi + 0x4c]
bswap ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x64], ebx
call eax
movzx eax, ax
add esp, 8
mov byte [edi + 0xc], 0
mov edi, dword [esp + 0x10]
mov dword [esp + esi*4 + 0xe4], eax
jmp 0x1003c641
mov ecx, dword [esp + 0x50]
movzx eax, dl
sub ecx, eax
mov eax, dword [edi + 0x40]
add ecx, esi
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [edi + 0x1a]
mov edi, dword [edi + 0x38]
movzx ecx, cx
and ecx, eax
add edi, ecx
push edi
mov dword [esp + esi*4 + 0x7c], edi
mov eax, dword [edi]
bswap eax
mov dword [esp + 0x2c], eax
mov ebx, eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x4c]
push eax
mov eax, dword [eax + 0x4c]
call eax
movzx edx, ax
add esp, 8
mov eax, dword [esp + 0x34]
mov dword [esp + 0x1c], edx
mov dword [esp + esi*4 + 0xe4], edx
test byte [eax + 0x18], 0xc
je 0x1003c88e
mov eax, dword [esp + 0x48]
mov ecx, edi
sub ecx, dword [eax + 0x38]
lea eax, [edx + ecx]
mov edx, dword [esp + 0x34]
cmp eax, dword [edx + 0x28]
mov edx, dword [esp + 0x1c]
jg 0x1003c88e
mov eax, dword [esp + 0x6c]
push edx
add eax, ecx
push edi
push eax
call fcn.1012bff0
mov eax, dword [esp + 0x54]
add esp, 0xc
mov edx, dword [esp + 0x1c]
sub edi, dword [eax + 0x38]
add edi, dword [esp + 0x6c]
mov dword [esp + esi*4 + 0x78], edi
mov edi, dword [esp + 0x48]
lea eax, [esp + 0x24]
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.1003b700
mov edi, dword [esp + 0x2c]
add esp, 8
mov dword [esp + 0x10], edi
jmp 0x1003c641
push edi
lea eax, [esp + 0xc8]
push 0
push eax
call fcn.1012ab60
add esp, 0xc
xor edi, edi
jmp 0x1003d28d
mov eax, dword [esp + 0x34]
lea esi, [ecx + 3]
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.1001e4e0
mov ebx, eax
add esp, 8
mov dword [esp + 0x88], ebx
test ebx, ebx
jne 0x1003c90a
lea ebx, [eax + 7]
xor edi, edi
jmp 0x1003d28d
mov ecx, dword [esp + 0xc4]
lea eax, [ebx + esi*4]
mov dword [esp + 0x8c], eax
lea eax, [eax + esi*2]
mov esi, dword [esp + 0x54]
mov dword [esp + 0x30], eax
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 + 0x84], ecx
mov dword [esp + 0x1c], eax
test esi, esi
jle 0x1003cb74
mov ebx, dword [esp + 0x80]
nop
shl eax, 2
mov dword [esp + 0x3c], eax
mov edi, dword [esp + eax + 0xc4]
mov dword [esp + 0x4c], 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 + 0x74], eax
mov eax, dword [esp + 0xc4]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x38], esi
mov ecx, dword [eax + 0x38]
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x1003cdd6
movzx eax, byte [edi + 0xc]
add eax, dword [esp + 0x2c]
add eax, eax
push eax
mov eax, dword [esp + 0x90]
push 0
lea eax, [eax + ebx*2]
push eax
call fcn.1012ab60
add esp, 0xc
cmp byte [edi + 0xc], 0
jbe 0x1003ca55
movzx edx, word [edi + 0x1c]
cmp dword [esp + 0x2c], edx
jb 0x1003cdac
test edx, edx
je 0x1003ca27
mov edi, dword [esp + 0x58]
nop dword [eax]
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
mov eax, dword [esp + 0x20]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0x88]
add ecx, edi
mov dword [eax + ebx*4], ecx
inc ebx
sub edx, 1
jne 0x1003c9f0
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x80], ebx
mov dword [esp + 0x38], esi
xor edx, edx
cmp byte [edi + 0xc], dl
jbe 0x1003ca55
mov esi, dword [esp + 0x88]
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 0x1003ca38
mov esi, dword [esp + 0x38]
mov dword [esp + 0x80], ebx
movzx eax, word [edi + 0x12]
mov edx, dword [esp + 0x58]
add eax, edx
movzx ecx, word [edi + 0x18]
lea eax, [eax + ecx*2]
mov dword [esp + 0x20], eax
cmp esi, eax
jae 0x1003caa2
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 + 0x88]
add ecx, edx
mov dword [eax + ebx*4], ecx
inc ebx
cmp esi, edi
jb 0x1003ca70
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x80], ebx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov dword [esp + ecx + 0x10c], ebx
cmp eax, dword [esp + 0x68]
jge 0x1003cb63
cmp byte [esp + 0xf], 0
jne 0x1003cb63
movzx eax, word [esp + ecx + 0xe4]
mov ecx, dword [esp + 0x8c]
mov esi, dword [esp + 0x30]
push eax
mov word [ecx + ebx*2], ax
mov ecx, dword [esp + 0x1c]
add esi, ecx
add ecx, eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x1c], ecx
push dword [esp + eax + 0x7c]
push esi
call fcn.1012bff0
mov ecx, dword [esp + 0x70]
add esp, 0xc
mov edx, dword [esp + 0x8c]
movzx eax, cx
add eax, esi
mov esi, dword [esp + 0x88]
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 0x1003cb36
mov eax, dword [edi + 0x38]
mov ecx, dword [esi + ebx*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x1003cb57
cmp ecx, 4
jae 0x1003cb57
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
mov byte [ecx + eax], 0
inc eax
inc word [edx + ebx*2]
cmp word [edx + ebx*2], 4
jb 0x1003cb43
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
inc ebx
mov dword [esp + 0x80], ebx
mov esi, dword [esp + 0x54]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, esi
jl 0x1003c960
mov eax, dword [esp + 0x64]
xor edx, edx
movzx ecx, ax
xor ebx, ebx
mov eax, dword [esp + 0x34]
add ecx, 0xfffffff4
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ebx
add ecx, dword [eax + 0x28]
mov dword [esp + 0x58], ecx
test esi, esi
jle 0x1003cc7f
mov ecx, esi
lea edi, [esp + 0xf8]
lea esi, [esp + 0x10c]
rep movsd dword es:[edi], dword [esi]
nop
mov esi, dword [esp + ebx*4 + 0xc4]
mov ecx, dword [esp + ebx*4 + 0x10c]
mov eax, dword [esi + 0x3c]
mov dword [esp + edx*4 + 0x90], eax
mov dword [esp + edx*4 + 0xa8], ecx
test edx, edx
je 0x1003cbe1
cmp ecx, dword [esp + edx*4 + 0xa4]
jne 0x1003cbe1
dec edx
mov dword [esp + 0x18], edx
cmp byte [esp + 0xf], 0
jne 0x1003cc05
mov eax, dword [esp + 0x48]
inc edx
mov dword [esp + 0x18], edx
mov eax, dword [eax + 0x3c]
mov dword [esp + edx*4 + 0x90], eax
lea eax, [ecx + 1]
mov dword [esp + edx*4 + 0xa8], eax
mov ecx, dword [esp + 0x58]
lea eax, [esp + 0xe4]
mov edi, ecx
mov dword [esp + 0x30], 0
sub edi, dword [esi + 0x14]
lea eax, [eax + ebx*4]
cmp byte [esi + 0xc], 0
mov dword [esp + 0x68], eax
mov dword [eax], edi
jbe 0x1003cc69
lea ebx, [esi + 0x24]
nop
push dword [ebx]
mov eax, dword [esi + 0x4c]
push esi
call eax
mov ecx, dword [esp + 0x38]
lea ebx, [ebx + 4]
movzx eax, ax
inc ecx
add eax, 2
mov dword [esp + 0x38], ecx
add edi, eax
add esp, 8
movzx eax, byte [esi + 0xc]
cmp ecx, eax
jl 0x1003cc30
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x58]
mov dword [eax], edi
mov esi, dword [esp + 0x54]
inc ebx
inc edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], edx
cmp ebx, esi
jl 0x1003cbb0
mov ebx, dword [esp + 0x80]
lea edx, [esp + 0xf8]
sub edx, 4
mov dword [esp + 0x2c], 0
mov dword [esp + 0x3c], edx
mov eax, esi
mov dword [esp + 0x4c], eax
test esi, esi
jle 0x1003cf79
xor edx, edx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], edx
nop dword [eax + eax]
lea eax, [esp + 0xe4]
add eax, edx
mov dword [esp + 0x20], eax
mov edi, dword [eax]
cmp edi, ecx
jle 0x1003ce29
mov esi, dword [esp + 0x80]
lea ecx, [esp + 0xe8]
add ecx, edx
nop word [eax + eax]
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0xe4]
lea eax, [eax + edx]
mov dword [esp + 0x30], ecx
cmp ebx, dword [esp + 0x4c]
jl 0x1003cd25
inc ebx
mov dword [esp + 0x4c], ebx
cmp ebx, 5
jg 0x1003cf1f
mov dword [ecx], 0
mov edi, dword [eax]
mov dword [esp + edx + 0xfc], esi
lea eax, [esp + 0xf8]
add eax, edx
mov dword [esp + 0x38], eax
mov ebx, dword [eax]
mov eax, dword [esp + 0x8c]
lea edx, [ebx - 1]
movzx eax, word [eax + edx*2]
mov dword [esp + 0x68], edx
test ax, ax
jne 0x1003cd5e
lea ecx, [esp + 0x80]
call fcn.1003bae0
mov ecx, dword [esp + 0x30]
movzx eax, ax
mov edx, dword [esp + 0x20]
movzx eax, ax
add eax, 2
sub edi, eax
cmp byte [esp + 0xf], 0
mov dword [edx], edi
jne 0x1003ce02
cmp ebx, esi
jge 0x1003ce00
mov eax, dword [esp + 0x8c]
movzx eax, word [eax + ebx*2]
test ax, ax
jne 0x1003cda0
mov edx, ebx
lea ecx, [esp + 0x80]
call fcn.1003bae0
movzx eax, ax
mov ecx, dword [esp + 0x30]
movzx eax, ax
add eax, 2
jmp 0x1003ce02
push 0x10156e9c
push 0x12ada
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021740
add esp, 0x14
mov ebx, 0xb
xor edi, edi
jmp 0x1003d28d
push 0x10156e9c
push 0x12ac2
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021740
add esp, 0x14
mov ebx, 0xb
xor edi, edi
jmp 0x1003d28d
xor eax, eax
mov edx, dword [esp + 0x38]
add dword [ecx], eax
mov eax, dword [esp + 0x68]
mov dword [edx], eax
mov edx, dword [esp + 0x18]
cmp edi, dword [esp + 0x58]
jg 0x1003ccf0
mov ebx, dword [esp + 0x80]
mov ecx, dword [esp + 0x38]
jmp 0x1003ce36
lea ecx, [esp + 0xf8]
add ecx, edx
mov dword [esp + 0x38], ecx
mov esi, dword [ecx]
cmp esi, ebx
jge 0x1003ced3
mov eax, dword [esp + 0x8c]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x1003ce65
mov edx, esi
lea ecx, [esp + 0x80]
call fcn.1003bae0
mov ecx, dword [esp + 0x38]
movzx eax, ax
movzx eax, ax
add eax, 2
add edi, eax
cmp edi, dword [esp + 0x58]
jg 0x1003cecb
mov edx, dword [esp + 0x20]
inc esi
cmp byte [esp + 0xf], 0
mov dword [ecx], esi
mov dword [edx], edi
jne 0x1003ceb6
cmp esi, ebx
jge 0x1003ceb4
mov eax, dword [esp + 0x8c]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x1003ceac
mov edx, esi
lea ecx, [esp + 0x80]
call fcn.1003bae0
mov ecx, dword [esp + 0x38]
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x1003ceb6
xor eax, eax
mov edx, dword [esp + 0x18]
sub dword [esp + edx + 0xe8], eax
cmp esi, ebx
jl 0x1003ce40
jmp 0x1003cecf
mov edx, dword [esp + 0x18]
cmp esi, ebx
jl 0x1003cedf
mov ecx, dword [esp + 0x1c]
mov eax, ecx
mov dword [esp + 0x4c], eax
jmp 0x1003cefd
cmp dword [esp + 0x2c], 0
jle 0x1003ceef
mov eax, dword [esp + 0x3c]
mov eax, dword [edx + eax]
jmp 0x1003cef1
xor eax, eax
cmp esi, eax
jle 0x1003cf4f
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x2c]
add edx, 4
inc esi
mov dword [esp + 0x18], edx
inc ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x1c], ecx
cmp esi, eax
jge 0x1003cf49
mov ecx, dword [esp + 0x58]
jmp 0x1003ccc0
push 0x10156e9c
push 0x12b3f
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021740
add esp, 0x14
mov ebx, 0xb
xor edi, edi
jmp 0x1003d28d
mov edx, dword [esp + 0x3c]
jmp 0x1003cf7d
push 0x10156e9c
push 0x12b60
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021740
add esp, 0x14
mov ebx, 0xb
xor edi, edi
jmp 0x1003d28d
mov dword [esp + 0x3c], edx
dec eax
mov ecx, eax
mov dword [esp + 0x38], eax
test ecx, ecx
jle 0x1003d0c3
nop dword [eax]
shl ecx, 2
mov dword [esp + 0x1c], ecx
mov esi, dword [edx + ecx]
mov eax, dword [esp + ecx + 0xe0]
dec esi
mov edi, dword [esp + ecx + 0xe4]
mov edx, esi
sub edx, dword [esp + 0x60]
mov dword [esp + 0x18], eax
inc edx
mov eax, dword [esp + 0x8c]
cmp word [eax + edx*2], 0
lea eax, [eax + edx*2]
mov dword [esp + 0x2c], eax
jne 0x1003cfd5
lea ecx, [esp + 0x80]
call fcn.1003bae0
mov ebx, dword [esp + 0x2c]
nop dword [eax]
mov eax, dword [esp + 0x8c]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x1003d001
mov edx, esi
lea ecx, [esp + 0x80]
call fcn.1003bae0
movzx eax, ax
movzx edx, word [ebx]
movzx eax, ax
mov dword [esp + 0x20], eax
test edi, edi
je 0x1003d042
cmp dword [ebp + 0x10], 0
jne 0x1003d075
mov ecx, dword [esp + 0x4c]
add edx, edi
mov ebx, dword [esp + 0x2c]
dec ecx
cmp dword [esp + 0x38], ecx
mov eax, 2
mov ecx, 0
cmove eax, ecx
mov ecx, dword [esp + 0x18]
sub ecx, eax
lea eax, [edx + 2]
sub ecx, dword [esp + 0x20]
cmp eax, ecx
jg 0x1003d075
mov ecx, dword [esp + 0x18]
lea edi, [edx + 2]
mov edx, dword [esp + 0x1c]
mov eax, 0xfffffffe
sub eax, dword [esp + 0x20]
sub ebx, 2
add ecx, eax
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov dword [eax + edx], esi
sub esi, 1
jns 0x1003cfe0
jmp 0x1003d081
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x80]
mov dword [esp + edx + 0xe0], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + edx + 0xe4], edi
cmp ecx, 1
jbe 0x1003d0a5
mov eax, dword [eax + edx - 4]
jmp 0x1003d0a7
xor eax, eax
mov esi, dword [esp + 0x3c]
cmp dword [esi + edx], eax
jle 0x1003d12b
dec ecx
mov edx, esi
mov dword [esp + 0x38], ecx
test ecx, ecx
jg 0x1003cf90
mov eax, dword [esp + 0xc4]
xor esi, esi
mov eax, dword [eax + 0x38]
movzx eax, byte [eax]
mov dword [esp + 0x30], eax
lea eax, [esi + 1]
cmp dword [esp + 0x4c], esi
jle 0x1003d301
cmp esi, dword [esp + 0x54]
jge 0x1003d1c4
mov edi, dword [esp + esi*4 + 0xc4]
mov dword [esp + esi*4 + 0xd0], edi
mov dword [esp + esi*4 + 0xc4], 0
mov dword [esp + 0x20], edi
mov ecx, dword [edi + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x1003d159
mov eax, dword [edx + 0x1c]
cmp eax, dword [ecx + 0x18]
jb 0x1003d159
cmp dword [edx + 0x68], 0
je 0x1003d155
call fcn.1002e740
jmp 0x1003d182
push 0x10156e9c
push 0x12b8c
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021740
add esp, 0x14
mov ebx, 0xb
xor edi, edi
jmp 0x1003d28d
xor edx, edx
jmp 0x1003d184
mov eax, dword [edx + 0x2c]
mov dword [esp + 0x10], eax
test eax, eax
je 0x1003d168
mov edx, eax
jmp 0x1003d188
mov eax, dword [edx + 0x9c]
cmp eax, dword [edx + 0xa8]
jbe 0x1003d17d
call fcn.100302f0
jmp 0x1003d182
call fcn.10030260
mov edx, eax
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x40]
xor ecx, ecx
sub eax, dword [esp + 0x50]
inc dword [esp + 0x14]
cmp esi, eax
mov eax, dword [edi + 0x48]
sete cl
mov dword [esp + 0x24], edx
inc ecx
movsx eax, word [eax + 0x1e]
cmp eax, ecx
je 0x1003d1b3
test edx, edx
je 0x1003d266
test edx, edx
je 0x1003d251
mov ebx, dword [esp + 0x10]
jmp 0x1003d289
cmp dword [ebp + 0x10], 0
lea edx, [esp + 0x20]
mov ecx, dword [esp + 0x28]
cmovne ecx, eax
lea eax, [esp + 0x5c]
push 0
push ecx
mov ecx, dword [esp + 0x3c]
push eax
call fcn.1003a630
mov edx, eax
add esp, 0xc
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], edx
test edx, edx
jne 0x1003d1bb
mov edi, dword [esp + 0x20]
mov ecx, edi
mov edx, dword [esp + 0x30]
call fcn.100360d0
mov ecx, dword [esp + 0x34]
inc dword [esp + 0x14]
mov dword [esp + esi*4 + 0xd0], edi
mov dword [esp + esi*4 + 0x10c], ebx
cmp byte [ecx + 0x11], 0
je 0x1003d249
mov edx, dword [edi + 4]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x4c]
push dword [eax + 4]
push 5
call fcn.10034a80
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x1003d1bb
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x28], eax
inc esi
cmp esi, dword [esp + 0x4c]
jge 0x1003d301
mov eax, 1
jmp 0x1003d0e3
push 0x10156e9c
push 0x12bad
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10021740
add esp, 0x14
mov ebx, 0xb
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x88]
test eax, eax
je 0x1003d2a1
mov edx, eax
xor ecx, ecx
call fcn.1001e7b0
mov eax, dword [esp + 0x54]
xor esi, esi
test eax, eax
jle 0x1003d2cc
nop dword [eax + eax]
mov ecx, dword [esp + esi*4 + 0xc4]
test ecx, ecx
je 0x1003d2c7
mov ecx, dword [ecx + 0x48]
call fcn.1002fd50
mov eax, dword [esp + 0x54]
inc esi
cmp esi, eax
jl 0x1003d2b0
xor esi, esi
test edi, edi
jle 0x1003d2ea
mov ecx, dword [esp + esi*4 + 0xd0]
test ecx, ecx
je 0x1003d2e5
mov ecx, dword [ecx + 0x48]
call fcn.1002fd50
inc esi
cmp esi, edi
jl 0x1003d2d2
mov ecx, dword [esp + 0x144]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10129271
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x14]
xor ecx, ecx
test edx, edx
jle 0x1003d326
nop dword [eax + eax]
mov eax, dword [esp + ecx*4 + 0xd0]
mov eax, dword [eax + 4]
mov dword [esp + ecx*4 + 0x120], eax
inc ecx
cmp ecx, edx
jl 0x1003d310
lea eax, [edx - 1]
xor edi, edi
mov dword [esp + 0x28], edi
test eax, eax
jle 0x1003d42b
lea eax, [edi + 1]
mov ebx, edi
mov dword [esp + 0x20], eax
mov esi, eax
cmp eax, edx
jge 0x1003d41a
mov edi, dword [esp + 0x14]
nop
mov eax, dword [esp + esi*4 + 0xd0]
mov ecx, esi
mov edx, dword [esp + ebx*4 + 0xd0]
mov eax, dword [eax + 4]
cmp eax, dword [edx + 4]
cmovae ecx, ebx
inc esi
mov ebx, ecx
cmp esi, edi
jl 0x1003d350
mov edi, dword [esp + 0x28]
mov dword [esp + 0x40], ebx
cmp ebx, edi
je 0x1003d412
mov ecx, dword [esp + edi*4 + 0xd0]
xor edx, edx
mov esi, dword [esp + 0x34]
mov edi, dword [esp + ebx*4 + 0xd0]
mov eax, dword [ecx + 4]
mov dword [esp + 0x60], eax
mov eax, dword [0x10168ac0]
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.1002a380
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + ecx*4 + 0xd0]
mov ecx, dword [eax + 0x48]
mov word [ecx + 0x1c], si
mov esi, dword [esp + 0x60]
mov edx, esi
call fcn.1002a380
mov ecx, dword [esp + 0x28]
mov edx, ebx
mov eax, dword [esp + ecx*4 + 0xd0]
mov ecx, dword [eax + 0x48]
mov word [ecx + 0x1c], di
call fcn.1002a380
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + ecx*4 + 0xd0]
mov dword [eax + 4], ebx
mov eax, dword [esp + 0x40]
mov eax, dword [esp + eax*4 + 0xd0]
mov dword [eax + 4], esi
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov edi, eax
lea eax, [edx - 1]
mov dword [esp + 0x28], edi
cmp edi, eax
jl 0x1003d337
test byte [esp + 0x30], 8
mov eax, dword [esp + edx*4 + 0xcc]
mov ecx, dword [esp + 0x44]
mov eax, dword [eax + 4]
bswap eax
mov dword [ecx], eax
jne 0x1003d478
mov ecx, dword [esp + 0x54]
cmp ecx, edx
je 0x1003d478
lea eax, [esp + 0xd0]
lea esi, [esp + 0xc4]
cmovge eax, esi
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [esp + 0x14]
mov eax, dword [esp + eax*4 + 0xcc]
mov ecx, dword [eax + 0x38]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x80]
cmp byte [eax + 0x11], 0
je 0x1003d61c
mov edi, dword [esp + 0xd0]
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 0x44], 0
mov dword [esp + 0x1c], ecx
movzx edx, word [edi + 0x18]
movzx eax, byte [edi + 0xc]
add edx, eax
mov dword [esp + 0x20], edx
test esi, esi
jle 0x1003d61c
mov dword [esp + 0x40], ecx
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x88]
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x5c], eax
cmp ecx, edx
jne 0x1003d51d
mov esi, dword [esp + 0x14]
xor eax, eax
cmp byte [esp + 0xf], al
sete al
mov dword [esp + 0x60], eax
inc ebx
cmp ebx, esi
jge 0x1003d4f3
mov edi, dword [esp + ebx*4 + 0xd0]
jmp 0x1003d4fa
mov edi, dword [esp + ebx*4 + 0xc4]
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 + 0x1c]
cmp ecx, edx
je 0x1003d4e5
mov esi, dword [esp + 0x80]
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x40]
cmp ecx, dword [esp + eax + 0xf8]
jne 0x1003d552
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x44], eax
shl eax, 2
cmp byte [esp + 0xf], 0
mov dword [esp + 0x40], eax
mov eax, dword [esp + eax + 0xd0]
mov dword [esp + 0x28], eax
je 0x1003d60f
jmp 0x1003d556
mov eax, dword [esp + 0x28]
cmp ebx, dword [esp + 0x14]
jge 0x1003d57c
mov eax, dword [eax + 4]
cmp eax, dword [esp + ebx*4 + 0x120]
mov eax, dword [esp + 0x5c]
jne 0x1003d580
cmp eax, dword [edi + 0x38]
jb 0x1003d580
cmp eax, dword [edi + 0x3c]
jb 0x1003d60f
jmp 0x1003d580
mov eax, dword [esp + 0x5c]
cmp word [esp + 0x64], 0
jne 0x1003d5b2
mov edx, dword [eax]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x2c]
bswap edx
push dword [ecx + 4]
mov ecx, dword [esp + 0x3c]
push 5
call fcn.10034a80
mov eax, dword [esp + 0x30]
add esp, 0xc
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x8c]
movzx eax, word [eax + ecx*2]
test ax, ax
jne 0x1003d5d3
mov edx, ecx
lea ecx, [esp + 0x80]
call fcn.1003bae0
movzx eax, ax
mov ecx, dword [esp + 0x28]
cmp ax, word [ecx + 0x10]
jbe 0x1003d5fb
lea eax, [esp + 0x24]
mov edx, edi
push eax
mov eax, dword [esp + 0x60]
push eax
call fcn.10035170
mov edx, dword [esp + 0x2c]
add esp, 8
mov dword [esp + 0x10], edx
jmp 0x1003d5ff
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x1003d1bb
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, esi
jl 0x1003d4c2
mov eax, dword [esp + 0x14]
xor edi, edi
dec eax
mov dword [esp + 0x40], edi
test eax, eax
jle 0x1003d7cf
nop
mov ecx, dword [esp + edi*4 + 0xd0]
mov edi, dword [esp + edi*4 + 0xf8]
mov eax, dword [esp + 0x88]
mov esi, dword [esp + 0x70]
add esi, dword [esp + 0x6c]
mov dword [esp + 0x44], ecx
mov ebx, dword [eax + edi*4]
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x64]
movzx edx, cx
mov ecx, dword [esp + 0x44]
movzx eax, word [eax + edi*2]
add edx, eax
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x80]
cmp byte [ecx + 8], 0
jne 0x1003d68a
mov ecx, dword [ecx + 0x38]
mov eax, dword [ebx]
mov dword [ecx + 8], eax
jmp 0x1003d753
cmp byte [esp + 0xf], 0
je 0x1003d73a
lea eax, [esp + 0x120]
dec edi
push eax
mov eax, dword [esp + 0x8c]
push dword [eax + edi*4]
mov eax, dword [ecx + 0x50]
push ecx
call eax
mov edx, dword [esp + 0x130]
add esp, 0xc
mov eax, dword [esp + 0x28]
mov ebx, eax
mov ecx, dword [esp + 0x120]
test edx, edx
ja 0x1003d720
jb 0x1003d6d0
cmp ecx, 0x7f
ja 0x1003d6eb
and cl, 0x7f
mov dword [esp + 0x28], 0
mov byte [eax + 4], cl
mov eax, 1
lea edx, [eax + 4]
jmp 0x1003d753
test edx, edx
ja 0x1003d720
jb 0x1003d6f9
cmp ecx, 0x3fff
ja 0x1003d720
mov eax, ecx
shrd eax, edx, 7
mov edx, dword [esp + 0x28]
or al, 0x80
mov dword [esp + 0x28], 0
and cl, 0x7f
mov byte [edx + 4], al
mov eax, 2
mov byte [edx + 5], cl
lea edx, [eax + 4]
jmp 0x1003d753
push edx
push ecx
lea ecx, [eax + 4]
call fcn.100233d0
add esp, 8
mov dword [esp + 0x28], 0
lea edx, [eax + 4]
jmp 0x1003d753
sub ebx, 4
cmp eax, 4
jne 0x1003d753
mov eax, dword [esp + 0x48]
push ebx
push eax
mov eax, dword [eax + 0x4c]
call eax
add esp, 8
movzx edx, ax
add dword [esp + 0x70], edx
xor eax, eax
cmp dword [esp + 0xa8], edi
jg 0x1003d771
cmp eax, 6
jge 0x1003d771
inc eax
cmp dword [esp + eax*4 + 0xa8], edi
jle 0x1003d762
mov ecx, dword [esp + eax*4 + 0x90]
cmp ecx, ebx
jb 0x1003d787
lea eax, [edx + ebx]
cmp ecx, eax
jb 0x1003d835
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
push dword [eax + 4]
push dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x5c]
push ebx
lea edx, [edx + edi]
call fcn.1003b820
mov ebx, eax
add esp, 0x10
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x1003d289
mov eax, dword [esp + 0x14]
inc edi
dec eax
mov dword [esp + 0x40], edi
cmp edi, eax
jl 0x1003d630
mov edi, dword [esp + 0x14]
mov ebx, 1
sub ebx, edi
mov dword [esp + 0x44], ebx
cmp ebx, edi
jge 0x1003d8d3
mov eax, ebx
cdq
mov ecx, eax
lea eax, [esp + 0x13c]
xor ecx, edx
sub ecx, edx
add eax, ecx
mov dword [esp + 0x60], eax
cmp byte [eax], 0
jne 0x1003d8c6
lea edi, [ecx*4]
test ebx, ebx
jns 0x1003d824
mov eax, dword [esp + edi + 0x108]
cmp eax, dword [esp + edi + 0xf4]
jl 0x1003d8c2
test ecx, ecx
jne 0x1003d844
mov ecx, dword [esp + 0xf8]
xor edx, edx
xor eax, eax
jmp 0x1003d877
push 0x10156e9c
push 0x12c75
jmp 0x1003d270
cmp ecx, dword [esp + 0x54]
jge 0x1003d85c
xor edx, edx
cmp byte [esp + 0xf], dl
sete dl
add edx, dword [esp + edi + 0x108]
jmp 0x1003d85e
mov edx, esi
mov ecx, dword [esp + edi + 0xf8]
xor eax, eax
cmp byte [esp + 0xf], al
sete al
add eax, dword [esp + edi + 0xf4]
sub ecx, eax
lea ebx, [esp + 0x80]
push ebx
push ecx
mov ecx, dword [esp + edi + 0xd8]
push eax
call fcn.1003bf30
mov ebx, eax
add esp, 0xc
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x1003d289
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x58]
sub ecx, dword [esp + edi + 0xe4]
mov ebx, dword [esp + 0x44]
mov byte [eax], 1
mov eax, dword [esp + edi + 0xd0]
mov dword [eax + 0x14], ecx
mov edi, dword [esp + 0x14]
inc ebx
mov dword [esp + 0x44], ebx
cmp ebx, edi
jl 0x1003d7e6
cmp dword [ebp + 0xc], 0
je 0x1003d94d
mov ebx, dword [esp + 0x48]
cmp word [ebx + 0x18], 0
jne 0x1003d94d
mov ecx, dword [esp + 0xd0]
movzx eax, byte [ebx + 9]
cmp eax, dword [ecx + 0x14]
jg 0x1003d94d
or edx, 0xffffffff
call fcn.10035340
mov ecx, dword [esp + 0xd0]
mov edx, ebx
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
call fcn.1003c450
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x10], edx
test edx, edx
jne 0x1003d9a8
mov ecx, dword [esp + 0xd0]
mov edx, ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
call fcn.1003acc0
mov edx, eax
add esp, 4
mov dword [esp + 0x10], edx
jmp 0x1003d9a8
mov ecx, dword [esp + 0x34]
cmp byte [ecx + 0x11], 0
je 0x1003d9a4
cmp word [esp + 0x64], 0
jne 0x1003d9a4
xor esi, esi
test edi, edi
jle 0x1003d9a4
nop word [eax + eax]
mov eax, dword [esp + esi*4 + 0xd0]
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.10034a80
mov ecx, dword [esp + 0x40]
inc esi
add esp, 0xc
cmp esi, edi
jl 0x1003d970
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], edx
jmp 0x1003d9a8
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x54]
mov esi, edi
cmp edi, ebx
jge 0x1003d9d8
mov ecx, dword [esp + esi*4 + 0xc4]
test edx, edx
jne 0x1003d9cf
push dword [ecx + 4]
mov edx, ecx
mov ecx, dword [ecx + 0x34]
call fcn.1003acc0
add esp, 4
mov edx, eax
inc esi
cmp esi, ebx
jl 0x1003d9b2
mov dword [esp + 0x10], edx
mov ebx, dword [esp + 0x10]
jmp 0x1003d28d
lea eax, [edi + 4]
push eax
jmp 0x1003c8bc