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

Disassembly:
sub esp, 0x148
mov eax, dword [0x100ff008]
xor eax, esp
mov dword [esp + 0x144], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x158]
mov ebx, ecx
push edi
mov ecx, 0x10103106
mov dword [esp + 0x30], ebx
mov edi, edx
mov dword [esp + 0x64], esi
call fcn.100d96c4
mov eax, dword [ebx + 0x34]
xor ebp, ebp
mov dword [esp + 0x28], 0
mov dword [esp + 0x34], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x140], ebp
mov byte [esp + 0x144], 0
mov dword [esp + 0x78], ebp
mov dword [esp + 0x80], ebp
mov dword [esp + 0x2c], eax
test esi, esi
jne 0x10057fb4
lea eax, [esi + 7]
jmp 0x100592c7
movzx edx, word [ebx + 0x18]
movzx ecx, byte [ebx + 0xc]
lea esi, [ecx + edx]
cmp esi, 2
jae 0x10057fc8
xor edi, edi
jmp 0x10057fed
test edi, edi
je 0x10057fdf
cmp edi, esi
jne 0x10057fde
mov eax, dword [esp + 0x164]
lea edi, [eax - 2]
add edi, esi
jmp 0x10057fe6
dec edi
mov eax, dword [esp + 0x164]
mov esi, 2
sub esi, eax
lea eax, [esi + 1]
mov dword [esp + 0x44], edi
mov dword [esp + 0x3c], eax
mov eax, edi
sub eax, ecx
mov dword [esp + 0x54], esi
lea ecx, [eax + esi]
cmp ecx, edx
jne 0x10058010
movzx ecx, byte [ebx + 9]
add ecx, 8
jmp 0x10058024
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 + 0x40], ecx
mov edi, dword [ecx]
bswap edi
mov dword [esp + 0x48], edi
mov ebx, edi
mov dword [esp + 0x5c], edi
lea edi, [esi*4]
mov eax, dword [esp + 0x2c]
cmp ebx, dword [eax + 0x2c]
jbe 0x10058075
push 0x100f0d34
push 0xff8c
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
mov ebx, 0xb
add esp, 0x14
mov dword [esp + 0x14], ebx
jmp 0x100580f8
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push 0
push ecx
push ebx
push eax
mov eax, dword [eax + 0xcc]
call eax
add esp, 0x10
mov dword [esp + 0x14], eax
test eax, eax
jne 0x100580f4
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 8]
mov dword [esp + edi + 0xb8], eax
cmp byte [eax], 0
jne 0x100580ec
push dword [esp + 0x2c]
mov edx, ebx
call fcn.100525f0
mov ecx, dword [esp + edi + 0xbc]
add esp, 4
call fcn.100523f0
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x100580ec
mov ecx, dword [esp + edi + 0xb8]
test ecx, ecx
je 0x100580f8
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x100580e5
call fcn.1004b400
jmp 0x100580f8
call fcn.10047990
jmp 0x100580f8
xor ebx, ebx
mov dword [esp + 0x14], ebx
jmp 0x100580f8
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x10058282
mov ecx, dword [esp + edi + 0xb8]
cmp dword [ecx + 0x14], ebx
jge 0x10058127
call fcn.100521b0
mov ebx, eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x10058256
mov ecx, esi
sub edi, 4
dec esi
test ecx, ecx
je 0x100582d6
mov ebx, dword [esp + 0x30]
mov dl, byte [ebx + 0xc]
test dl, dl
je 0x10058189
mov eax, dword [esp + 0x44]
movzx ecx, word [ebx + 0x1c]
add eax, esi
cmp eax, ecx
jne 0x10058189
mov eax, dword [ebx + 0x24]
push eax
mov dword [esp + edi + 0x14c], eax
mov ebx, dword [eax]
mov eax, dword [esp + 0x34]
bswap ebx
push eax
mov dword [esp + 0x50], ebx
mov eax, dword [eax + 0x4c]
mov dword [esp + 0x64], ebx
call eax
movzx eax, ax
add esp, 8
mov dword [esp + edi + 0xd8], eax
mov eax, dword [esp + 0x30]
mov byte [eax + 0xc], 0
jmp 0x10058040
mov ecx, dword [esp + 0x44]
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]
mov ebx, dword [ebx + 0x38]
movzx ecx, cx
and ecx, eax
add ebx, ecx
push ebx
mov dword [esp + edi + 0x14c], ebx
mov eax, dword [ebx]
bswap eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x34]
push eax
mov eax, dword [eax + 0x4c]
call eax
movzx edx, ax
add esp, 8
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x60], edx
mov dword [esp + edi + 0xd8], edx
test byte [eax + 0x16], 0xc
je 0x1005822f
mov eax, dword [esp + 0x30]
mov ecx, ebx
mov ebp, dword [esp + 0x2c]
sub ecx, dword [eax + 0x38]
lea eax, [edx + ecx]
cmp eax, dword [ebp + 0x24]
mov ebp, 0
jg 0x1005825f
mov eax, dword [esp + 0x64]
push edx
add eax, ecx
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x3c]
add esp, 0xc
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
sub eax, dword [ecx + 0x38]
add eax, ebx
mov dword [esp + edi + 0x148], eax
jmp 0x10058233
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x20]
push eax
movzx eax, byte [ecx + 0xc]
push edx
mov edx, dword [esp + 0x4c]
sub edx, eax
add edx, esi
call fcn.10057120
mov ebx, dword [esp + 0x40]
add esp, 8
jmp 0x10058040
lea eax, [esi*4]
jmp 0x10058285
push 0x100f0d34
push 0x114ba
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
add esp, 0x14
mov ebx, 0xb
lea eax, [edi + 4]
push eax
lea eax, [esp + 0xbc]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ebp, dword [esp + 0x3c]
xor esi, esi
test ebp, ebp
jle 0x10059295
nop word [eax + eax]
mov ecx, dword [esp + esi*4 + 0xb8]
test ecx, ecx
je 0x1005928c
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x10059287
call fcn.1004b400
jmp 0x1005928c
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + 0x20]
mov eax, 0xaaaaaaab
lea ecx, [esi - 8]
mul ecx
mov edi, edx
shr edi, 2
add edi, 4
imul edi, dword [esp + 0x3c]
add edi, 3
and edi, 0xfffffffc
lea ebx, [edi + edi*2]
lea eax, [esi + ebx*2]
cdq
push edx
push eax
call fcn.1003e840
mov esi, eax
add esp, 8
mov dword [esp + 0x80], esi
test esi, esi
jne 0x10058320
lea ebx, [eax + 7]
jmp 0x10058298
mov ecx, dword [esp + 0xb8]
lea eax, [esi + edi*4]
mov dword [esp + 0x84], eax
lea eax, [esi + ebx*2]
mov dword [esp + 0x18], eax
mov dword [esp + 0x7c], ecx
movzx eax, byte [ecx + 8]
shl ax, 2
movzx eax, ax
mov dword [esp + 0x4c], eax
mov al, byte [ecx + 3]
mov byte [esp + 0x13], al
movzx eax, al
mov dword [esp + 0x58], eax
xor eax, eax
mov dword [esp + 0x24], eax
cmp dword [esp + 0x3c], eax
jle 0x1005859c
nop dword [eax]
shl eax, 2
mov dword [esp + 0x50], eax
mov ebx, dword [esp + eax + 0xb8]
mov dword [esp + 0x60], ebx
movzx eax, word [ebx + 0x1a]
mov edi, dword [ebx + 0x38]
mov ecx, eax
movzx esi, word [ebx + 0x12]
movzx edx, word [ebx + 0x18]
add esi, edi
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x1c], edi
mov ecx, dword [eax + 0x38]
mov al, byte [edi]
mov dword [esp + 0x38], esi
cmp al, byte [ecx]
jne 0x1005878f
movzx eax, byte [ebx + 0xc]
mov ecx, dword [esp + 0x84]
add eax, edx
add eax, eax
push eax
mov eax, dword [esp + 0x7c]
push 0
lea eax, [ecx + eax*2]
push eax
call sub.VCRUNTIME140.dll_memset
mov al, byte [ebx + 0xc]
add esp, 0xc
test al, al
je 0x10058472
movzx edx, word [ebx + 0x1c]
cmp dword [esp + 0x6c], edx
jb 0x10058767
test edx, edx
je 0x1005843b
mov ebx, dword [esp + 0x70]
mov ebp, dword [esp + 0x78]
mov ax, word [esi]
add esi, 2
mov ch, al
mov cl, ah
movzx eax, bx
movzx ecx, cx
and ecx, eax
mov eax, dword [esp + 0x80]
add ecx, edi
mov dword [eax + ebp*4], ecx
inc ebp
sub edx, 1
jne 0x10058404
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x78], ebp
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x38], esi
mov al, byte [ebx + 0xc]
xor edx, edx
test al, al
je 0x10058472
mov ebp, dword [esp + 0x78]
lea ecx, [ebx + 0x24]
mov esi, dword [esp + 0x80]
nop
mov eax, dword [ecx]
lea ecx, [ecx + 4]
mov dword [esi + ebp*4], eax
inc edx
movzx eax, byte [ebx + 0xc]
inc ebp
cmp edx, eax
jl 0x10058450
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x78], ebp
mov ebp, dword [esp + 0x34]
movzx eax, word [ebx + 0x12]
xor edx, edx
movzx ecx, word [ebx + 0x18]
add eax, edi
lea eax, [eax + ecx*2]
xor ecx, ecx
mov edi, eax
sub edi, esi
inc edi
shr edi, 1
cmp esi, eax
cmova edi, ecx
test edi, edi
je 0x100584d4
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x78]
nop dword [eax + eax]
mov ax, word [esi]
lea esi, [esi + 2]
mov ch, al
inc edx
mov cl, ah
mov eax, dword [esp + 0x74]
movzx ecx, cx
movzx eax, ax
and ecx, eax
mov eax, dword [esp + 0x80]
add ecx, ebx
mov dword [eax + ebp*4], ecx
inc ebp
cmp edx, edi
jb 0x100584a0
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x78], ebp
mov ebp, dword [esp + 0x34]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x78]
mov dword [esp + edx + 0x114], edi
cmp eax, dword [esp + 0x54]
jge 0x1005858d
cmp byte [esp + 0x13], 0
jne 0x1005858d
movzx eax, word [esp + edx + 0xd8]
mov ecx, dword [esp + 0x84]
mov esi, dword [esp + 0x18]
push eax
push dword [esp + edx + 0x14c]
add esi, ebp
mov word [ecx + edi*2], ax
add ebp, eax
push esi
mov dword [esp + 0x40], ebp
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x58]
add esp, 0xc
mov edx, dword [esp + 0x84]
movzx eax, cx
add eax, esi
mov esi, dword [esp + 0x80]
mov dword [esi + edi*4], eax
sub word [edx + edi*2], cx
cmp byte [ebx + 8], 0
jne 0x1005855d
mov eax, dword [ebx + 0x38]
mov ecx, dword [esi + edi*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x10058584
cmp word [edx + edi*2], 4
jae 0x10058584
mov eax, dword [esp + 0x18]
nop dword [eax + eax]
mov byte [eax + ebp], 0
inc ebp
inc word [edx + edi*2]
cmp word [edx + edi*2], 4
jb 0x10058570
mov dword [esp + 0x34], ebp
mov eax, dword [esp + 0x24]
inc edi
mov dword [esp + 0x78], edi
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x3c]
jl 0x10058370
mov eax, dword [esp + 0x4c]
xor ecx, ecx
movzx edi, ax
xor ebx, ebx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], ebx
mov eax, dword [eax + 0x24]
add eax, 0xfffffff4
add edi, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x34], edi
test eax, eax
jle 0x10058699
nop dword [eax + eax]
mov esi, dword [esp + ebx*4 + 0xb8]
mov edx, dword [esp + ebx*4 + 0x114]
mov dword [esp + 0x50], edx
mov eax, dword [esi + 0x3c]
mov dword [esp + ecx*4 + 0x88], eax
mov dword [esp + ecx*4 + 0xa0], edx
test ecx, ecx
je 0x10058605
cmp edx, dword [esp + ecx*4 + 0x9c]
jne 0x10058605
dec ecx
mov dword [esp + 0x24], ecx
cmp byte [esp + 0x13], 0
jne 0x10058629
mov eax, dword [esp + 0x30]
inc ecx
mov dword [esp + 0x24], ecx
mov eax, dword [eax + 0x3c]
mov dword [esp + ecx*4 + 0x88], eax
lea eax, [edx + 1]
mov dword [esp + ecx*4 + 0xa0], eax
sub edi, dword [esi + 0x14]
lea eax, [esp + 0xd8]
lea eax, [eax + ebx*4]
xor ebp, ebp
mov dword [eax], edi
cmp byte [esi + 0xc], 0
mov dword [esp + 0x54], eax
jbe 0x10058678
lea ebx, [esi + 0x24]
push dword [ebx]
mov eax, dword [esi + 0x4c]
push esi
call eax
movzx eax, ax
lea ebx, [ebx + 4]
add eax, 2
inc ebp
add edi, eax
add esp, 8
movzx eax, byte [esi + 0xc]
cmp ebp, eax
jl 0x10058647
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x50]
mov ebx, dword [esp + 0x18]
mov dword [eax], edi
mov eax, dword [esp + 0x3c]
inc ecx
mov edi, dword [esp + 0x34]
mov dword [esp + ebx*4 + 0xec], edx
inc ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ecx
cmp ebx, eax
jl 0x100585d0
mov dword [esp + 0x24], 0
mov edx, eax
mov dword [esp + 0x1c], edx
test eax, eax
jle 0x1005890c
mov ecx, dword [esp + 0x78]
mov ebx, 1
mov dword [esp + 0x38], ebx
xor ebp, ebp
nop
mov esi, dword [esp + ebp + 0xd8]
cmp esi, edi
jle 0x100587dd
nop
cmp ebx, edx
jl 0x100586fd
lea edx, [ebx + 1]
mov dword [esp + 0x1c], edx
cmp edx, 5
jg 0x100588bc
mov dword [esp + ebp + 0xdc], 0
mov esi, dword [esp + ebp + 0xd8]
mov dword [esp + ebp + 0xf0], ecx
mov edi, dword [esp + ebp + 0xec]
mov ecx, dword [esp + 0x84]
lea ebx, [edi - 1]
movzx eax, word [ecx + ebx*2]
test ax, ax
jne 0x1005872c
mov edx, ebx
lea ecx, [esp + 0x78]
call fcn.100574a0
mov ecx, dword [esp + 0x84]
movzx eax, ax
movzx eax, ax
add eax, 2
sub esi, eax
cmp byte [esp + 0x13], 0
mov dword [esp + ebp + 0xd8], esi
jne 0x100587b9
cmp edi, dword [esp + 0x78]
jge 0x100587b7
movzx eax, word [ecx + edi*2]
test ax, ax
jne 0x1005875f
mov edx, edi
lea ecx, [esp + 0x78]
call fcn.100574a0
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x100587b9
push 0x100f0d34
push 0x11515
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
add esp, 0x14
mov ebx, 0xb
jmp 0x1005926a
push 0x100f0d34
push 0x114fd
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
add esp, 0x14
mov ebx, 0xb
jmp 0x1005926a
xor eax, eax
add dword [esp + ebp + 0xdc], eax
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x1c]
mov dword [esp + ebp + 0xec], ebx
mov ebx, dword [esp + 0x38]
cmp esi, dword [esp + 0x34]
jg 0x100586d0
mov edi, dword [esp + ebp + 0xec]
cmp edi, ecx
jge 0x10058878
mov edx, dword [esp + 0x84]
movzx eax, word [edx + edi*2]
test ax, ax
jne 0x10058815
mov edx, edi
lea ecx, [esp + 0x78]
call fcn.100574a0
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x84]
movzx eax, ax
movzx eax, ax
add eax, 2
add esi, eax
cmp esi, dword [esp + 0x34]
jg 0x1005889c
inc edi
mov dword [esp + ebp + 0xd8], esi
cmp byte [esp + 0x13], 0
mov dword [esp + ebp + 0xec], edi
jne 0x10058869
cmp edi, ecx
jge 0x10058867
movzx eax, word [edx + edi*2]
test ax, ax
jne 0x1005885f
mov edx, edi
lea ecx, [esp + 0x78]
call fcn.100574a0
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x84]
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x10058869
xor eax, eax
sub dword [esp + ebp + 0xdc], eax
cmp edi, ecx
jl 0x100587f3
mov edx, ebx
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x24]
inc ebx
inc eax
mov dword [esp + 0x38], ebx
add ebp, 4
mov dword [esp + 0x24], eax
cmp eax, edx
jge 0x1005890c
mov edi, dword [esp + 0x34]
jmp 0x100586c0
cmp edi, ecx
jge 0x10058878
cmp dword [esp + 0x24], 0
jle 0x100588b0
mov eax, dword [esp + ebp + 0xe8]
jmp 0x100588b2
xor eax, eax
cmp edi, eax
jle 0x100588e4
mov edx, dword [esp + 0x1c]
jmp 0x1005887e
push 0x100f0d34
push 0x1157a
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
add esp, 0x14
mov ebx, 0xb
jmp 0x1005926a
push 0x100f0d34
push 0x1159b
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
add esp, 0x14
mov ebx, 0xb
jmp 0x1005926a
lea eax, [edx - 1]
mov ecx, eax
mov dword [esp + 0x38], eax
test ecx, ecx
jle 0x10058a72
nop dword [eax]
shl ecx, 2
lea eax, [esp + 0xd8]
add eax, ecx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x70], eax
mov edi, dword [eax]
lea eax, [esp + ecx + 0xd4]
mov dword [esp + 0x6c], eax
mov eax, dword [eax]
mov dword [esp + 0x24], eax
lea eax, [esp + 0xec]
sub eax, 4
mov dword [esp + 0x18], eax
mov ebx, dword [eax + ecx]
mov ecx, dword [esp + 0x84]
lea esi, [ebx - 1]
mov edx, esi
sub edx, dword [esp + 0x58]
inc edx
cmp word [ecx + edx*2], 0
lea ebp, [ecx + edx*2]
jne 0x10058987
lea ecx, [esp + 0x78]
call fcn.100574a0
nop dword [eax]
mov ecx, dword [esp + 0x84]
cmp word [ecx + esi*2], 0
mov dword [esp + 0x74], esi
mov dword [esp + 0x50], esi
jne 0x100589a1
mov edx, esi
lea ecx, [esp + 0x78]
call fcn.100574a0
test edi, edi
je 0x100589eb
cmp dword [esp + 0x164], 0
mov edx, ebx
jne 0x10058a31
mov ecx, dword [esp + 0x1c]
mov eax, 2
dec ecx
cmp dword [esp + 0x38], ecx
mov ecx, 0
cmove eax, ecx
mov ecx, dword [esp + 0x24]
sub ecx, eax
mov eax, dword [esp + 0x84]
movzx eax, word [eax + esi*2]
sub ecx, eax
movzx eax, word [ebp]
add eax, 2
add eax, edi
cmp eax, ecx
jg 0x10058a31
movzx eax, word [ebp]
mov ecx, 0xfffffffe
mov edx, dword [esp + 0x18]
add eax, 2
mov ebx, dword [esp + 0x50]
add edi, eax
mov eax, dword [esp + 0x84]
sub ebp, 2
movzx eax, word [eax + esi*2]
sub ecx, eax
mov eax, dword [esp + 0x24]
add eax, ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x24], eax
mov dword [edx + ecx], esi
sub esi, 1
mov edx, dword [esp + 0x74]
jns 0x10058980
jmp 0x10058a35
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x70]
mov dword [ecx], edi
mov ecx, dword [esp + 0x6c]
mov dword [ecx], eax
mov ecx, dword [esp + 0x38]
cmp ecx, 1
jle 0x10058a5b
mov esi, dword [esp + 0x18]
lea eax, [ecx*4]
mov eax, dword [esi + eax - 4]
jmp 0x10058a5d
xor eax, eax
cmp edx, eax
jle 0x10058adc
dec ecx
mov dword [esp + 0x38], ecx
test ecx, ecx
jg 0x10058920
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0xb8]
xor esi, esi
mov eax, dword [eax + 0x38]
lea ebp, [esi + 1]
movzx ebx, byte [eax]
mov dword [esp + 0x58], ebx
test edx, edx
jle 0x10058bde
mov edi, dword [esp + 0x48]
cmp esi, dword [esp + 0x3c]
jge 0x10058b46
mov eax, dword [esp + esi*4 + 0xb8]
mov dword [esp + esi*4 + 0xc4], eax
mov dword [esp + esi*4 + 0xb8], 0
mov dword [esp + 0x18], eax
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x10058b08
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x10058b08
cmp dword [edx + 0x60], 0
je 0x10058b04
call fcn.1004b9b0
jmp 0x10058b2d
push 0x100f0d34
push 0x115c5
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
add esp, 0x14
mov ebx, 0xb
jmp 0x1005926a
xor eax, eax
jmp 0x10058b2d
mov eax, dword [edx + 0x28]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10058b31
mov eax, dword [edx + 0x94]
cmp eax, dword [edx + 0x98]
jbe 0x10058b28
call fcn.1004d020
jmp 0x10058b2d
call fcn.1004ce30
mov dword [esp + 0x14], eax
inc dword [esp + 0x28]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x10059266
jmp 0x10058bd3
cmp dword [esp + 0x164], 0
lea eax, [esp + 0x5c]
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x18]
push 0
cmovne edi, ebp
push edi
push eax
call fcn.100561d0
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
test eax, eax
jne 0x10059266
mov edi, dword [esp + 0x18]
mov edx, ebx
mov ecx, edi
call fcn.10052510
mov ecx, dword [esp + 0x2c]
inc dword [esp + 0x28]
mov eax, dword [esp + 0x78]
mov dword [esp + esi*4 + 0xc4], edi
cmp byte [ecx + 0x11], 0
mov dword [esp + esi*4 + 0x114], eax
je 0x10058bcf
mov edx, dword [edi + 4]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x34]
push dword [eax + 4]
push 5
call fcn.10051100
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10059266
mov edi, dword [esp + 0x5c]
inc esi
cmp esi, dword [esp + 0x1c]
jl 0x10058a94
mov ebp, dword [esp + 0x28]
xor ecx, ecx
test ebp, ebp
jle 0x10058c37
nop dword [eax + eax]
mov eax, dword [esp + ecx*4 + 0xc4]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x48]
mov dword [esp + ecx*4 + 0x128], edx
mov dword [esp + ecx*4 + 0x100], edx
mov ax, word [eax + 0x1c]
mov word [esp + ecx*2 + 0x148], ax
xor eax, eax
test ecx, ecx
jle 0x10058c32
nop dword [eax]
cmp dword [esp + eax*4 + 0x128], edx
je 0x10058df0
inc eax
cmp eax, ecx
jl 0x10058c20
inc ecx
cmp ecx, ebp
jl 0x10058bf0
xor ebx, ebx
test ebp, ebp
jle 0x10058d2a
xor edi, edi
lea edx, [edi + 1]
cmp ebp, edx
jle 0x10058c6a
nop word [eax + eax]
mov eax, dword [esp + edx*4 + 0x100]
mov ecx, edx
cmp eax, dword [esp + edi*4 + 0x100]
cmovae ecx, edi
inc edx
mov edi, ecx
cmp edx, ebp
jl 0x10058c50
mov ebp, dword [esp + edi*4 + 0x100]
mov dword [esp + 0x18], ebp
mov dword [esp + edi*4 + 0x100], 0xffffffff
cmp edi, ebx
je 0x10058d1d
jle 0x10058cd3
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + 0x2c]
mov eax, dword [esp + edi*4 + 0xc4]
inc esi
add esi, edi
push esi
mov ebp, dword [eax + 0x48]
xor eax, eax
push dword [ebp + 0x18]
mov word [ebp + 0x1c], ax
mov eax, dword [ebp + 0xc]
push dword [ebp]
push dword [eax + 0x2c]
call dword [0x100ff0dc]
mov al, byte [ebp + 0x1c]
add esp, 0x10
and al, 0xa
mov dword [ebp + 0x18], esi
cmp al, 0xa
jne 0x10058ccf
mov dl, 3
mov ecx, ebp
call fcn.100477c0
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + ebx*4 + 0xc4]
push ebp
mov esi, dword [eax + 0x48]
mov ax, word [esp + edi*2 + 0x14c]
push dword [esi + 0x18]
mov word [esi + 0x1c], ax
mov eax, dword [esi + 0xc]
push dword [esi]
push dword [eax + 0x2c]
call dword [0x100ff0dc]
mov al, byte [esi + 0x1c]
add esp, 0x10
and al, 0xa
mov dword [esi + 0x18], ebp
cmp al, 0xa
jne 0x10058d13
mov dl, 3
mov ecx, esi
call fcn.100477c0
mov eax, dword [esp + ebx*4 + 0xc4]
mov dword [eax + 4], ebp
mov ebp, dword [esp + 0x28]
inc ebx
cmp ebx, ebp
jl 0x10058c41
test byte [esp + 0x58], 8
mov eax, dword [esp + ebp*4 + 0xc0]
mov ecx, dword [esp + 0x40]
mov eax, dword [eax + 4]
bswap eax
mov dword [ecx], eax
jne 0x10058d73
mov ecx, dword [esp + 0x3c]
cmp ecx, ebp
je 0x10058d73
lea edx, [esp + 0xb8]
lea eax, [esp + 0xc4]
cmovge eax, edx
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [esp + ebp*4 + 0xc0]
mov ecx, dword [eax + 0x38]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x2c]
cmp byte [eax + 0x11], 0
je 0x10058f26
mov esi, dword [esp + 0xc4]
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x40], 0
movzx ebx, word [esi + 0x18]
movzx eax, byte [esi + 0xc]
add ebx, eax
cmp dword [esp + 0x78], edi
jle 0x10058f2f
xor edx, edx
mov eax, esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x1c], eax
nop dword [eax]
nop dword [eax + eax]
mov ecx, dword [esp + 0x80]
mov ecx, dword [ecx + ebp*4]
mov dword [esp + 0x18], ecx
cmp ebp, ebx
jne 0x10058e3d
xor edx, edx
cmp byte [esp + 0x13], dl
sete dl
nop dword [eax + eax]
inc edi
cmp edi, dword [esp + 0x28]
jge 0x10058e18
mov esi, dword [esp + edi*4 + 0xc4]
jmp 0x10058e1f
push 0x100f0d34
push 0x1160f
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10041660
add esp, 0x14
mov ebx, 0xb
jmp 0x1005926a
mov esi, dword [esp + edi*4 + 0xb8]
movzx eax, word [esi + 0x18]
movzx ecx, byte [esi + 0xc]
add eax, edx
add ecx, eax
add ebx, ecx
cmp ebp, ebx
je 0x10058de0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
cmp ebp, dword [esp + edx + 0xec]
jne 0x10058e70
mov eax, dword [esp + 0x40]
inc eax
cmp byte [esp + 0x13], 0
mov dword [esp + 0x40], eax
lea edx, [eax*4]
mov eax, dword [esp + edx + 0xc4]
mov dword [esp + 0x48], edx
mov dword [esp + 0x1c], eax
je 0x10058f13
cmp edi, dword [esp + 0x28]
jge 0x10058e94
mov eax, dword [eax + 4]
cmp eax, dword [esp + edi*4 + 0x128]
mov eax, dword [esp + 0x1c]
jne 0x10058e94
cmp ecx, dword [esi + 0x38]
jb 0x10058e94
cmp ecx, dword [esi + 0x3c]
jb 0x10058f13
cmp word [esp + 0x4c], 0
jne 0x10058ebe
lea edx, [esp + 0x20]
push edx
push dword [eax + 4]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x34]
push 5
bswap edx
call fcn.10051100
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x84]
movzx eax, word [eax + ebp*2]
test ax, ax
jne 0x10058edc
mov edx, ebp
lea ecx, [esp + 0x78]
call fcn.100574a0
movzx eax, ax
mov ecx, dword [esp + 0x1c]
cmp ax, word [ecx + 0x10]
jbe 0x10058f03
lea eax, [esp + 0x20]
mov edx, esi
push eax
push dword [esp + 0x1c]
call fcn.100516b0
mov eax, dword [esp + 0x28]
add esp, 8
mov dword [esp + 0x14], eax
jmp 0x10058f07
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10059266
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
inc ebp
cmp ebp, dword [esp + 0x78]
jl 0x10058dc0
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0xc4]
jmp 0x10058f33
mov ebp, dword [esp + 0x28]
lea eax, [ebp - 1]
xor edi, edi
test eax, eax
jle 0x1005907e
mov eax, dword [esp + edi*4 + 0xec]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
lea ecx, [ecx + eax*4]
mov ebp, dword [esp + edi*4 + 0xc4]
mov ebx, dword [esp + 0x64]
add ebx, dword [esp + 0x68]
movzx eax, word [edx + eax*2]
mov esi, dword [ecx]
mov dword [esp + 0x58], ebp
mov ebp, dword [esp + 0x4c]
movzx edx, bp
mov ebp, dword [esp + 0x58]
add edx, eax
cmp byte [ebp + 8], 0
jne 0x10058f91
mov ecx, dword [ebp + 0x38]
mov eax, dword [esi]
mov dword [ecx + 8], eax
jmp 0x10059035
cmp byte [esp + 0x13], 0
je 0x1005901c
lea eax, [esp + 0x128]
push eax
push dword [ecx - 4]
mov eax, dword [ebp + 0x50]
push ebp
call eax
mov edx, dword [esp + 0x138]
add esp, 0xc
mov ecx, dword [esp + 0x128]
mov esi, ebx
test edx, edx
ja 0x10059008
jb 0x10058fcb
cmp ecx, 0x7f
ja 0x10058fdd
mov eax, 1
and cl, 0x7f
mov byte [ebx + 4], cl
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x10059035
test edx, edx
ja 0x10059008
jb 0x10058feb
cmp ecx, 0x3fff
ja 0x10059008
mov eax, ecx
and cl, 0x7f
shrd eax, edx, 7
mov byte [ebx + 5], cl
or al, 0x80
mov byte [ebx + 4], al
mov eax, 2
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x10059035
push edx
push ecx
lea ecx, [ebx + 4]
call fcn.10042d90
add esp, 8
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x10059035
sub esi, 4
cmp eax, 4
jne 0x10059035
mov eax, dword [esp + 0x30]
push esi
push eax
mov eax, dword [eax + 0x4c]
call eax
add esp, 8
movzx edx, ax
add dword [esp + 0x68], edx
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x30]
push eax
push dword [ebp + 4]
push ebx
push edx
mov edx, dword [esp + 0x54]
push esi
lea edx, [edx + edi]
call fcn.10057250
mov ebx, dword [esp + 0x34]
add esp, 0x14
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x1005926a
mov ebp, dword [esp + 0x28]
inc edi
lea eax, [ebp - 1]
cmp edi, eax
jl 0x10058f40
mov esi, dword [esp + 0xc4]
mov edi, 1
sub edi, ebp
mov dword [esp + 0x40], edi
cmp edi, ebp
jge 0x10059177
mov ebp, dword [esp + 0xec]
nop dword [eax + eax]
mov eax, edi
lea ebx, [esp + 0x140]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
add ebx, ecx
cmp byte [ebx], 0
jne 0x1005915d
test edi, edi
jns 0x100590d3
mov eax, dword [esp + ecx*4 + 0x110]
cmp eax, dword [esp + ecx*4 + 0xe8]
jl 0x1005915d
test ecx, ecx
jne 0x100590df
xor edx, edx
mov esi, ebp
xor eax, eax
jmp 0x10059114
cmp ecx, dword [esp + 0x3c]
jge 0x100590f7
xor edx, edx
cmp byte [esp + 0x13], dl
sete dl
add edx, dword [esp + ecx*4 + 0x110]
jmp 0x100590fb
mov edx, dword [esp + 0x78]
mov esi, dword [esp + ecx*4 + 0xec]
xor eax, eax
cmp byte [esp + 0x13], al
sete al
add eax, dword [esp + ecx*4 + 0xe8]
sub esi, eax
lea edi, [ecx*4]
lea ecx, [esp + 0x78]
push ecx
mov ecx, dword [esp + edi + 0xc8]
push esi
push eax
call fcn.10057950
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
test eax, eax
jne 0x10059266
mov eax, dword [esp + edi + 0xc4]
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + edi + 0xd8]
mov edi, dword [esp + 0x40]
mov byte [ebx], 1
mov dword [eax + 0x14], ecx
inc edi
mov dword [esp + 0x40], edi
cmp edi, dword [esp + 0x28]
jl 0x100590a0
mov esi, dword [esp + 0xc4]
mov ebp, dword [esp + 0x28]
cmp dword [esp + 0x160], 0
je 0x100591e2
mov ebx, dword [esp + 0x30]
cmp word [ebx + 0x18], 0
jne 0x100591e2
movzx eax, byte [ebx + 9]
cmp eax, dword [esi + 0x14]
jg 0x100591e2
or edx, 0xffffffff
mov ecx, esi
call fcn.10051750
mov ecx, dword [esp + 0xc4]
mov edx, ebx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
call fcn.10057e70
mov eax, dword [esp + 0x24]
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10059238
mov ecx, dword [esp + 0xc4]
mov edx, ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
call fcn.100568a0
add esp, 4
mov dword [esp + 0x14], eax
jmp 0x10059238
mov ecx, dword [esp + 0x2c]
cmp byte [ecx + 0x11], 0
je 0x10059234
cmp word [esp + 0x4c], 0
jne 0x10059234
xor esi, esi
test ebp, ebp
jle 0x10059234
nop word [eax + eax]
mov eax, dword [esp + esi*4 + 0xc4]
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.10051100
mov ecx, dword [esp + 0x38]
inc esi
add esp, 0xc
cmp esi, ebp
jl 0x10059200
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x10059238
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x3c]
mov esi, ebp
cmp ebp, ebx
jge 0x10059266
mov ecx, dword [esp + esi*4 + 0xb8]
test eax, eax
jne 0x1005925d
push dword [ecx + 4]
mov edx, ecx
mov ecx, dword [ecx + 0x34]
call fcn.100568a0
add esp, 4
inc esi
cmp esi, ebx
jl 0x10059242
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x80]
test eax, eax
je 0x10058298
mov edx, eax
xor ecx, ecx
call fcn.1003eb40
jmp 0x10058298
call fcn.10047990
inc esi
cmp esi, ebp
jl 0x100582b0
mov ebp, dword [esp + 0x28]
xor esi, esi
test ebp, ebp
jle 0x100592c5
nop
mov ecx, dword [esp + esi*4 + 0xc4]
test ecx, ecx
je 0x100592c0
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x100592bb
call fcn.1004b400
jmp 0x100592c0
call fcn.10047990
inc esi
cmp esi, ebp
jl 0x100592a0
mov eax, ebx
mov ecx, dword [esp + 0x154]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100d8362
add esp, 0x148
ret