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

Disassembly:
sub esp, 0x148
mov eax, dword [0x10104008]
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, 0x101080ea
mov dword [esp + 0x30], ebx
mov edi, edx
mov dword [esp + 0x64], esi
call fcn.100de193
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 0x10058da4
lea eax, [esi + 7]
jmp 0x1005a0b7
movzx edx, word [ebx + 0x18]
movzx ecx, byte [ebx + 0xc]
lea esi, [ecx + edx]
cmp esi, 2
jae 0x10058db8
xor edi, edi
jmp 0x10058ddd
test edi, edi
je 0x10058dcf
cmp edi, esi
jne 0x10058dce
mov eax, dword [esp + 0x164]
lea edi, [eax - 2]
add edi, esi
jmp 0x10058dd6
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 0x10058e00
movzx ecx, byte [ebx + 9]
add ecx, 8
jmp 0x10058e14
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 0x10058e65
push 0x100f9e64
push 0x102e0
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
mov ebx, 0xb
add esp, 0x14
mov dword [esp + 0x14], ebx
jmp 0x10058ee8
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 0x10058ee4
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 8]
mov dword [esp + edi + 0xb8], eax
cmp byte [eax], 0
jne 0x10058edc
push dword [esp + 0x2c]
mov edx, ebx
call fcn.10053310
mov ecx, dword [esp + edi + 0xbc]
add esp, 4
call fcn.10053110
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x10058edc
mov ecx, dword [esp + edi + 0xb8]
test ecx, ecx
je 0x10058ee8
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x10058ed5
call fcn.1004c0e0
jmp 0x10058ee8
call fcn.10048660
jmp 0x10058ee8
xor ebx, ebx
mov dword [esp + 0x14], ebx
jmp 0x10058ee8
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x10059072
mov ecx, dword [esp + edi + 0xb8]
cmp dword [ecx + 0x14], ebx
jge 0x10058f17
call fcn.10052ed0
mov ebx, eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x10059046
mov ecx, esi
sub edi, 4
dec esi
test ecx, ecx
je 0x100590c6
mov ebx, dword [esp + 0x30]
mov dl, byte [ebx + 0xc]
test dl, dl
je 0x10058f79
mov eax, dword [esp + 0x44]
movzx ecx, word [ebx + 0x1c]
add eax, esi
cmp eax, ecx
jne 0x10058f79
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 0x10058e30
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 0x1005901f
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 0x1005904f
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 0x10059023
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.10057ed0
mov ebx, dword [esp + 0x40]
add esp, 8
jmp 0x10058e30
lea eax, [esi*4]
jmp 0x10059075
push 0x100f9e64
push 0x1182d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
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 0x1005a085
nop word [eax + eax]
mov ecx, dword [esp + esi*4 + 0xb8]
test ecx, ecx
je 0x1005a07c
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x1005a077
call fcn.1004c0e0
jmp 0x1005a07c
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.1003f3a0
mov esi, eax
add esp, 8
mov dword [esp + 0x80], esi
test esi, esi
jne 0x10059110
lea ebx, [eax + 7]
jmp 0x10059088
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 0x1005938c
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 0x1005957f
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 0x10059262
movzx edx, word [ebx + 0x1c]
cmp dword [esp + 0x6c], edx
jb 0x10059557
test edx, edx
je 0x1005922b
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 0x100591f4
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 0x10059262
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 0x10059240
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 0x100592c4
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 0x10059290
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 0x1005937d
cmp byte [esp + 0x13], 0
jne 0x1005937d
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 0x1005934d
mov eax, dword [ebx + 0x38]
mov ecx, dword [esi + edi*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x10059374
cmp word [edx + edi*2], 4
jae 0x10059374
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 0x10059360
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 0x10059160
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 0x10059489
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 0x100593f5
cmp edx, dword [esp + ecx*4 + 0x9c]
jne 0x100593f5
dec ecx
mov dword [esp + 0x24], ecx
cmp byte [esp + 0x13], 0
jne 0x10059419
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 0x10059468
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 0x10059437
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 0x100593c0
mov dword [esp + 0x24], 0
mov edx, eax
mov dword [esp + 0x1c], edx
test eax, eax
jle 0x100596fc
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 0x100595cd
nop
cmp ebx, edx
jl 0x100594ed
lea edx, [ebx + 1]
mov dword [esp + 0x1c], edx
cmp edx, 5
jg 0x100596ac
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 0x1005951c
mov edx, ebx
lea ecx, [esp + 0x78]
call fcn.100582a0
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 0x100595a9
cmp edi, dword [esp + 0x78]
jge 0x100595a7
movzx eax, word [ecx + edi*2]
test ax, ax
jne 0x1005954f
mov edx, edi
lea ecx, [esp + 0x78]
call fcn.100582a0
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x100595a9
push 0x100f9e64
push 0x11888
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
add esp, 0x14
mov ebx, 0xb
jmp 0x1005a05a
push 0x100f9e64
push 0x11870
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
add esp, 0x14
mov ebx, 0xb
jmp 0x1005a05a
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 0x100594c0
mov edi, dword [esp + ebp + 0xec]
cmp edi, ecx
jge 0x10059668
mov edx, dword [esp + 0x84]
movzx eax, word [edx + edi*2]
test ax, ax
jne 0x10059605
mov edx, edi
lea ecx, [esp + 0x78]
call fcn.100582a0
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 0x1005968c
inc edi
mov dword [esp + ebp + 0xd8], esi
cmp byte [esp + 0x13], 0
mov dword [esp + ebp + 0xec], edi
jne 0x10059659
cmp edi, ecx
jge 0x10059657
movzx eax, word [edx + edi*2]
test ax, ax
jne 0x1005964f
mov edx, edi
lea ecx, [esp + 0x78]
call fcn.100582a0
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x84]
movzx eax, ax
movzx eax, ax
add eax, 2
jmp 0x10059659
xor eax, eax
sub dword [esp + ebp + 0xdc], eax
cmp edi, ecx
jl 0x100595e3
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 0x100596fc
mov edi, dword [esp + 0x34]
jmp 0x100594b0
cmp edi, ecx
jge 0x10059668
cmp dword [esp + 0x24], 0
jle 0x100596a0
mov eax, dword [esp + ebp + 0xe8]
jmp 0x100596a2
xor eax, eax
cmp edi, eax
jle 0x100596d4
mov edx, dword [esp + 0x1c]
jmp 0x1005966e
push 0x100f9e64
push 0x118ed
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
add esp, 0x14
mov ebx, 0xb
jmp 0x1005a05a
push 0x100f9e64
push 0x1190e
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
add esp, 0x14
mov ebx, 0xb
jmp 0x1005a05a
lea eax, [edx - 1]
mov ecx, eax
mov dword [esp + 0x38], eax
test ecx, ecx
jle 0x10059862
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 0x10059777
lea ecx, [esp + 0x78]
call fcn.100582a0
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 0x10059791
mov edx, esi
lea ecx, [esp + 0x78]
call fcn.100582a0
test edi, edi
je 0x100597db
cmp dword [esp + 0x164], 0
mov edx, ebx
jne 0x10059821
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 0x10059821
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 0x10059770
jmp 0x10059825
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 0x1005984b
mov esi, dword [esp + 0x18]
lea eax, [ecx*4]
mov eax, dword [esi + eax - 4]
jmp 0x1005984d
xor eax, eax
cmp edx, eax
jle 0x100598cc
dec ecx
mov dword [esp + 0x38], ecx
test ecx, ecx
jg 0x10059710
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 0x100599ce
mov edi, dword [esp + 0x48]
cmp esi, dword [esp + 0x3c]
jge 0x10059936
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 0x100598f8
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x100598f8
cmp dword [edx + 0x60], 0
je 0x100598f4
call fcn.1004c690
jmp 0x1005991d
push 0x100f9e64
push 0x11938
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
add esp, 0x14
mov ebx, 0xb
jmp 0x1005a05a
xor eax, eax
jmp 0x1005991d
mov eax, dword [edx + 0x28]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10059921
mov eax, dword [edx + 0x94]
cmp eax, dword [edx + 0x98]
jbe 0x10059918
call fcn.1004dd20
jmp 0x1005991d
call fcn.1004db30
mov dword [esp + 0x14], eax
inc dword [esp + 0x28]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x1005a056
jmp 0x100599c3
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.10056f80
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
test eax, eax
jne 0x1005a056
mov edi, dword [esp + 0x18]
mov edx, ebx
mov ecx, edi
call fcn.10053230
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 0x100599bf
mov edx, dword [edi + 4]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x34]
push dword [eax + 4]
push 5
call fcn.10051e10
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1005a056
mov edi, dword [esp + 0x5c]
inc esi
cmp esi, dword [esp + 0x1c]
jl 0x10059884
mov ebp, dword [esp + 0x28]
xor ecx, ecx
test ebp, ebp
jle 0x10059a27
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 0x10059a22
nop dword [eax]
cmp dword [esp + eax*4 + 0x128], edx
je 0x10059be0
inc eax
cmp eax, ecx
jl 0x10059a10
inc ecx
cmp ecx, ebp
jl 0x100599e0
xor ebx, ebx
test ebp, ebp
jle 0x10059b1a
xor edi, edi
lea edx, [edi + 1]
cmp ebp, edx
jle 0x10059a5a
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 0x10059a40
mov ebp, dword [esp + edi*4 + 0x100]
mov dword [esp + 0x18], ebp
mov dword [esp + edi*4 + 0x100], 0xffffffff
cmp edi, ebx
je 0x10059b0d
jle 0x10059ac3
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 [0x101040d0]
mov al, byte [ebp + 0x1c]
add esp, 0x10
and al, 0xa
mov dword [ebp + 0x18], esi
cmp al, 0xa
jne 0x10059abf
mov dl, 3
mov ecx, ebp
call fcn.10048490
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 [0x101040d0]
mov al, byte [esi + 0x1c]
add esp, 0x10
and al, 0xa
mov dword [esi + 0x18], ebp
cmp al, 0xa
jne 0x10059b03
mov dl, 3
mov ecx, esi
call fcn.10048490
mov eax, dword [esp + ebx*4 + 0xc4]
mov dword [eax + 4], ebp
mov ebp, dword [esp + 0x28]
inc ebx
cmp ebx, ebp
jl 0x10059a31
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 0x10059b63
mov ecx, dword [esp + 0x3c]
cmp ecx, ebp
je 0x10059b63
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 0x10059d16
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 0x10059d1f
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 0x10059c2d
xor edx, edx
cmp byte [esp + 0x13], dl
sete dl
nop dword [eax + eax]
inc edi
cmp edi, dword [esp + 0x28]
jge 0x10059c08
mov esi, dword [esp + edi*4 + 0xc4]
jmp 0x10059c0f
push 0x100f9e64
push 0x11982
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10042300
add esp, 0x14
mov ebx, 0xb
jmp 0x1005a05a
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 0x10059bd0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
cmp ebp, dword [esp + edx + 0xec]
jne 0x10059c60
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 0x10059d03
cmp edi, dword [esp + 0x28]
jge 0x10059c84
mov eax, dword [eax + 4]
cmp eax, dword [esp + edi*4 + 0x128]
mov eax, dword [esp + 0x1c]
jne 0x10059c84
cmp ecx, dword [esi + 0x38]
jb 0x10059c84
cmp ecx, dword [esi + 0x3c]
jb 0x10059d03
cmp word [esp + 0x4c], 0
jne 0x10059cae
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.10051e10
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 0x10059ccc
mov edx, ebp
lea ecx, [esp + 0x78]
call fcn.100582a0
movzx eax, ax
mov ecx, dword [esp + 0x1c]
cmp ax, word [ecx + 0x10]
jbe 0x10059cf3
lea eax, [esp + 0x20]
mov edx, esi
push eax
push dword [esp + 0x1c]
call fcn.100523c0
mov eax, dword [esp + 0x28]
add esp, 8
mov dword [esp + 0x14], eax
jmp 0x10059cf7
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x1005a056
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
inc ebp
cmp ebp, dword [esp + 0x78]
jl 0x10059bb0
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0xc4]
jmp 0x10059d23
mov ebp, dword [esp + 0x28]
lea eax, [ebp - 1]
xor edi, edi
test eax, eax
jle 0x10059e6e
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 0x10059d81
mov ecx, dword [ebp + 0x38]
mov eax, dword [esi]
mov dword [ecx + 8], eax
jmp 0x10059e25
cmp byte [esp + 0x13], 0
je 0x10059e0c
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 0x10059df8
jb 0x10059dbb
cmp ecx, 0x7f
ja 0x10059dcd
mov eax, 1
and cl, 0x7f
mov byte [ebx + 4], cl
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x10059e25
test edx, edx
ja 0x10059df8
jb 0x10059ddb
cmp ecx, 0x3fff
ja 0x10059df8
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 0x10059e25
push edx
push ecx
lea ecx, [ebx + 4]
call fcn.10043a50
add esp, 8
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x10059e25
sub esi, 4
cmp eax, 4
jne 0x10059e25
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.10058000
mov ebx, dword [esp + 0x34]
add esp, 0x14
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x1005a05a
mov ebp, dword [esp + 0x28]
inc edi
lea eax, [ebp - 1]
cmp edi, eax
jl 0x10059d30
mov esi, dword [esp + 0xc4]
mov edi, 1
sub edi, ebp
mov dword [esp + 0x40], edi
cmp edi, ebp
jge 0x10059f67
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 0x10059f4d
test edi, edi
jns 0x10059ec3
mov eax, dword [esp + ecx*4 + 0x110]
cmp eax, dword [esp + ecx*4 + 0xe8]
jl 0x10059f4d
test ecx, ecx
jne 0x10059ecf
xor edx, edx
mov esi, ebp
xor eax, eax
jmp 0x10059f04
cmp ecx, dword [esp + 0x3c]
jge 0x10059ee7
xor edx, edx
cmp byte [esp + 0x13], dl
sete dl
add edx, dword [esp + ecx*4 + 0x110]
jmp 0x10059eeb
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.10058730
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
test eax, eax
jne 0x1005a056
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 0x10059e90
mov esi, dword [esp + 0xc4]
mov ebp, dword [esp + 0x28]
cmp dword [esp + 0x160], 0
je 0x10059fd2
mov ebx, dword [esp + 0x30]
cmp word [ebx + 0x18], 0
jne 0x10059fd2
movzx eax, byte [ebx + 9]
cmp eax, dword [esi + 0x14]
jg 0x10059fd2
or edx, 0xffffffff
mov ecx, esi
call fcn.10052460
mov ecx, dword [esp + 0xc4]
mov edx, ebx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
call fcn.10058c60
mov eax, dword [esp + 0x24]
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1005a028
mov ecx, dword [esp + 0xc4]
mov edx, ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x34]
call fcn.10057650
add esp, 4
mov dword [esp + 0x14], eax
jmp 0x1005a028
mov ecx, dword [esp + 0x2c]
cmp byte [ecx + 0x11], 0
je 0x1005a024
cmp word [esp + 0x4c], 0
jne 0x1005a024
xor esi, esi
test ebp, ebp
jle 0x1005a024
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.10051e10
mov ecx, dword [esp + 0x38]
inc esi
add esp, 0xc
cmp esi, ebp
jl 0x10059ff0
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x1005a028
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x3c]
mov esi, ebp
cmp ebp, ebx
jge 0x1005a056
mov ecx, dword [esp + esi*4 + 0xb8]
test eax, eax
jne 0x1005a04d
push dword [ecx + 4]
mov edx, ecx
mov ecx, dword [ecx + 0x34]
call fcn.10057650
add esp, 4
inc esi
cmp esi, ebx
jl 0x1005a032
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x80]
test eax, eax
je 0x10059088
mov edx, eax
xor ecx, ecx
call fcn.1003f6f0
jmp 0x10059088
call fcn.10048660
inc esi
cmp esi, ebp
jl 0x100590a0
mov ebp, dword [esp + 0x28]
xor esi, esi
test ebp, ebp
jle 0x1005a0b5
nop
mov ecx, dword [esp + esi*4 + 0xc4]
test ecx, ecx
je 0x1005a0b0
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x1005a0ab
call fcn.1004c0e0
jmp 0x1005a0b0
call fcn.10048660
inc esi
cmp esi, ebp
jl 0x1005a090
mov eax, ebx
mov ecx, dword [esp + 0x154]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100dcb60
add esp, 0x148
ret