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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x7c], 0
mov eax, dword [ebx + 0x34]
mov dword [ebp - 0xf0], 0
mov byte [ebp - 0xec], 0
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0x28], eax
jne 0x4be5ed
mov eax, 7
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, word [ebx + 0x18]
movzx edx, byte [ebx + 0xc]
push esi
push edi
lea edi, [edx + ecx]
cmp edi, 2
jae 0x4be603
xor esi, esi
jmp 0x4be629
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4be60e
xor esi, esi
jmp 0x4be61f
cmp eax, edi
jne 0x4be61c
mov eax, dword [ebp + 0x18]
lea esi, [eax - 2]
add esi, edi
jmp 0x4be622
lea esi, [eax - 1]
mov eax, dword [ebp + 0x18]
mov edi, 2
sub edi, eax
lea eax, [edi + 1]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x2c], eax
mov eax, esi
sub eax, edx
mov dword [ebp - 0x58], edi
lea edx, [eax + edi]
cmp edx, ecx
jne 0x4be649
movzx ecx, byte [ebx + 9]
add ecx, 8
jmp 0x4be65d
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]
lea ebx, [edi*4]
mov dword [ebp - 0x50], ecx
mov eax, dword [ecx]
bswap eax
mov dword [ebp - 0x24], eax
mov esi, eax
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x28]
cmp esi, dword [eax + 0x2c]
jbe 0x4be6a9
push 0x58b964
push 0x102e0
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
mov esi, 0xb
add esp, 0x14
mov dword [ebp - 8], esi
jmp 0x4be72e
mov eax, dword [eax]
lea ecx, [ebp - 0x20]
push 0
push ecx
push esi
push eax
mov eax, dword [eax + 0xcc]
call eax
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4be72b
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 8]
mov dword [ebp + ebx - 0x4c], eax
cmp byte [eax], 0
jne 0x4be724
mov ecx, dword [edx + 8]
cmp esi, dword [ecx + 4]
je 0x4be6ff
mov eax, dword [edx + 4]
cmp esi, 1
mov dword [ecx + 0x38], eax
mov eax, dword [ebp - 0x28]
mov dword [ecx + 0x34], eax
setne al
dec al
mov dword [ecx + 0x48], edx
and al, 0x64
mov dword [ecx + 4], esi
mov byte [ecx + 9], al
mov eax, dword [ebp + ebx - 0x4c]
push eax
call fcn.004c0a80
mov esi, eax
add esp, 4
mov dword [ebp - 8], esi
test esi, esi
je 0x4be724
mov eax, dword [ebp + ebx - 0x4c]
test eax, eax
je 0x4be72e
push eax
call fcn.004da370
add esp, 4
jmp 0x4be72e
xor esi, esi
mov dword [ebp - 8], esi
jmp 0x4be72e
mov esi, dword [ebp - 8]
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x4bf838
mov eax, dword [ebp + ebx - 0x4c]
cmp dword [eax + 0x14], esi
jge 0x4be75b
push eax
call fcn.004c0050
mov esi, eax
add esp, 4
mov dword [ebp - 8], esi
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x4be86f
mov ecx, edi
sub ebx, 4
dec edi
test ecx, ecx
je 0x4be8b4
mov esi, dword [ebp + 8]
mov dl, byte [esi + 0xc]
test dl, dl
je 0x4be7b7
mov ecx, dword [ebp - 0x38]
movzx eax, word [esi + 0x1c]
add ecx, edi
cmp ecx, eax
jne 0x4be7b7
mov eax, dword [esi + 0x24]
push eax
mov dword [ebp + ebx - 0xfc], eax
mov esi, dword [eax]
mov eax, dword [ebp + 8]
bswap esi
push eax
mov dword [ebp - 0x24], esi
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0x5c], esi
call eax
movzx eax, ax
add esp, 8
mov dword [ebp + ebx - 0xd4], eax
mov eax, dword [ebp + 8]
mov byte [eax + 0xc], 0
jmp 0x4be676
mov ecx, dword [ebp - 0x38]
movzx eax, dl
sub ecx, eax
mov eax, dword [esi + 0x40]
add ecx, edi
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [esi + 0x1a]
mov esi, dword [esi + 0x38]
movzx ecx, cx
and ecx, eax
add esi, ecx
push esi
mov dword [ebp + ebx - 0xfc], esi
mov eax, dword [esi]
bswap eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [eax + 0x4c]
call eax
movzx edx, ax
add esp, 8
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], edx
mov dword [ebp + ebx - 0xd4], edx
test byte [eax + 0x16], 0xc
je 0x4be84a
mov eax, dword [ebp + 8]
mov ecx, esi
sub ecx, dword [eax + 0x38]
lea eax, [edx + ecx]
mov edx, dword [ebp - 0x28]
cmp eax, dword [edx + 0x24]
mov edx, dword [ebp - 0x18]
jg 0x4be87b
mov eax, dword [ebp + 0x10]
push edx
add eax, ecx
push esi
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 8]
add esp, 0xc
mov edx, dword [ebp - 0x18]
sub esi, dword [eax + 0x38]
add esi, dword [ebp + 0x10]
mov dword [ebp + ebx - 0xfc], esi
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x1c]
push eax
push edx
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0xc]
sub ecx, eax
add ecx, edi
push ecx
push edx
call fcn.004c75d0
mov esi, dword [ebp - 0x30]
add esp, 0x10
jmp 0x4be676
lea eax, [edi*4]
jmp 0x4bf83b
push 0x58b964
push 0x1182d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
lea eax, [ebx + 4]
mov dword [ebp - 8], 0xb
push eax
lea eax, [ebp - 0x4c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0x20
jmp 0x4bf84a
mov eax, dword [ebp - 0x28]
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 [ebp - 0x2c]
add edi, 3
and edi, 0xfffffffc
lea ebx, [edi + edi*2]
lea eax, [esi + ebx*2]
cdq
push edx
push eax
call fcn.004f7ed0
mov esi, eax
add esp, 8
mov dword [ebp - 0xb8], esi
test esi, esi
jne 0x4be8ff
mov dword [ebp - 8], 7
jmp 0x4bf84a
mov ecx, dword [ebp - 0x4c]
lea eax, [esi + edi*4]
mov dword [ebp - 0xb4], eax
lea eax, [esi + ebx*2]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xbc], ecx
movzx eax, byte [ecx + 8]
shl ax, 2
movzx eax, ax
mov dword [ebp - 0x40], eax
mov al, byte [ecx + 3]
mov byte [ebp - 1], al
movzx eax, al
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x2c], eax
jle 0x4beb6a
nop
shl eax, 2
mov dword [ebp - 0x54], eax
mov ebx, dword [ebp + eax - 0x4c]
mov dword [ebp - 0x30], 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 [ebp - 0x80], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x14], edi
mov ecx, dword [eax + 0x38]
mov al, byte [edi]
mov dword [ebp - 0x18], esi
cmp al, byte [ecx]
jne 0x4bed4a
movzx eax, byte [ebx + 0xc]
mov ecx, dword [ebp - 0xb4]
add eax, edx
add eax, eax
push eax
mov eax, dword [ebp - 0xc0]
push 0
lea eax, [ecx + eax*2]
push eax
call sub.msvcrt.dll_memset
mov al, byte [ebx + 0xc]
add esp, 0xc
test al, al
je 0x4bea2f
movzx edx, word [ebx + 0x1c]
cmp dword [ebp - 0x74], edx
jb 0x4bed35
test edx, edx
je 0x4be9fc
mov ebx, dword [ebp - 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 [ebp - 0xc0]
add ecx, edi
mov edi, dword [ebp - 0xb8]
mov dword [edi + eax*4], ecx
inc eax
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0xc0], eax
sub edx, 1
jne 0x4be9c1
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x18], esi
mov al, byte [ebx + 0xc]
xor edx, edx
test al, al
je 0x4bea2f
mov edi, dword [ebp - 0xc0]
lea ecx, [ebx + 0x24]
mov esi, dword [ebp - 0xb8]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
mov dword [esi + edi*4], eax
inc edx
movzx eax, byte [ebx + 0xc]
inc edi
cmp edx, eax
jl 0x4bea11
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0xc0], edi
mov edi, dword [ebp - 0x14]
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 0x4bea8d
mov ebx, dword [ebp - 0x14]
mov ax, word [esi]
lea esi, [esi + 2]
mov ch, al
inc edx
mov cl, ah
mov eax, dword [ebp - 0x80]
movzx eax, ax
movzx ecx, cx
and ecx, eax
mov eax, dword [ebp - 0xc0]
add ecx, ebx
mov ebx, dword [ebp - 0xb8]
mov dword [ebx + eax*4], ecx
inc eax
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0xc0], eax
cmp edx, edi
jb 0x4bea53
mov ebx, dword [ebp - 0x30]
jmp 0x4bea93
mov eax, dword [ebp - 0xc0]
mov edx, dword [ebp - 0x54]
mov dword [ebp + edx - 0x128], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x58]
jge 0x4beb5d
cmp byte [ebp - 1], 0
jne 0x4beb5d
mov ecx, dword [ebp - 0xc0]
mov esi, dword [ebp - 0xb4]
movzx eax, word [ebp + edx - 0xd4]
mov edi, dword [ebp - 0x34]
push eax
push dword [ebp + edx - 0xfc]
mov word [esi + ecx*2], ax
mov esi, dword [ebp - 0x20]
add esi, edi
add edi, eax
push esi
mov dword [ebp - 0x34], edi
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x40]
add esp, 0xc
mov ecx, dword [ebp - 0xc0]
mov edx, dword [ebp - 0xb4]
movzx eax, ax
add eax, esi
mov esi, dword [ebp - 0xb8]
mov dword [esi + ecx*4], eax
mov eax, ecx
mov ecx, dword [ebp - 0x40]
sub word [edx + eax*2], cx
cmp byte [ebx + 8], 0
jne 0x4beb2e
mov ecx, dword [ebp - 0xc0]
mov eax, dword [ebx + 0x38]
mov ecx, dword [esi + ecx*4]
mov eax, dword [eax + 8]
mov dword [ecx], eax
mov eax, dword [ebp - 0xc0]
jmp 0x4beb53
cmp word [edx + eax*2], 4
jae 0x4beb53
mov ecx, dword [ebp - 0x20]
nop dword [eax + eax]
mov byte [ecx + edi], 0
inc edi
inc word [edx + eax*2]
cmp word [edx + eax*2], 4
jb 0x4beb40
mov dword [ebp - 0x34], edi
inc eax
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x2c]
jl 0x4be940
mov eax, dword [ebp - 0x40]
xor ecx, ecx
movzx edi, ax
xor ebx, ebx
mov eax, dword [ebp - 0x28]
add edi, 0xfffffff4
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ebx
mov eax, dword [eax + 0x24]
add edi, eax
mov dword [ebp - 0x34], edi
cmp dword [ebp - 0x2c], ecx
jle 0x4bec51
mov esi, dword [ebp + ebx*4 - 0x4c]
mov edx, dword [ebp + ebx*4 - 0x128]
mov dword [ebp - 0x54], edx
mov eax, dword [esi + 0x3c]
mov dword [ebp + ecx*4 - 0xb0], eax
mov dword [ebp + ecx*4 - 0x98], edx
test ecx, ecx
je 0x4bebc1
cmp edx, dword [ebp + ecx*4 - 0x9c]
jne 0x4bebc1
dec ecx
mov dword [ebp - 0x14], ecx
cmp byte [ebp - 1], 0
jne 0x4bebe2
mov eax, dword [ebp + 8]
inc ecx
mov dword [ebp - 0x14], ecx
mov eax, dword [eax + 0x3c]
mov dword [ebp + ecx*4 - 0xb0], eax
lea eax, [edx + 1]
mov dword [ebp + ecx*4 - 0x98], eax
sub edi, dword [esi + 0x14]
lea eax, [ebp - 0xd4]
cmp byte [esi + 0xc], 0
lea eax, [eax + ebx*4]
mov dword [ebp - 0x58], eax
mov dword [eax], edi
mov dword [ebp - 0x20], 0
jbe 0x4bec36
lea ebx, [esi + 0x24]
push dword [ebx]
mov eax, dword [esi + 0x4c]
push esi
call eax
mov ecx, dword [ebp - 0x20]
lea ebx, [ebx + 4]
movzx eax, ax
inc ecx
add eax, 2
mov dword [ebp - 0x20], ecx
add edi, eax
add esp, 8
movzx eax, byte [esi + 0xc]
cmp ecx, eax
jl 0x4bec03
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x54]
mov ebx, dword [ebp - 0x18]
mov dword [eax], edi
mov edi, dword [ebp - 0x34]
inc ecx
mov dword [ebp + ebx*4 - 0xe8], edx
inc ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ecx
cmp ebx, dword [ebp - 0x2c]
jl 0x4beb91
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x30], 0
test ecx, ecx
jle 0x4beed9
mov ecx, dword [ebp - 0xc0]
mov ebx, 1
xor edx, edx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edx
nop dword [eax + eax]
mov esi, dword [ebp + edx - 0xd4]
cmp esi, edi
jle 0x4bed99
nop
cmp ebx, eax
jl 0x4becbc
lea eax, [ebx + 1]
mov dword [ebp - 0x10], eax
cmp eax, 5
jg 0x4bee85
mov dword [ebp + edx - 0xd0], 0
mov esi, dword [ebp + edx - 0xd4]
mov dword [ebp + edx - 0xe4], ecx
mov edi, dword [ebp + edx - 0xe8]
mov ecx, dword [ebp - 0xb4]
lea ebx, [edi - 1]
movzx eax, word [ecx + ebx*2]
test ax, ax
jne 0x4becf1
lea eax, [ebp - 0xc0]
push ebx
push eax
call fcn.004c4400
mov edx, dword [ebp - 0x14]
add esp, 8
mov ecx, dword [ebp - 0xb4]
movzx eax, ax
movzx eax, ax
add eax, 2
sub esi, eax
cmp byte [ebp - 1], 0
mov dword [ebp + edx - 0xd4], esi
jne 0x4bed76
cmp edi, dword [ebp - 0xc0]
jge 0x4bed74
movzx eax, word [ecx + edi*2]
test ax, ax
jne 0x4bed2a
lea eax, [ebp - 0xc0]
push edi
push eax
call fcn.004c4400
add esp, 8
movzx eax, ax
mov edx, dword [ebp - 0x14]
movzx eax, ax
add eax, 2
jmp 0x4bed76
push 0x11888
call fcn.004e7050
add esp, 4
mov dword [ebp - 8], eax
jmp 0x4bf7d4
push 0x58b964
push 0x11870
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
add esp, 0x14
mov dword [ebp - 8], 0xb
jmp 0x4bf7d4
xor eax, eax
add dword [ebp + edx - 0xd0], eax
mov ecx, dword [ebp - 0xc0]
mov eax, dword [ebp - 0x10]
mov dword [ebp + edx - 0xe8], ebx
mov ebx, dword [ebp - 0x18]
cmp esi, dword [ebp - 0x34]
jg 0x4bec90
mov edi, dword [ebp + edx - 0xe8]
cmp edi, ecx
jge 0x4bee45
nop dword [eax + eax]
mov eax, dword [ebp - 0xb4]
movzx eax, word [eax + edi*2]
test ax, ax
jne 0x4beddb
lea eax, [ebp - 0xc0]
push edi
push eax
call fcn.004c4400
mov ecx, dword [ebp - 0xc0]
add esp, 8
mov edx, dword [ebp - 0x14]
movzx eax, ax
movzx eax, ax
add eax, 2
add esi, eax
cmp esi, dword [ebp - 0x34]
jg 0x4bee67
inc edi
mov dword [ebp + edx - 0xd4], esi
cmp byte [ebp - 1], 0
mov dword [ebp + edx - 0xe8], edi
jne 0x4bee36
cmp edi, ecx
jge 0x4bee34
mov eax, dword [ebp - 0xb4]
movzx eax, word [eax + edi*2]
test ax, ax
jne 0x4bee29
lea eax, [ebp - 0xc0]
push edi
push eax
call fcn.004c4400
mov ecx, dword [ebp - 0xc0]
add esp, 8
movzx eax, ax
mov edx, dword [ebp - 0x14]
movzx eax, ax
add eax, 2
jmp 0x4bee36
xor eax, eax
sub dword [ebp + edx - 0xd0], eax
cmp edi, ecx
jl 0x4bedb0
mov eax, ebx
mov dword [ebp - 0x10], eax
mov edi, dword [ebp - 0x30]
add edx, 4
inc edi
mov dword [ebp - 0x14], edx
inc ebx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x18], ebx
cmp edi, eax
jge 0x4beed9
mov edi, dword [ebp - 0x34]
jmp 0x4bec80
cmp edi, ecx
jge 0x4bee45
cmp dword [ebp - 0x30], 0
jle 0x4bee7a
mov eax, dword [ebp + edx - 0xec]
jmp 0x4bee7c
xor eax, eax
cmp edi, eax
jle 0x4beeaf
mov eax, dword [ebp - 0x10]
jmp 0x4bee4a
push 0x58b964
push 0x118ed
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
add esp, 0x14
mov dword [ebp - 8], 0xb
jmp 0x4bf7d4
push 0x58b964
push 0x1190e
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
add esp, 0x14
mov dword [ebp - 8], 0xb
jmp 0x4bf7d4
dec eax
mov ecx, eax
mov dword [ebp - 0x30], eax
test ecx, ecx
jle 0x4bf02e
nop word [eax + eax]
shl ecx, 2
lea eax, [ebp - 0xd4]
add eax, ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x78], eax
mov edi, dword [eax]
lea eax, [ebp + ecx - 0xd8]
mov dword [ebp - 0x74], eax
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xe8]
sub eax, 4
mov dword [ebp - 0x20], eax
mov ebx, dword [eax + ecx]
mov ecx, dword [ebp - 0xb4]
lea esi, [ebx - 1]
mov eax, esi
sub eax, dword [ebp - 0x3c]
inc eax
cmp word [ecx + eax*2], 0
lea ecx, [ecx + eax*2]
mov dword [ebp - 0x18], ecx
jne 0x4bef50
push eax
lea eax, [ebp - 0xc0]
push eax
call fcn.004c4400
add esp, 8
nop dword [eax]
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x54], esi
cmp word [eax + esi*2], 0
jne 0x4bef73
lea eax, [ebp - 0xc0]
push esi
push eax
call fcn.004c4400
add esp, 8
test edi, edi
je 0x4befb3
cmp dword [ebp + 0x18], 0
mov edx, ebx
jne 0x4beff7
mov ecx, dword [ebp - 0x10]
mov eax, 2
dec ecx
cmp dword [ebp - 0x30], ecx
mov ecx, 0
cmove eax, ecx
mov ecx, dword [ebp - 0x14]
sub ecx, eax
mov eax, dword [ebp - 0xb4]
movzx eax, word [eax + esi*2]
sub ecx, eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax]
add eax, 2
add eax, edi
cmp eax, ecx
jg 0x4beff7
mov edx, dword [ebp - 0x18]
mov ecx, 0xfffffffe
mov ebx, dword [ebp - 0x20]
movzx eax, word [edx]
sub edx, 2
add eax, 2
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x80]
add edi, eax
mov eax, dword [ebp - 0xb4]
movzx eax, word [eax + esi*2]
sub ecx, eax
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x14], eax
mov dword [ebx + ecx], esi
sub esi, 1
mov ebx, dword [ebp - 0x54]
jns 0x4bef50
jmp 0x4beffa
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x78]
mov dword [ecx], edi
mov ecx, dword [ebp - 0x74]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x30]
cmp ecx, 1
jle 0x4bf01c
mov ebx, dword [ebp - 0x20]
lea eax, [ecx*4]
mov eax, dword [eax + ebx - 4]
jmp 0x4bf01e
xor eax, eax
cmp edx, eax
jle 0x4bf08e
dec ecx
mov dword [ebp - 0x30], ecx
test ecx, ecx
jg 0x4beef0
mov eax, dword [ebp - 0x4c]
xor esi, esi
mov eax, dword [eax + 0x38]
movzx ebx, byte [eax]
lea eax, [esi + 1]
mov dword [ebp - 0x3c], ebx
cmp dword [ebp - 0x10], esi
jle 0x4bf196
nop dword [eax + eax]
cmp esi, dword [ebp - 0x2c]
jge 0x4bf0fe
mov eax, dword [ebp + esi*4 - 0x4c]
mov dword [ebp + esi*4 - 0x70], eax
mov dword [ebp + esi*4 - 0x4c], 0
mov dword [ebp - 0x20], eax
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x4bf0bc
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x4bf0bc
cmp dword [edx + 0x60], 0
je 0x4bf0b8
push ecx
call fcn.0051c100
jmp 0x4bf0e1
push 0x58b964
push 0x11938
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
add esp, 0x14
mov dword [ebp - 8], 0xb
jmp 0x4bf7d4
xor eax, eax
jmp 0x4bf0e4
mov eax, dword [edx + 0x28]
mov dword [ebp - 8], eax
test eax, eax
jne 0x4bf0e7
mov eax, dword [edx + 0x94]
push ecx
cmp eax, dword [edx + 0x98]
jbe 0x4bf0dc
call fcn.004d6000
jmp 0x4bf0e1
call fcn.004d71b0
add esp, 4
mov dword [ebp - 8], eax
mov edi, dword [ebp - 0xc]
inc edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], edi
test eax, eax
jne 0x4bf7d4
jmp 0x4bf185
cmp dword [ebp + 0x18], 0
mov ecx, dword [ebp - 0x24]
push 0
cmovne ecx, eax
lea eax, [ebp - 0x5c]
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x28]
call fcn.004bc480
add esp, 0x14
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4bf7d4
mov edi, dword [ebp - 0x20]
push ebx
push edi
call fcn.0052f630
mov ecx, dword [ebp - 0x28]
add esp, 8
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc0]
mov dword [ebp + esi*4 - 0x70], edi
cmp byte [ecx + 0x11], 0
mov dword [ebp + esi*4 - 0x128], eax
je 0x4bf17c
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 4]
push 5
push dword [edi + 4]
push ecx
call fcn.004d8fe0
mov eax, dword [ebp - 0x1c]
add esp, 0x14
mov dword [ebp - 8], eax
test eax, eax
jne 0x4bf7d4
mov eax, dword [ebp - 0x5c]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
inc esi
mov eax, 1
cmp esi, dword [ebp - 0x10]
jl 0x4bf050
jmp 0x4bf198
xor edi, edi
xor ecx, ecx
test edi, edi
jle 0x4bf1e7
nop
mov eax, dword [ebp + ecx*4 - 0x70]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x48]
mov dword [ebp + ecx*4 - 0x13c], edx
mov dword [ebp + ecx*4 - 0x110], edx
mov ax, word [eax + 0x1c]
mov word [ebp + ecx*2 - 0xfc], ax
xor eax, eax
test ecx, ecx
jle 0x4bf1e2
nop word [eax + eax]
cmp dword [ebp + eax*4 - 0x13c], edx
je 0x4bf32c
inc eax
cmp eax, ecx
jl 0x4bf1d0
inc ecx
cmp ecx, edi
jl 0x4bf1a0
mov ecx, dword [ebp - 0xc]
xor edi, edi
test ecx, ecx
jle 0x4bf288
mov ebx, ecx
xor esi, esi
lea edx, [esi + 1]
cmp ebx, edx
jle 0x4bf21a
nop
mov eax, dword [ebp + edx*4 - 0x110]
mov ecx, edx
cmp eax, dword [ebp + esi*4 - 0x110]
cmovae ecx, esi
inc edx
mov esi, ecx
cmp edx, ebx
jl 0x4bf200
mov ebx, dword [ebp + esi*4 - 0x110]
mov dword [ebp + esi*4 - 0x110], 0xffffffff
cmp esi, edi
je 0x4bf276
jle 0x4bf252
mov eax, dword [ebp - 0x28]
xor edx, edx
mov ecx, dword [eax + 0x2c]
mov eax, dword [ebp + esi*4 - 0x70]
inc ecx
add ecx, esi
push ecx
mov eax, dword [eax + 0x48]
push eax
mov word [eax + 0x1c], dx
call fcn.004fb080
add esp, 8
mov eax, dword [ebp + edi*4 - 0x70]
push ebx
mov ecx, dword [eax + 0x48]
mov ax, word [ebp + esi*2 - 0xfc]
push ecx
mov word [ecx + 0x1c], ax
call fcn.004fb080
mov eax, dword [ebp + edi*4 - 0x70]
add esp, 8
mov dword [eax + 4], ebx
mov ebx, dword [ebp - 0xc]
inc edi
cmp edi, ebx
jl 0x4bf1f6
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + ecx*4 - 0x74]
mov edx, dword [ebp - 0x50]
mov eax, dword [eax + 4]
bswap eax
mov dword [edx], eax
test bl, 8
jne 0x4bf2bf
mov edx, dword [ebp - 0x2c]
cmp edx, ecx
je 0x4bf2bf
lea eax, [ebp - 0x70]
lea esi, [ebp - 0x4c]
cmovge eax, esi
mov eax, dword [eax + edx*4 - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [ebp + ecx*4 - 0x74]
mov ecx, dword [eax + 0x38]
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x28]
cmp byte [eax + 0x11], 0
je 0x4bf4a1
mov esi, dword [ebp - 0x70]
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x50], 0
movzx edx, word [esi + 0x18]
movzx eax, byte [esi + 0xc]
add edx, eax
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0xc0], ebx
jle 0x4bf4a4
mov eax, esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], eax
nop dword [eax + eax]
mov ecx, dword [ebp - 0xb8]
mov ecx, dword [ecx + ebx*4]
mov dword [ebp - 0x18], ecx
cmp ebx, edx
jne 0x4bf376
xor eax, eax
cmp byte [ebp - 1], al
sete al
mov dword [ebp - 0x3c], eax
nop dword [eax + eax]
inc edi
cmp edi, dword [ebp - 0xc]
jge 0x4bf356
mov esi, dword [ebp + edi*4 - 0x70]
jmp 0x4bf35a
push 0x58b964
push 0x11982
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
add esp, 0x14
mov dword [ebp - 8], 0xb
jmp 0x4bf7d4
mov esi, dword [ebp + edi*4 - 0x4c]
movzx eax, word [esi + 0x18]
add eax, dword [ebp - 0x3c]
movzx ecx, byte [esi + 0xc]
add ecx, eax
add edx, ecx
cmp ebx, edx
je 0x4bf320
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x20]
cmp ebx, dword [ebp + edx - 0xe8]
mov edx, dword [ebp - 0x24]
jne 0x4bf3a3
mov eax, dword [ebp - 0x50]
inc eax
mov dword [ebp - 0x50], eax
shl eax, 2
cmp byte [ebp - 1], 0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + eax - 0x70]
mov dword [ebp - 0x10], eax
je 0x4bf494
cmp edi, dword [ebp - 0xc]
jge 0x4bf3c5
mov eax, dword [eax + 4]
cmp eax, dword [ebp + edi*4 - 0x13c]
mov eax, dword [ebp - 0x10]
jne 0x4bf3c5
cmp ecx, dword [esi + 0x38]
jb 0x4bf3c5
cmp ecx, dword [esi + 0x3c]
jb 0x4bf494
cmp word [ebp - 0x40], 0
jne 0x4bf3eb
lea edx, [ebp - 0x1c]
push edx
push dword [eax + 4]
mov eax, dword [ecx]
push 5
bswap eax
push eax
push dword [ebp - 0x28]
call fcn.004d8fe0
mov eax, dword [ebp - 0x1c]
add esp, 0x14
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xb4]
movzx eax, word [eax + ebx*2]
test ax, ax
jne 0x4bf40d
lea eax, [ebp - 0xc0]
push ebx
push eax
call fcn.004c4400
add esp, 8
movzx eax, ax
mov ecx, dword [ebp - 0x10]
cmp ax, word [ecx + 0x10]
jbe 0x4bf483
cmp dword [ebp - 8], 0
jne 0x4bf7d4
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x18]
mov eax, dword [ecx + 0x50]
push ecx
call eax
movzx eax, word [ebp - 0x104]
add esp, 0xc
cmp eax, dword [ebp - 0x108]
jae 0x4bf48e
mov edx, dword [esi + 0x3c]
mov ecx, dword [ebp - 0x18]
cmp edx, ecx
jb 0x4bf456
add eax, ecx
cmp edx, eax
jb 0x4bf50b
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
push eax
movzx eax, word [ebp - 0x102]
push dword [edx + 4]
mov eax, dword [eax + ecx - 4]
push 3
bswap eax
push eax
push dword [edx + 0x34]
call fcn.004d8fe0
mov eax, dword [ebp - 0x1c]
add esp, 0x14
mov dword [ebp - 8], eax
jmp 0x4bf486
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4bf7d4
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
inc ebx
cmp ebx, dword [ebp - 0xc0]
jl 0x4bf300
mov esi, dword [ebp - 0x70]
mov eax, dword [ebp - 0xc]
xor edi, edi
dec eax
test eax, eax
jle 0x4bf615
nop dword [eax]
nop word [eax + eax]
mov eax, dword [ebp + edi*4 - 0xe8]
mov edx, dword [ebp - 0xb8]
mov esi, dword [edx + eax*4]
lea edx, [edx + eax*4]
mov ecx, dword [ebp + edi*4 - 0x70]
mov ebx, dword [ebp - 0x7c]
add ebx, dword [ebp + 0x10]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0xb4]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x40]
movzx eax, word [edx + eax*2]
movzx edx, cx
mov ecx, dword [ebp - 0x24]
add edx, eax
cmp byte [ecx + 8], 0
jne 0x4bf535
mov ecx, dword [ecx + 0x38]
mov eax, dword [esi]
mov dword [ecx + 8], eax
jmp 0x4bf5d6
push 0x58b964
push 0xffc8
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004b6bd0
add esp, 0x14
mov dword [ebp - 8], 0xb
jmp 0x4bf7d4
cmp byte [ebp - 1], 0
je 0x4bf5be
lea eax, [ebp - 0x140]
push eax
mov eax, dword [ebp - 0x3c]
push dword [eax - 4]
mov eax, dword [ecx + 0x50]
push ecx
call eax
mov edx, dword [ebp - 0x13c]
mov esi, ebx
mov ecx, dword [ebp - 0x140]
add esp, 0xc
add ebx, 4
test edx, edx
ja 0x4bf5ac
jb 0x4bf571
cmp ecx, 0x7f
ja 0x4bf582
mov eax, 1
and cl, 0x7f
mov byte [ebx], cl
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x4bf5d6
test edx, edx
ja 0x4bf5ac
jb 0x4bf590
cmp ecx, 0x3fff
ja 0x4bf5ac
mov eax, ecx
and cl, 0x7f
shrd eax, edx, 7
mov byte [ebx + 1], cl
or al, 0x80
mov byte [ebx], al
mov eax, 2
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x4bf5d6
push edx
push ecx
push ebx
call fcn.004d96a0
add esp, 0xc
xor ebx, ebx
lea edx, [eax + 4]
jmp 0x4bf5d6
sub esi, 4
cmp eax, 4
jne 0x4bf5d9
mov eax, dword [ebp + 8]
push esi
push eax
mov eax, dword [eax + 0x4c]
call eax
add esp, 8
movzx edx, ax
mov ecx, dword [ebp - 0x24]
add dword [ebp - 0x7c], edx
lea eax, [ebp - 0x1c]
push eax
push dword [ecx + 4]
mov eax, dword [ebp - 0x38]
push ebx
push edx
push esi
add eax, edi
push eax
push dword [ebp + 8]
call fcn.004cfd10
mov esi, dword [ebp - 0x1c]
add esp, 0x1c
mov dword [ebp - 8], esi
test esi, esi
jne 0x4bf7d4
mov eax, dword [ebp - 0xc]
inc edi
dec eax
cmp edi, eax
jl 0x4bf4c0
mov esi, dword [ebp - 0x70]
mov edi, 1
sub edi, dword [ebp - 0xc]
mov dword [ebp + 0x10], edi
cmp edi, dword [ebp - 0xc]
jge 0x4bf6fa
nop dword [eax]
mov eax, edi
lea ebx, [ebp - 0xf0]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
add ebx, ecx
cmp byte [ebx], 0
jne 0x4bf6ea
test edi, edi
jns 0x4bf662
mov eax, dword [ebp + ecx*4 - 0x12c]
cmp eax, dword [ebp + ecx*4 - 0xec]
jl 0x4bf6ea
test ecx, ecx
jne 0x4bf672
mov esi, dword [ebp - 0xe8]
xor eax, eax
xor edx, edx
jmp 0x4bf6a6
cmp ecx, dword [ebp - 0x2c]
jge 0x4bf688
xor eax, eax
cmp byte [ebp - 1], al
sete al
add eax, dword [ebp + ecx*4 - 0x12c]
jmp 0x4bf68e
mov eax, dword [ebp - 0xc0]
mov esi, dword [ebp + ecx*4 - 0xe8]
xor edx, edx
cmp byte [ebp - 1], dl
sete dl
add edx, dword [ebp + ecx*4 - 0xec]
sub esi, edx
lea edi, [ecx*4]
lea ecx, [ebp - 0xc0]
push ecx
push esi
push edx
push eax
push dword [ebp + edi - 0x70]
call fcn.004c77b0
mov ecx, eax
add esp, 0x14
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], ecx
test ecx, ecx
jne 0x4bf7d4
mov eax, dword [ebp + edi - 0x70]
mov ecx, dword [ebp - 0x34]
sub ecx, dword [ebp + edi - 0xd4]
mov edi, dword [ebp + 0x10]
mov byte [ebx], 1
mov dword [eax + 0x14], ecx
inc edi
mov dword [ebp + 0x10], edi
cmp edi, dword [ebp - 0xc]
jl 0x4bf630
mov esi, dword [ebp - 0x70]
cmp dword [ebp + 0x14], 0
je 0x4bf751
mov ebx, dword [ebp + 8]
cmp word [ebx + 0x18], 0
jne 0x4bf751
movzx eax, byte [ebx + 9]
cmp eax, dword [esi + 0x14]
jg 0x4bf751
push 0xffffffffffffffff
push esi
call fcn.004c67e0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp - 0x70]
call fcn.004c5c80
mov ecx, dword [ebp - 0x1c]
add esp, 0x14
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x4bf7a7
mov eax, dword [ebp - 0x70]
push dword [eax + 4]
push eax
push dword [eax + 0x34]
call fcn.004ccd40
mov ecx, eax
add esp, 0xc
mov dword [ebp - 8], ecx
jmp 0x4bf7a7
mov ecx, dword [ebp - 0x28]
cmp byte [ecx + 0x11], 0
je 0x4bf7a4
cmp word [ebp - 0x40], 0
mov edi, dword [ebp - 0xc]
jne 0x4bf79f
xor esi, esi
test edi, edi
jle 0x4bf79f
nop word [eax + eax]
mov eax, dword [ebp + esi*4 - 0x70]
lea edx, [ebp - 0x1c]
push edx
push dword [eax + 4]
mov eax, dword [eax + 0x38]
push 5
mov eax, dword [eax + 8]
bswap eax
push eax
push ecx
call fcn.004d8fe0
mov ecx, dword [ebp - 0x28]
inc esi
add esp, 0x14
cmp esi, edi
jl 0x4bf770
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
jmp 0x4bf7aa
mov ecx, dword [ebp - 8]
jmp 0x4bf7aa
mov ecx, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x2c]
mov esi, edi
cmp edi, ebx
jge 0x4bf7d4
mov eax, dword [ebp + esi*4 - 0x4c]
test ecx, ecx
jne 0x4bf7cc
push dword [eax + 4]
push eax
push dword [eax + 0x34]
call fcn.004ccd40
add esp, 0xc
mov ecx, eax
inc esi
cmp esi, ebx
jl 0x4bf7b3
mov dword [ebp - 8], ecx
mov ebx, dword [ebp - 0xb8]
test ebx, ebx
je 0x4bf84a
cmp dword [0x5b2c38], 0
je 0x4bf82c
mov eax, dword [0x5b8bb0]
test eax, eax
je 0x4bf7fa
push eax
call dword [0x5b2c88]
add esp, 4
push ebx
call dword [0x5b2c64]
sub dword [0x5b8b50], eax
dec dword [0x5b8b74]
push ebx
call dword [0x5b2c5c]
mov eax, dword [0x5b8bb0]
add esp, 8
test eax, eax
je 0x4bf84a
push eax
call dword [0x5b2c90]
add esp, 4
jmp 0x4bf84a
push ebx
call dword [0x5b2c5c]
add esp, 4
jmp 0x4bf84a
lea eax, [ebx + 4]
push eax
lea eax, [ebp - 0x4c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
xor ebx, ebx
cmp dword [ebp - 0x2c], ebx
jle 0x4bf8b0
mov edx, dword [ebp + ebx*4 - 0x4c]
test edx, edx
je 0x4bf8aa
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x4bf8a1
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.00531b30
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x4bf8aa
push edx
call fcn.004fb120
add esp, 4
inc ebx
cmp ebx, dword [ebp - 0x2c]
jl 0x4bf851
xor ebx, ebx
cmp dword [ebp - 0xc], ebx
jle 0x4bf916
mov edx, dword [ebp + ebx*4 - 0x70]
test edx, edx
je 0x4bf910
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x4bf907
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.00531b30
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x4bf910
push edx
call fcn.004fb120
add esp, 4
inc ebx
cmp ebx, dword [ebp - 0xc]
jl 0x4bf8b7
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret