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

Disassembly:
sub esp, 0x2c
push edi
mov edi, dword [esp + 0x34]
mov eax, dword [edi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
mov al, byte [edi]
test al, al
je 0x4e9a19
cmp al, 3
jb 0x4e9a5c
push edi
call fcn.004ae110
add esp, 4
test eax, eax
jne 0x4e9de2
cmp byte [edi], al
jne 0x4e9de2
movzx ecx, word [edi + 0x46]
push ebx
mov ebx, dword [edi + 0x74]
push ebp
movsx ebp, byte [edi + 0x44]
mov dword [esp + 0x10], ecx
movzx eax, word [ebx + 0x18]
cmp eax, ecx
jg 0x4e9a84
push 0x57fe2c
push 0x126ca
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004a3470
add esp, 0x14
mov eax, 0xb
pop ebp
pop ebx
pop edi
add esp, 0x2c
ret
push 0x57fe2c
push 0x126c1
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004a3470
add esp, 0x14
mov eax, 0xb
pop edi
add esp, 0x2c
ret
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]
cmp dword [ebx + 0x14], 0
mov dword [esp + 0x3c], ecx
jge 0x4e9ae0
push ebx
call fcn.004ac8b0
add esp, 4
test eax, eax
je 0x4e9adc
push 0x57fe2c
push 0x126ce
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004a3470
add esp, 0x14
mov eax, 0xb
pop ebp
pop ebx
pop edi
add esp, 0x2c
ret
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
shr al, 1
and al, 1
push esi
mov dword [esp + 0x44], eax
je 0x4e9b3f
cmp byte [ebx + 8], 0
je 0x4e9b2e
push ecx
push ebx
call fcn.004ae4f0
mov esi, dword [ebx + 0x14]
add esp, 8
movzx ecx, ax
add esi, 2
add esi, ecx
mov eax, 0xaaaaaaab
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 0x28]
add ecx, ecx
mul ecx
shr edx, 1
cmp esi, edx
jg 0x4e9b2e
cmp word [ebx + 0x18], 1
je 0x4e9b2e
mov byte [esp + 0x44], 2
jmp 0x4e9b3f
push edi
call fcn.004e2e10
add esp, 4
test eax, eax
jne 0x4e9ddf
cmp byte [ebx + 8], 0
jne 0x4e9b58
push 0
push edi
call fcn.004eba40
add esp, 8
test eax, eax
jne 0x4e9ddf
test byte [edi + 1], 0x20
je 0x4e9b76
push edi
push dword [edi + 0x40]
push dword [esp + 0x18]
call fcn.004e2dc0
add esp, 0xc
test eax, eax
jne 0x4e9ddf
cmp dword [edi + 0x70], 0
jne 0x4e9b9a
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0xb], 0
je 0x4e9b9a
push 0
push dword [edi + 0x24]
push dword [edi + 0x20]
push dword [edi + 0x40]
push eax
call fcn.004d00e0
add esp, 0x14
push dword [ebx + 0x48]
call fcn.0050aa80
add esp, 4
test eax, eax
jne 0x4e9ddf
mov esi, dword [esp + 0x40]
lea eax, [esp + 0x24]
push eax
mov eax, dword [ebx + 0x50]
push esi
push ebx
call eax
movzx eax, word [esp + 0x40]
add esp, 0xc
cmp eax, dword [esp + 0x30]
je 0x4e9be0
lea eax, [esp + 0x24]
push eax
push esi
push ebx
call fcn.004af180
add esp, 0xc
mov dword [esp + 0x40], eax
jmp 0x4e9be8
mov dword [esp + 0x40], 0
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x40]
push eax
movzx eax, word [esp + 0x3a]
push eax
push esi
push ebx
call fcn.004b54d0
mov eax, dword [esp + 0x50]
add esp, 0x10
test eax, eax
jne 0x4e9ddf
cmp byte [ebx + 8], al
jne 0x4e9d04
mov esi, dword [edi + 0x74]
cmp dword [esi + 0x14], eax
jge 0x4e9c2f
push esi
call fcn.004ac8b0
add esp, 4
test eax, eax
jne 0x4e9ddf
movsx eax, byte [edi + 0x44]
dec eax
cmp ebp, eax
jge 0x4e9c3e
mov eax, dword [edi + ebp*4 + 0x7c]
jmp 0x4e9c41
mov eax, dword [edi + 0x74]
mov eax, dword [eax + 4]
movzx ecx, word [esi + 0x18]
mov edx, dword [esi + 0x38]
mov dword [esp + 0x18], 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 + 0x20], ecx
cmp ecx, eax
jae 0x4e9c86
push 0x12728
call fcn.004ef5d0
add esp, 4
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x2c
ret
mov eax, dword [esi + 0x4c]
push ecx
push esi
call eax
push dword [esi + 0x48]
movzx eax, ax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x54]
mov dword [esp + 0x1c], eax
call fcn.0050aa80
add esp, 0xc
mov dword [esp + 0x40], eax
test eax, eax
jne 0x4e9cdc
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push dword [esp + 0x18]
add eax, 4
push eax
mov eax, dword [esp + 0x30]
add eax, 0xfffffffc
push eax
push dword [esp + 0x28]
push ebx
call fcn.004cfdf0
add esp, 0x1c
lea eax, [esp + 0x40]
push eax
movzx eax, word [esi + 0x18]
push dword [esp + 0x20]
dec eax
push eax
push esi
call fcn.004b54d0
mov eax, dword [esp + 0x50]
add esp, 0x10
test eax, eax
jne 0x4e9ddf
mov esi, dword [esp + 0x14]
push edi
call fcn.004aa7a0
mov edx, eax
add esp, 4
test edx, edx
jne 0x4e9ddd
movsx ecx, byte [edi + 0x44]
cmp ecx, ebp
jle 0x4e9d78
mov eax, dword [edi + 0x74]
push dword [eax + 0x48]
call fcn.0050a990
dec byte [edi + 0x44]
add esp, 4
movsx eax, byte [edi + 0x44]
cmp eax, ebp
jle 0x4e9d5e
mov cl, byte [edi + 0x44]
movsx eax, cl
dec cl
mov eax, dword [edi + eax*4 + 0x78]
mov byte [edi + 0x44], cl
test eax, eax
je 0x4e9d56
push dword [eax + 0x48]
call fcn.0050a990
add esp, 4
movsx eax, byte [edi + 0x44]
cmp eax, ebp
jg 0x4e9d38
movsx eax, byte [edi + 0x44]
push edi
mov eax, dword [edi + eax*4 + 0x78]
mov dword [edi + 0x74], eax
call fcn.004aa7a0
mov edx, eax
add esp, 4
test edx, edx
jne 0x4e9ddd
cmp byte [esp + 0x44], 1
jbe 0x4e9db6
mov byte [edi], 2
movzx eax, word [ebx + 0x18]
cmp esi, eax
jl 0x4e9da5
pop esi
mov dword [edi + 4], 0xffffffff
mov ax, word [ebx + 0x18]
pop ebp
dec ax
mov word [edi + 0x46], ax
mov eax, edx
pop ebx
pop edi
add esp, 0x2c
ret
pop esi
pop ebp
pop ebx
mov dword [edi + 4], 1
mov eax, edx
pop edi
add esp, 0x2c
ret
push edi
call fcn.004d5870
add esp, 4
mov esi, eax
cmp byte [esp + 0x44], 0
je 0x4e9dd4
push edi
call fcn.004ae010
add esp, 4
mov byte [edi], 3
lea edx, [esi - 0x10]
neg edx
sbb edx, edx
and edx, esi
mov eax, edx
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x2c
ret