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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x519008]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x28], 0
and dl, 2
mov byte [esp + 0xf], dl
cmp byte [edi], 3
mov eax, dword [edi + 8]
mov dword [esp + 0x18], eax
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
jne 0x4cd43a
call fcn.004d71c0
mov ecx, eax
test ecx, ecx
jne 0x4cd7bd
mov ebx, dword [edi + 0x74]
movsx eax, byte [edi + 0x44]
movzx ecx, word [edi + 0x46]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x1c], ecx
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]
cmp dword [ebx + 0x14], 0
mov dword [esp + 0x10], ecx
jge 0x4cd481
mov ecx, ebx
call fcn.004d5e00
test eax, eax
jne 0x4cd62a
mov ecx, dword [esp + 0x10]
cmp byte [esp + 0xf], 0
je 0x4cd4db
cmp byte [ebx + 8], 0
je 0x4cd4ca
push ecx
push ebx
call fcn.004d6b10
mov esi, dword [ebx + 0x14]
add esp, 8
movzx ecx, ax
add esi, 2
add esi, ecx
mov eax, 0xaaaaaaab
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 0x24]
add ecx, ecx
mul ecx
shr edx, 1
cmp esi, edx
jg 0x4cd4ca
cmp word [ebx + 0x18], 1
je 0x4cd4ca
mov dword [esp + 0x28], 1
jmp 0x4cd4db
mov ecx, edi
call fcn.004d7470
mov ecx, eax
test ecx, ecx
jne 0x4cd7bd
cmp byte [ebx + 8], 0
jne 0x4cd519
and byte [edi + 1], 0xf1
xor eax, eax
mov word [edi + 0x32], ax
cmp byte [edi], al
jne 0x4cd50a
movzx ecx, word [edi + 0x46]
test cx, cx
je 0x4cd50a
mov eax, dword [edi + 0x74]
cmp byte [eax + 8], 0
je 0x4cd50a
lea eax, [ecx - 1]
mov word [edi + 0x46], ax
jmp 0x4cd519
mov ecx, edi
call fcn.004d1850
test eax, eax
jne 0x4cd7bf
test byte [edi + 1], 0x20
je 0x4cd539
mov edx, dword [edi + 0x40]
mov ecx, dword [esp + 0x14]
push edi
call fcn.004d73f0
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x4cd7bd
cmp dword [edi + 0x70], 0
jne 0x4cd556
mov edx, dword [edi + 0x40]
mov ecx, dword [esp + 0x18]
push 0
push dword [edi + 0x24]
push dword [edi + 0x20]
call fcn.004d7620
add esp, 0xc
mov ecx, dword [ebx + 0x48]
call fcn.004dc4a0
mov ecx, eax
test ecx, ecx
jne 0x4cd7bd
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x30]
push eax
mov ecx, ebx
call fcn.004d0cc0
mov edx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x10], eax
mov ecx, ebx
lea eax, [esp + 0x10]
push eax
movzx eax, word [esp + 0x46]
push eax
call fcn.004d0830
mov ecx, dword [esp + 0x18]
add esp, 8
test ecx, ecx
jne 0x4cd7bd
cmp byte [ebx + 8], cl
jne 0x4cd6bc
mov esi, dword [edi + 0x74]
cmp dword [esi + 0x14], ecx
jge 0x4cd5c6
mov ecx, esi
call fcn.004d5e00
mov ecx, eax
test ecx, ecx
jne 0x4cd7bd
movsx eax, byte [edi + 0x44]
mov ecx, dword [esp + 0x24]
dec eax
cmp ecx, eax
jge 0x4cd5d9
mov eax, dword [edi + ecx*4 + 0x7c]
jmp 0x4cd5dc
mov eax, dword [edi + 0x74]
mov eax, dword [eax + 4]
movzx ecx, word [esi + 0x18]
mov edx, dword [esi + 0x38]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [esi + 0x1a]
movzx ecx, cx
and ecx, eax
lea eax, [edx + 4]
add ecx, edx
mov dword [esp + 0x2c], ecx
cmp ecx, eax
jae 0x4cd641
push 0x5133f4
push 0x119f6
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004ea8d0
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x4c]
push ecx
push esi
call eax
mov ecx, dword [esi + 0x48]
add esp, 8
movzx eax, ax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x50]
mov dword [esp + 0x14], eax
call fcn.004dc4a0
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4cd698
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, ebx
push dword [esp + 0x1c]
add eax, 4
push eax
mov eax, dword [esp + 0x3c]
add eax, 0xfffffffc
push eax
call fcn.004d05f0
add esp, 0x14
movzx edx, word [esi + 0x18]
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x1c]
dec edx
mov ecx, esi
call fcn.004d0830
mov ecx, dword [esp + 0x18]
add esp, 8
test ecx, ecx
jne 0x4cd7bd
mov ecx, edi
call fcn.004cdf20
mov ecx, eax
test ecx, ecx
jne 0x4cd7bd
movsx eax, byte [edi + 0x44]
mov esi, dword [esp + 0x24]
cmp eax, esi
jle 0x4cd746
mov eax, dword [edi + 0x74]
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x4cd6ec
call fcn.004dea00
jmp 0x4cd6f1
call fcn.004e38a0
mov cl, byte [edi + 0x44]
dec cl
movsx eax, cl
mov byte [edi + 0x44], cl
cmp eax, esi
jle 0x4cd72f
movsx eax, cl
dec cl
mov eax, dword [edi + eax*4 + 0x78]
mov byte [edi + 0x44], cl
test eax, eax
je 0x4cd725
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x4cd720
call fcn.004dea00
jmp 0x4cd725
call fcn.004e38a0
mov cl, byte [edi + 0x44]
movsx eax, cl
cmp eax, esi
jg 0x4cd700
movsx eax, cl
mov ecx, edi
mov eax, dword [edi + eax*4 + 0x78]
mov dword [edi + 0x74], eax
call fcn.004cdf20
mov ecx, eax
test ecx, ecx
jne 0x4cd7bd
cmp dword [esp + 0x28], 0
je 0x4cd79a
mov byte [edi], 2
movzx eax, word [ebx + 0x18]
cmp dword [esp + 0x1c], eax
jb 0x4cd77f
mov dword [edi + 4], 0xffffffff
mov ax, word [ebx + 0x18]
dec ax
mov word [edi + 0x46], ax
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret
mov dword [edi + 4], 1
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.004d22f0
cmp byte [esp + 0xf], 0
mov esi, eax
je 0x4cd7b4
mov ecx, edi
call fcn.004d7500
mov byte [edi], 3
lea ecx, [esi - 0x10]
neg ecx
sbb ecx, ecx
and ecx, esi
mov eax, ecx
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret