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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x3c], 0
and dl, 2
mov byte [ebp - 0x25], dl
mov eax, dword [edi]
lea ecx, [edi + 0x50]
mov dword [ebp - 0x24], eax
mov eax, dword [eax + 4]
mov dword [ebp - 0x2c], eax
movsx eax, byte [edi + 0x44]
mov dword [ebp - 0x38], eax
mov ebx, dword [edi + eax*4 + 0x78]
lea ecx, [ecx + eax*2]
mov dword [ebp - 0x44], ecx
movzx ecx, word [ecx]
mov dword [ebp - 0x30], ecx
mov eax, dword [ebx + 0x40]
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [ebx + 0x18]
movzx ecx, cx
and ecx, eax
add ecx, dword [ebx + 0x38]
mov dword [ebp - 0x34], ecx
test dl, dl
je 0x4d1ae0
cmp byte [ebx + 8], 0
je 0x4d1acf
push ecx
push ebx
call fcn.004c9c30
movzx esi, word [ebx + 0x14]
add esp, 8
movzx ecx, ax
add esi, 2
add esi, ecx
mov eax, 0xaaaaaaab
mov ecx, dword [ebp - 0x2c]
mov ecx, dword [ecx + 0x24]
add ecx, ecx
mul ecx
shr edx, 1
cmp esi, edx
jg 0x4d1acf
mov dword [ebp - 0x3c], 1
jmp 0x4d1ae0
mov ecx, edi
call fcn.004c9410
mov ecx, eax
test ecx, ecx
jne 0x4d1d47
cmp byte [ebx + 8], 0
jne 0x4d1b04
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push edi
call fcn.004ce5e0
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x4d1d47
test byte [edi + 0x40], 0x20
je 0x4d1b23
mov edx, dword [edi + 0x34]
mov ecx, dword [ebp - 0x2c]
push edi
call fcn.004c9510
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x4d1d47
cmp dword [edi + 0x48], 0
jne 0x4d1b65
mov ecx, dword [ebp - 0x24]
mov edx, dword [edi + 0x10]
mov esi, dword [edi + 0x14]
cmp byte [ecx + 0xb], 0
je 0x4d1b65
mov eax, dword [ecx + 4]
mov byte [ecx + 0xb], 0
mov eax, dword [eax + 8]
test eax, eax
je 0x4d1b65
test byte [eax + 0x40], 0x10
je 0x4d1b5e
mov byte [ecx + 0xb], 1
cmp dword [eax + 0x10], edx
jne 0x4d1b5e
cmp dword [eax + 0x14], esi
jne 0x4d1b5e
mov byte [eax + 0x42], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x4d1b46
mov ecx, dword [ebx + 0x48]
call fcn.004c5f80
mov ecx, eax
test ecx, ecx
jne 0x4d1d47
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x20]
push eax
mov ecx, ebx
call fcn.004cef40
mov edx, dword [ebp - 0x30]
add esp, 4
mov dword [ebp - 0x24], eax
mov ecx, ebx
lea eax, [ebp - 0x24]
push eax
movzx eax, word [ebp - 0xe]
push eax
call fcn.004cf3c0
mov ecx, dword [ebp - 0x24]
add esp, 8
test ecx, ecx
jne 0x4d1d47
cmp byte [ebx + 8], cl
jne 0x4d1c94
movsx eax, byte [edi + 0x44]
mov esi, dword [edi + eax*4 + 0x78]
mov eax, dword [ebp - 0x38]
movzx ecx, word [esi + 0x16]
mov eax, dword [edi + eax*4 + 0x7c]
mov edx, dword [esi + 0x38]
mov eax, dword [eax + 4]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [esi + 0x18]
movzx ecx, cx
and ecx, eax
lea eax, [edx + 4]
add ecx, edx
mov dword [ebp - 0x40], ecx
cmp ecx, eax
jae 0x4d1c26
push 0x6376e4
push 0x106fe
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.004ba090
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
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 [ebp - 8], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x50]
mov dword [ebp - 0x2c], eax
call fcn.004c5f80
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x4d1c73
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x34]
mov eax, dword [ebp - 8]
mov ecx, ebx
push dword [ebp - 0x2c]
add eax, 4
push eax
mov eax, dword [ebp - 0x40]
add eax, 0xfffffffc
push eax
call fcn.004cf4f0
add esp, 0x14
movzx edx, word [esi + 0x16]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
dec edx
mov ecx, esi
call fcn.004cf3c0
mov ecx, dword [ebp - 0x24]
add esp, 8
test ecx, ecx
jne 0x4d1d47
mov ecx, edi
call fcn.004d1390
mov ecx, eax
test ecx, ecx
jne 0x4d1d47
mov dl, byte [edi + 0x44]
mov esi, dword [ebp - 0x38]
movsx eax, dl
cmp eax, esi
jle 0x4d1ce1
movsx eax, dl
dec dl
mov ecx, dword [edi + eax*4 + 0x78]
mov byte [edi + 0x44], dl
test ecx, ecx
je 0x4d1ccd
mov ecx, dword [ecx + 0x48]
call fcn.004c5760
mov dl, byte [edi + 0x44]
movsx eax, dl
cmp eax, esi
jg 0x4d1cb2
mov ecx, edi
call fcn.004d1390
mov ecx, eax
test ecx, ecx
jne 0x4d1d47
cmp dword [ebp - 0x3c], 0
je 0x4d1d34
mov byte [edi + 0x42], 2
movzx eax, word [ebx + 0x16]
cmp dword [ebp - 0x30], eax
jb 0x4d1d1a
mov edx, dword [ebp - 0x44]
mov dword [edi + 0x3c], 0xffffffff
mov ax, word [ebx + 0x16]
dec ax
mov word [edx], ax
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x3c], 1
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.004cda60
cmp byte [ebp - 0x25], 0
mov ecx, eax
je 0x4d1d47
mov byte [edi + 0x42], 3
mov eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005b8427
mov esp, ebp
pop ebp
ret