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

Disassembly:
sub esp, 0x44
push ebx
mov ebx, dword [esp + 0x50]
push ebp
push esi
mov esi, dword [esp + 0x54]
xor ecx, ecx
lea ebp, [esi + 0x300]
push edi
mov edi, dword [ebx]
mov dword [ebp + 0xec], ecx
mov dword [ebp + 0xf0], ecx
mov eax, dword [ebx + 4]
mov edx, dword [eax]
mov eax, dword [esi + 0x94]
test ah, 2
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edx
jne 0x406393
mov ecx, dword [edi + 0x150]
test al, 2
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 1
mov dword [esp + 0x5c], 0xffffffff
jne 0x4063da
mov edx, dword [esp + 0x60]
push edx
push str.__recovering__with_keycache__MyISAM_table__s_n
call fcn.00427148
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
lea eax, [esp + 0x2c]
push eax
push 0
push edx
call fcn.00423a10
push eax
push str.Data_records:__s_n
call fcn.00427148
add esp, 0x1c
mov al, byte [esi + 0x99]
test al, al
jne 0x4063f5
mov eax, dword [esi + 0x60]
push 0x28520
push eax
call fcn.0041f580
add esp, 8
mov ecx, dword [edi + 0x150]
mov edx, dword [esi + 0x64]
push 0x10
push 1
push 0
push ecx
mov ecx, dword [ebx + 0x34]
push 0
push edx
lea eax, [esi + 0x2b0]
push ecx
push eax
call fcn.0041ed60
add esp, 0x20
test eax, eax
jne 0x406a39
cmp dword [esp + 0x64], eax
jne 0x406452
mov edx, dword [esp + 0x14]
push 0x30
push 1
push eax
mov eax, dword [esi + 0x68]
push edx
push 1
push eax
lea ecx, [ebx + 0x128]
push 0xffffffffffffffff
push ecx
call fcn.0041ed60
add esp, 0x20
test eax, eax
jne 0x406a39
or dword [ebx + 0x50], 0x10
mov dword [ebp + 0x38], eax
mov dword [ebp + 0x3c], eax
mov dword [ebp + 0xf0], eax
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x54], eax
mov edx, dword [edi + 0xe8]
push eax
push edx
call fcn.004209f0
add esp, 8
test eax, eax
mov dword [ebp + 0xec], eax
jne 0x406495
push str.Not_enough_memory_for_extra_record
push esi
call fcn.004038a0
add esp, 8
jmp 0x406a39
mov eax, dword [esp + 0x64]
test eax, eax
jne 0x406557
mov ecx, dword [esi + 0x2a8]
mov edx, dword [esp + 0x60]
push 0
push ecx
push 0
push 6
push str..TMD
push 0x450448
lea eax, [esi + 0xa0]
push edx
push eax
call fcn.00420340
add esp, 0x14
push eax
call fcn.00420b40
add esp, 0x10
test eax, eax
mov dword [esp + 0x5c], eax
jge 0x4064f7
lea eax, [esi + 0xa0]
push eax
push str.Cant_create_new_tempfile:__s
push esi
call fcn.004038a0
add esp, 0xc
jmp 0x406a39
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx + 0x34]
push str.datafile_header
push 0
push ecx
push 0
push 0
push edx
push eax
push esi
call fcn.00407450
add esp, 0x20
test eax, eax
jne 0x406a39
mov ecx, dword [ebx]
mov edx, dword [esp + 0x5c]
or eax, 0xffffffff
mov dword [ecx + 0x48], eax
mov dword [ecx + 0x4c], eax
mov dword [ebx + 0x158], edx
mov eax, dword [esi + 0x94]
test ah, 2
je 0x406557
mov edx, dword [edi + 0x170]
and edx, 0xfffffffb
mov eax, edx
mov byte [edi + 5], al
shr eax, 8
mov dword [edi + 0x170], edx
mov byte [edi + 4], al
mov dword [ebp], ebx
mov eax, dword [edi + 0x150]
mov dword [ebp + 0x28], eax
mov ecx, dword [ebp + 0x28]
xor eax, eax
push eax
mov dword [ebp + 0x20], ecx
mov ecx, dword [esp + 0x18]
push 2
mov edx, eax
push eax
mov dword [ebp + 0x2c], eax
mov dword [ebp + 0x24], edx
mov dword [ebp + 0x30], ecx
mov dword [ebp + 0x34], eax
mov edx, dword [ebx + 0x34]
push eax
push edx
call fcn.004212e0
mov dword [ebp + 0x44], edx
mov edx, dword [esp + 0x78]
mov dword [ebp + 0x40], eax
mov dword [esi + 0x2b8], eax
mov ecx, dword [ebp + 0x44]
xor eax, eax
push edi
mov dword [esi + 0x2bc], ecx
cmp edx, eax
sete dl
push ebp
push esi
mov dword [ebp + 0x48], eax
mov dword [ebp + 0x4c], eax
mov byte [ebp + 0xe8], dl
mov dword [ebp + 0x58], 0xffffffff
call fcn.0040a410
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 4]
mov dword [esp + 0x34], ecx
xor ecx, ecx
mov dword [edi + 0x40], ecx
mov edx, dword [ebx + 4]
mov dword [edx + 4], ecx
mov eax, dword [ebx + 4]
mov dword [eax], ecx
mov edx, dword [ebx + 4]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov eax, dword [esi + 0x94]
add esp, 0x20
test eax, 0x20000000
mov dword [esi + 0x5c], ecx
je 0x406603
mov byte [esi + 0x9f], 1
mov edx, dword [ebx]
mov dword [ebx + 0x54], 0x401
xor eax, eax
cmp dword [edx + 0x108], ecx
jbe 0x406633
mov edx, dword [edi + 0x68]
mov dword [edx + eax*8], 0xffffffff
mov dword [edx + eax*8 + 4], 0xffffffff
mov edx, dword [ebx]
inc eax
cmp eax, dword [edx + 0x108]
jb 0x406616
mov cl, byte [edi + 0x15]
xor eax, eax
test cl, cl
jbe 0x40665c
lea esp, [esp]
mov ecx, dword [edi + 0x6c]
mov dword [ecx + eax*8], 0xffffffff
xor edx, edx
mov dword [ecx + eax*8 + 4], 0xffffffff
mov dl, byte [edi + 0x15]
inc eax
cmp eax, edx
jb 0x406640
mov ecx, dword [edi + 0x108]
mov eax, 1
xor edx, edx
call fcn.004277d0
mov ecx, dword [esi + 0x10]
add eax, 0xffffffff
adc edx, 0xffffffff
and eax, ecx
and edx, dword [esi + 0x14]
mov ecx, dword [edi + 0xb8]
mov dword [edi + 0x7c], edx
mov dword [edi + 0x78], eax
mov eax, dword [ebx + 4]
mov dword [eax + 0x18], ecx
mov edx, dword [edi + 0xbc]
push esi
mov dword [eax + 0x1c], edx
call fcn.00406e00
push ebp
call fcn.00408150
add esp, 8
test eax, eax
jne 0x4067cd
mov edi, edi
mov eax, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x30]
mov edx, dword [ebp + 0xec]
push eax
push ecx
push edx
push ebx
push esi
call fcn.00406b30
add esp, 0x14
test eax, eax
je 0x4067a9
call fcn.00420640
cmp dword [eax], 0x79
jne 0x406a39
mov ecx, dword [ebx + 0xdc]
mov edx, dword [ebx + 0xd8]
lea eax, [esp + 0x3c]
push eax
push ecx
push edx
call fcn.00423a10
mov ecx, dword [ebp + 0x3c]
mov edx, dword [ebp + 0x38]
add esp, 0xc
push eax
lea eax, [esp + 0x28]
push eax
push ecx
push edx
call fcn.00423a10
add esp, 0xc
push eax
mov eax, dword [ebx + 0xf0]
inc eax
push eax
push str.Duplicate_key__2d_for_record_at__10s_against_new_record_at__10s
push esi
call fcn.004037d0
mov al, byte [esi + 0x94]
add esp, 0x14
test al, 1
je 0x40677d
mov ecx, dword [ebp + 0xec]
mov edx, dword [ebx + 0xa4]
mov eax, dword [ebx + 0xf0]
push 0
push 0
push ecx
push edx
push eax
push ebx
call fcn.00411890
mov edx, dword [ebx + 0xf0]
mov ecx, dword [ebx + 0xa4]
imul edx, edx, 0x2c
mov eax, dword [edi + 0x140]
push 0x4c8
push ecx
mov ecx, dword [edx + eax + 0x14]
push ecx
push 0x44ccd8
call fcn.00417030
add esp, 0x28
mov ecx, dword [ebp + 0x48]
mov edx, dword [ebp + 0x4c]
mov eax, 1
add ecx, eax
mov dword [ebp + 0x48], ecx
mov ecx, dword [esp + 0x64]
adc edx, 0
cmp ecx, eax
mov dword [ebp + 0x4c], edx
jne 0x4067ba
mov byte [esi + 0x9d], al
mov dword [esi + 0x7c], eax
jmp 0x406a39
push ebp
call fcn.00408d60
add esp, 4
test eax, eax
jne 0x406a39
push ebp
call fcn.00408150
add esp, 4
test eax, eax
je 0x4066b0
test eax, eax
jg 0x406a39
push ebx
push esi
call fcn.00409ee0
add esp, 8
test eax, eax
jne 0x406a39
lea edx, [ebx + 0x128]
push edx
call fcn.0041f470
add esp, 4
test eax, eax
jne 0x406a39
mov eax, dword [esi + 0x2e8]
test eax, eax
jl 0x406a39
mov eax, dword [esi + 0x94]
test ah, 1
je 0x406831
push 0x44ccd8
push str.___________r
call fcn.0042785d
push 0x44ccd8
call fcn.00427201
add esp, 0xc
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0x1c]
mov edx, dword [eax + 0x18]
mov eax, dword [edi + 0x178]
push 0
push ecx
push edx
push eax
call fcn.00421360
add esp, 0x10
test eax, eax
je 0x40686c
call fcn.00420640
mov ecx, dword [eax]
push ecx
push str.Cant_change_size_of_indexfile__error:__d
push esi
call fcn.00403800
add esp, 0xc
jmp 0x406a39
mov eax, dword [esp + 0x64]
test eax, eax
je 0x4068cc
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp + 0x48]
add eax, ecx
mov ecx, dword [ebp + 0x4c]
mov dword [esp + 0x18], 0
adc ecx, dword [esp + 0x18]
mov edx, dword [ebx + 4]
mov edx, dword [edx + 4]
cmp eax, edx
mov dword [esp + 0x14], edx
jne 0x4068a0
xor eax, eax
cmp ecx, eax
je 0x4068cc
push str.Couldnt_fix_table_with_quick_recovery:_Found_wrong_number_of_deleted_records
push esi
call fcn.004038a0
push str.Run_recovery_again_without__q
push esi
call fcn.004038a0
add esp, 0x10
mov byte [esi + 0x9d], 1
mov byte [esi + 0x9c], 1
jmp 0x406a31
test dword [esi + 0x94], 0x4000000
je 0x4068ed
mov eax, dword [ebx + 4]
mov edx, dword [eax]
mov ecx, dword [esp + 0x1c]
inc edx
cmp edx, ecx
jae 0x4068ed
mov dword [eax], ecx
jmp 0x406a31
mov eax, dword [esp + 0x64]
test eax, eax
jne 0x406933
mov eax, dword [ebx + 0x34]
push 0
push eax
call fcn.00420180
mov ecx, dword [esp + 0x64]
mov edx, dword [ebx + 4]
mov dword [ebx + 0x34], ecx
mov eax, dword [ebp + 0x30]
mov dword [edx + 0x20], eax
mov ecx, dword [ebp + 0x34]
mov dword [edx + 0x24], ecx
mov eax, dword [ebx + 4]
mov edx, dword [eax + 4]
add edx, dword [eax]
push 0
mov dword [edi + 0x40], edx
call fcn.004278ab
add esp, 0xc
mov dword [edi + 0x84], eax
jmp 0x406942
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 0x28]
mov dword [eax + 0x20], ecx
mov edx, dword [ebp + 0x2c]
mov dword [eax + 0x24], edx
test dword [esi + 0x94], 0x20000000
je 0x406957
mov eax, dword [esi + 0x5c]
mov dword [edi + 0x80], eax
test byte [esi + 0x94], 2
jne 0x4069ad
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
cmp dword [esp + 0x1c], eax
je 0x406986
lea edx, [esp + 0x24]
push edx
push 0
push eax
call fcn.00423a10
push eax
push str.Data_records:__s_n
call fcn.00427148
add esp, 0x14
mov eax, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x4c]
mov edx, eax
or edx, ecx
je 0x4069ad
lea edx, [esp + 0x24]
push edx
push ecx
push eax
call fcn.00423a10
push eax
push str._s_records_have_been_removed
push esi
call fcn.00403800
add esp, 0x18
mov edx, dword [ebx + 4]
lea eax, [edi + 0x18]
cmp eax, edx
mov dword [esp + 0x10], 0
je 0x4069d2
mov ecx, 0xa
mov esi, edx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
test eax, eax
jl 0x406aa6
push 0
push eax
call fcn.00420180
or eax, 0xffffffff
mov dword [ebx + 0x34], eax
mov ecx, dword [edi + 0x12c]
mov edx, dword [edi + 0x15c]
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0x94]
shr eax, 0x14
and eax, 0x100
push eax
push ecx
push str..TMD
push str..MYD
push edx
call fcn.00407360
add esp, 0x1c
test eax, eax
jne 0x406a31
push edi
push ebx
call fcn.0040d150
add esp, 8
test eax, eax
je 0x406aa6
mov dword [esp + 0x10], 1
mov eax, dword [esi + 0x7c]
test eax, eax
jne 0x406a71
call fcn.00420640
mov ecx, dword [ebp + 0x3c]
mov edx, dword [ebp + 0x38]
mov dword [esp + 0x64], eax
lea eax, [esp + 0x24]
push eax
push ecx
push edx
call fcn.00423a10
push eax
mov eax, dword [esp + 0x74]
mov ecx, dword [eax]
push ecx
push str._d_for_record_at_pos__s
push esi
call fcn.004038a0
add esp, 0x1c
mov eax, dword [esp + 0x5c]
test eax, eax
jl 0x406a99
push 0
push eax
call fcn.00420180
mov edx, dword [ebx]
mov eax, dword [edx + 0x12c]
push eax
lea ecx, [esi + 0xa0]
push ecx
call fcn.00420ae0
add esp, 0x10
mov eax, dword [ebx]
or byte [eax + 0x9c], 6
or dword [ebx + 0x54], 1
mov edx, dword [ebp + 0xec]
push edx
call fcn.00420a80
mov eax, dword [ebp + 0xf0]
push eax
call fcn.00420a80
lea eax, [esi + 0x2b0]
push eax
call fcn.0041f540
and dword [ebx + 0x50], 0xffffffed
add ebx, 0x128
push ebx
call fcn.0041f540
mov ecx, dword [edi + 0x178]
push ecx
push esi
call fcn.00406e10
mov ecx, dword [esp + 0x28]
add esp, 0x18
or ecx, eax
jne 0x406b14
mov eax, dword [esi + 0x94]
test ah, 2
je 0x406b14
and byte [edi + 4], 0xfb
mov dword [edi + 0x150], 0
mov edx, dword [ebp + 8]
mov dword [edi + 0x1b8], edx
or byte [edi + 0x9c], 0x38
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x44
ret