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

Disassembly:
sub esp, 0x80
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
mov ebp, dword [esp + 0x8c]
mov al, byte [ebp + 0x94]
push esi
xor esi, esi
test al, 2
push edi
mov edi, dword [ebx]
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x18], edi
jne 0x40454f
push str.__check_index_reference
call fcn.00427189
add esp, 4
mov eax, dword [ebp + 0x58]
mov dword [esp + 0x34], eax
test byte [edi + 0x170], 5
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x30], esi
jne 0x40459b
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 4]
mov edx, dword [eax]
lea eax, [ecx + edx - 1]
push eax
call fcn.00405100
add esp, 4
imul eax, dword [edi + 0xe8]
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x108]
test eax, eax
mov edx, dword [edi + 0x140]
lea ecx, [ebp + 0x588]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], edx
jbe 0x404ae8
mov eax, 1
xor edx, edx
mov ecx, esi
mov dword [ebp + esi*4 + 0x488], 0
call fcn.004277d0
and eax, dword [edi + 0x78]
and edx, dword [edi + 0x7c]
or eax, edx
jne 0x40461e
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
mov edx, dword [edi + 0xa8]
mov edi, dword [esp + 0x20]
xor ecx, ecx
mov cx, word [eax]
sub esi, ebp
sub esi, 0x588
sar esi, 2
add esi, edx
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x404ab2
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
inc ecx
mov dword [ebp + 0x58], eax
mov dword [esp + 0x28], ecx
xor eax, eax
lea edi, [ebp + 0x400]
mov ecx, 0x22
rep stosd dword es:[edi], eax
test byte [ebp + 0x94], 2
jne 0x404657
lea ecx, [esi + 1]
push ecx
push str.__check_data_record_references_index:__d_n
call fcn.00427148
add esp, 8
mov edx, dword [esp + 0x14]
mov ax, word [edx + 2]
and ax, 0x80
mov word [esp + 0x12], ax
je 0x40466e
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x68]
mov eax, dword [ecx + esi*8]
mov ecx, dword [ecx + esi*8 + 4]
mov edx, eax
and edx, ecx
xor edi, edi
cmp edx, 0xffffffff
jne 0x40469d
mov edx, dword [ebx + 4]
cmp dword [edx], edi
je 0x404ab6
cmp word [esp + 0x12], di
jne 0x404ab6
mov edx, dword [ebx + 0xa0]
push edi
push edx
push ecx
push eax
mov eax, dword [esp + 0x24]
push eax
push ebx
call fcn.00412020
add esp, 0x18
test eax, eax
jne 0x4046fe
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x68]
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [eax + esi*8 + 4]
mov edx, dword [eax + esi*8]
push ecx
push edx
call fcn.00423a10
push eax
push str.Cant_read_indexpage_from_filepos:__s
push ebp
call fcn.004038a0
mov al, byte [ebp + 0x94]
add esp, 0x18
test al, 0x10
jne 0x404ab6
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x80
ret
mov ecx, dword [esp + 0x14]
xor eax, eax
mov ax, word [ecx + 4]
push 1
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x30], edi
mov dword [ebp + 0x34], edi
mov dword [ebp + 0x40], edi
cdq
add dword [ebp + 0x28], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp + 0x44], edi
adc eax, edx
mov dword [ebp + 0x2c], eax
lea eax, [ebp + esi*4 + 0x488]
push eax
mov dword [ebp + 0x90], edi
mov edx, dword [ebx + 0xa0]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push edx
mov dword [esp + 0x2c], edi
mov edx, dword [eax + 0x68]
mov eax, dword [edx + esi*8 + 4]
mov edx, dword [edx + esi*8]
push eax
push edx
push ecx
push ebx
push ebp
call fcn.00404c00
add esp, 0x24
test eax, eax
jne 0x4046f0
mov eax, dword [esp + 0x14]
mov cl, byte [eax + 2]
test cl, cl
js 0x4047f9
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
cmp dword [esp + 0x1c], eax
je 0x4047c4
lea edx, [esp + 0x78]
push edx
push edi
push eax
call fcn.00423a10
mov ecx, dword [esp + 0x28]
add esp, 0xc
push eax
lea eax, [esp + 0x64]
push eax
push edi
push ecx
call fcn.00423a10
add esp, 0xc
push eax
push str.Found__s_keys_of__s
push ebp
call fcn.004038a0
mov al, byte [ebp + 0x94]
add esp, 0x10
test al, 0x10
je 0x4046f0
jmp 0x404ab6
mov edx, dword [esp + 0x28]
sub edx, dword [esp + 0x2c]
cmp edx, 1
jne 0x4048bd
mov eax, dword [esp + 0x18]
test byte [eax + 0x170], 5
jne 0x4047f2
test dword [ebp + 0x94], 0x800000
je 0x4048bd
mov ecx, dword [ebp + 0x58]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0x10c]
dec edx
cmp edx, esi
jne 0x404984
mov eax, dword [ebx]
mov ecx, dword [eax + 0x50]
mov edx, dword [eax + 0x54]
mov dword [eax + 0x50], edi
mov dword [eax + 0x54], edi
mov eax, dword [ebx + 0xac]
push eax
push edi
push edi
push ebx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], edx
mov dword [ebx + 0xe0], esi
call fcn.00411bc0
mov ecx, dword [ebx + 0xac]
push ecx
push ebx
call fcn.00411f40
mov edx, dword [ebx]
mov ecx, dword [edx + 0x50]
mov eax, dword [edx + 0x54]
mov edi, dword [esp + 0x6c]
add esp, 0x18
cmp eax, edi
jb 0x404891
ja 0x40485f
cmp ecx, dword [esp + 0x50]
jbe 0x404891
lea edx, [esp + 0x60]
push edx
push eax
push ecx
call fcn.00423a10
mov ecx, dword [esp + 0x5c]
add esp, 0xc
push eax
lea eax, [esp + 0x7c]
push eax
push edi
push ecx
call fcn.00423a10
add esp, 0xc
push eax
push str.Auto_increment_value:__s_is_smaller_than_max_used_value:__s
push ebp
call fcn.00403800
add esp, 0x10
test dword [ebp + 0x94], 0x80000
je 0x404902
mov eax, dword [ebx]
mov ecx, dword [ebp + 4]
mov edi, dword [eax + 0x54]
cmp edi, ecx
mov edx, dword [ebp]
ja 0x40490e
jb 0x4048b5
mov edi, dword [eax + 0x50]
cmp edi, edx
jae 0x40490e
mov dword [eax + 0x50], edx
mov dword [eax + 0x54], ecx
jmp 0x40490e
mov edx, dword [esp + 0x30]
cmp edx, dword [ebp + 0x58]
je 0x4047f9
cmp esi, edi
je 0x4048e2
lea eax, [esi + 1]
push eax
push str.Key__u_doesnt_point_at_same_records_that_key_1
push ebp
call fcn.004038a0
add esp, 0xc
jmp 0x4048f0
push str.Key_1_doesnt_point_at_all_records
push ebp
call fcn.004038a0
add esp, 8
test byte [ebp + 0x94], 0x10
je 0x4046f0
jmp 0x404ab6
mov edx, dword [ebx]
mov eax, dword [esp + 0x50]
mov dword [edx + 0x50], eax
mov dword [edx + 0x54], edi
push 7
push ebx
call fcn.004110f0
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x14]
mov edi, dword [ebx + 0xa4]
xor ecx, ecx
mov cx, word [edx + 8]
xor eax, eax
push 0
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebx + 0xa4]
xor edx, edx
mov dx, word [ecx + 8]
mov ecx, dword [ebx + 0xac]
push edx
push eax
push esi
push ecx
push ebx
call fcn.00410e90
add esp, 0x20
test eax, eax
jne 0x404979
mov esi, dword [ebp + 0x78]
push str.Found_row_where_the_auto_increment_column_has_the_value_0
push ebp
call fcn.00403800
add esp, 8
mov dword [ebp + 0x78], esi
push 8
push ebx
call fcn.004110f0
add esp, 8
mov edx, dword [esp + 0x14]
push edx
push ebx
call fcn.00405170
mul dword [esp + 0x24]
mov ecx, dword [ebp + 0x40]
add esp, 8
push 0
mov edi, eax
mov eax, dword [ebp + 0x44]
push 2
push eax
push ecx
mov esi, edx
call fcn.00427b80
add edi, eax
mov al, byte [ebp + 0x94]
adc esi, edx
test al, 0x10
je 0x404a3e
mov eax, dword [ebp + 0x38]
mov ecx, dword [ebp + 0x3c]
or eax, ecx
je 0x404a3e
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x404a3e
push esi
push edi
call fcn.004044e0
fstp qword [esp + 0x60]
mov edx, dword [ebp + 0x34]
mov eax, dword [ebp + 0x30]
push edx
push eax
call fcn.004044e0
fld qword [esp + 0x68]
fsub st(1)
mov ecx, dword [ebp + 0x90]
add esp, 0x10
push ecx
fmul qword [0x4351a0]
fdiv qword [esp + 0x5c]
call fcn.00427c78
fmul qword [0x4351a0]
push eax
mov eax, dword [ebp + 0x3c]
push eax
fstp qword [esp + 0x64]
mov eax, dword [ebp + 0x38]
push eax
call fcn.004044e0
fdivr qword [esp + 0x68]
add esp, 8
call fcn.00427c78
mov edx, dword [esp + 0x2c]
push eax
inc edx
push edx
push str.Key:__2d:__Keyblocks_used:__3d____Packed:__4d____Max_levels:__2d_n
call fcn.00427148
add esp, 0x14
mov eax, dword [ebp + 0x30]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
add ecx, eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x48], ecx
mov ecx, dword [ebp + 0x34]
adc edx, ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x4c], edx
mov edx, dword [ebp + 0x38]
add eax, edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x3c]
adc ecx, eax
mov eax, dword [ebp + 0x94]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x44]
add edx, edi
adc ecx, esi
test ah, 4
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ecx
je 0x404ab2
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x14]
push 0
push edx
lea eax, [ebp + 0x400]
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.0040a240
add esp, 0x14
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
xor edx, edx
mov dx, word [eax]
add eax, 0x2c
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
inc esi
mov dword [esp + 0x24], esi
mov edi, eax
lea edx, [ecx + edx*4]
cmp esi, dword [eax + 0x108]
mov dword [esp + 0x20], edx
jb 0x4045c1
test byte [ebp + 0x94], 0x10
je 0x404b90
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov ecx, esi
or ecx, eax
je 0x404b90
mov eax, dword [esp + 0x28]
test eax, eax
jbe 0x404b7b
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
push edx
push eax
call fcn.004044e0
fstp qword [esp + 0x60]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
push ecx
push edx
call fcn.004044e0
fld qword [esp + 0x68]
fsub st(1)
add esp, 0x10
fmul qword [0x4351a0]
fdiv qword [esp + 0x58]
call fcn.00427c78
fmul qword [0x4351a0]
push eax
mov eax, dword [esp + 0x40]
push eax
fstp qword [esp + 0x60]
push esi
call fcn.004044e0
fdivr qword [esp + 0x64]
add esp, 8
call fcn.00427c78
push eax
push str.Total:____Keyblocks_used:__3d____Packed:__4d___n_n
call fcn.00427148
add esp, 0xc
jmp 0x404b90
mov ecx, dword [edi + 0x78]
or ecx, dword [edi + 0x7c]
je 0x404b90
push 0x450448
call fcn.00427189
add esp, 4
mov ebx, dword [ebx + 4]
mov edx, dword [ebp + 0x28]
cmp edx, dword [ebx + 0x18]
jne 0x404ba3
mov eax, dword [ebp + 0x2c]
cmp eax, dword [ebx + 0x1c]
je 0x404bbc
mov ecx, dword [ebp + 0x10]
and ecx, dword [ebp + 0x14]
cmp ecx, 0xffffffff
je 0x404bbc
push str.Some_data_are_unreferenced_in_keyfile
push ebp
call fcn.00403800
add esp, 8
mov edx, dword [esp + 0x28]
cmp edx, dword [esp + 0x2c]
je 0x404be0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
pop edi
sub eax, ecx
pop esi
mov dword [ebp + 0x58], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x80
ret
pop edi
pop esi
mov dword [ebp + 0x58], 0
pop ebp
xor eax, eax
pop ebx
add esp, 0x80
ret