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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x49], 1
jne 0x4ea017
mov dl, byte [edi + 0x48]
test dl, 2
je 0x4ea017
mov eax, dword [edi + 0x78]
cmp byte [eax + 2], 0
je 0x4ea017
mov eax, dword [edi + 0x18]
mov esi, dword [ebp + 0x10]
mov ecx, dword [edi + 0x1c]
cmp eax, esi
jne 0x4e9ff6
cmp ecx, dword [ebp + 0x14]
jne 0x4e9ff6
mov ecx, dword [ebp + 0x1c]
pop edi
mov dword [ecx], 0
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
test dl, 8
je 0x4ea017
cmp ecx, dword [ebp + 0x14]
jg 0x4ea017
jl 0x4ea006
cmp eax, esi
jae 0x4ea017
mov edx, dword [ebp + 0x1c]
pop edi
mov dword [edx], 0xffffffff
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x4ea02e
mov eax, esi
call fcn.004cd394
mov dword [ebp - 0x10], eax
mov byte [esi + 7], 0
jmp 0x4ea035
mov dword [ebp - 0x10], 0
mov eax, edi
call fcn.004e9d46
test eax, eax
jne 0x4ea47d
cmp byte [edi + 0x49], al
jne 0x4ea05a
mov eax, dword [ebp + 0x1c]
pop edi
mov dword [eax], 0xffffffff
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 1
sub ecx, dword [ebp + 0x18]
push ebx
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ebx, dword [edx + eax*4 + 0x78]
movzx esi, word [ebx + 0x12]
mov edi, dword [ebp - 0x10]
dec esi
mov dword [ebp - 0xc], esi
sar esi, cl
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0
mov word [edx + eax*2 + 0x4e], si
test edi, edi
jne 0x4ea1a1
mov ecx, dword [ebx + 0x40]
movzx eax, byte [ecx + esi*2 + 1]
movzx ecx, byte [ecx + esi*2]
shl ecx, 8
or eax, ecx
movzx ecx, word [ebx + 0x14]
and eax, ecx
add eax, dword [ebx + 0x38]
movzx ecx, byte [ebx + 7]
add eax, ecx
cmp byte [ebx + 3], 0
je 0x4ea0d2
cmp byte [eax], 0x80
jb 0x4ea0d1
mov ecx, dword [ebx + 0x3c]
inc eax
cmp eax, ecx
jae 0x4ea3d8
cmp byte [eax], 0x80
jae 0x4ea0c3
inc eax
lea edi, [ebp - 0x28]
call fcn.0049cc04
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x28]
cmp ecx, eax
jg 0x4ea155
jl 0x4ea0ee
cmp edx, dword [ebp + 0x10]
jae 0x4ea14a
lea eax, [esi + 1]
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0xc]
jle 0x4ea160
mov dword [ebp - 8], 0xffffffff
cmp byte [ebx + 5], 0
jne 0x4ea423
movzx ecx, word [ebx + 0x12]
mov eax, dword [ebp - 4]
cmp eax, ecx
jl 0x4ea376
movzx edx, byte [ebx + 6]
mov eax, dword [ebx + 0x38]
movzx ebx, byte [edx + eax + 8]
movzx ecx, byte [edx + eax + 9]
lea eax, [edx + eax + 8]
movzx edx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edx
shl ebx, 8
or ebx, eax
jmp 0x4ea3b0
cmp ecx, eax
jl 0x4ea179
jg 0x4ea155
cmp edx, dword [ebp + 0x10]
jbe 0x4ea179
lea eax, [esi - 1]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 4], eax
jg 0x4ea170
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
lea esi, [esi + eax]
sar esi, 1
jmp 0x4ea095
mov dword [ebp - 8], 1
jmp 0x4ea100
mov eax, dword [ebp + 8]
or byte [eax + 0x48], 2
mov dword [eax + 0x1c], ecx
movsx ecx, word [eax + 0x4c]
mov dword [eax + 0x18], edx
mov word [eax + ecx*2 + 0x4e], si
cmp byte [ebx + 5], 0
jne 0x4ea3fd
mov dword [ebp - 4], esi
jmp 0x4ea10a
mov edx, dword [ebx + 0x40]
movzx eax, byte [edx + esi*2 + 1]
lea ecx, [edx + esi*2]
movzx ecx, byte [ecx]
movzx edx, byte [ebx + 7]
shl ecx, 8
or eax, ecx
movzx ecx, word [ebx + 0x14]
and eax, ecx
add eax, edx
add eax, dword [ebx + 0x38]
movzx edx, byte [ebx + 8]
movzx ecx, byte [eax]
cmp ecx, edx
jg 0x4ea1e2
mov edx, dword [ebp + 0xc]
push edx
inc eax
push eax
push ecx
call edi
add esp, 0xc
mov dword [ebp - 8], eax
jmp 0x4ea340
mov dl, byte [eax + 1]
test dl, dl
js 0x4ea212
and ecx, 0x7f
movzx edx, dl
shl ecx, 7
add ecx, edx
movzx edx, word [ebx + 0xa]
cmp ecx, edx
jg 0x4ea212
mov edx, dword [ebp + 0xc]
push edx
add eax, 2
push eax
push ecx
call edi
add esp, 0xc
mov dword [ebp - 8], eax
jmp 0x4ea340
movzx ecx, byte [ebx + 7]
mov edi, dword [ebp + 8]
sub eax, ecx
push eax
push ebx
lea eax, [edi + 0x18]
call fcn.004a0964
mov edi, dword [edi + 0x18]
mov eax, edi
cdq
mov dword [ebp - 0x1c], edi
add esp, 8
mov edi, eax
or eax, edx
je 0x4ea40f
test edx, edx
ja 0x4ea40f
jb 0x4ea251
cmp edi, 0x7fffff00
jae 0x4ea40f
cmp dword [0x564600], 0
je 0x4ea322
mov eax, dword [0x56a338]
test eax, eax
je 0x4ea271
push eax
call dword [0x564654]
add esp, 4
lea ebx, [ebp - 0x14]
mov eax, edi
call fcn.004a83b6
mov eax, dword [0x56a338]
test eax, eax
je 0x4ea28e
push eax
call dword [0x56465c]
add esp, 4
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4ea40f
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
movsx ecx, word [eax + 0x4c]
push 2
push edi
push edx
push 0
push eax
mov word [eax + ecx*2 + 0x4e], si
call fcn.004e51f6
add esp, 0x14
mov dword [ebp - 8], eax
test eax, eax
jne 0x4ea418
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
push eax
push edi
push ecx
call dword [ebp - 0x10]
add esp, 0xc
cmp dword [0x564600], 0
mov dword [ebp - 8], eax
je 0x4ea336
mov eax, dword [0x56a338]
test eax, eax
je 0x4ea2f3
push eax
call dword [0x564654]
add esp, 4
push edi
call dword [0x564630]
sub dword [0x56a1d8], eax
dec dword [0x56a1fc]
push edi
call dword [0x564628]
mov eax, dword [0x56a338]
add esp, 8
test eax, eax
je 0x4ea340
push eax
call dword [0x56465c]
jmp 0x4ea33d
push edi
call dword [0x564624]
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
jmp 0x4ea294
push edi
call dword [0x564628]
add esp, 4
mov eax, dword [ebp - 8]
test eax, eax
jns 0x4ea34f
lea edx, [esi + 1]
mov dword [ebp - 4], edx
jmp 0x4ea35b
jle 0x4ea440
lea eax, [esi - 1]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jg 0x4ea100
mov edi, dword [ebp - 0x10]
lea esi, [eax + ecx]
sar esi, 1
jmp 0x4ea1a1
mov ecx, dword [ebx + 0x40]
movzx edx, byte [ecx + eax*2]
lea ecx, [ecx + eax*2]
movzx eax, byte [ecx + 1]
movzx ecx, word [ebx + 0x14]
shl edx, 8
or eax, edx
and eax, ecx
add eax, dword [ebx + 0x38]
movzx ebx, byte [eax]
movzx edx, byte [eax + 1]
movzx ecx, byte [eax + 2]
shl ebx, 8
or ebx, edx
movzx edx, byte [eax + 3]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edx
mov esi, dword [ebp + 8]
movsx eax, word [esi + 0x4c]
mov cx, word [ebp - 4]
mov word [esi + eax*2 + 0x4e], cx
call fcn.004e9cab
mov dword [ebp - 8], eax
test eax, eax
jne 0x4ea46c
mov ecx, dword [ebp - 0x20]
jmp 0x4ea066
push 0x53f3a4
push 0xe257
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.004bd709
add esp, 0x10
pop ebx
pop edi
mov eax, 0xb
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x1c]
mov dword [edx], 0
mov dword [ebp - 8], 0
jmp 0x4ea46c
mov dword [ebp - 8], 7
jmp 0x4ea46c
push edi
call fcn.0049bf1c
add esp, 4
jmp 0x4ea46c
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x4c]
mov edx, dword [ebp + 0x1c]
mov word [eax + ecx*2 + 0x4e], si
mov eax, dword [ebp - 8]
mov dword [edx], eax
mov dword [ebp - 8], 0
jmp 0x4ea46c
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], 0
movsx edx, word [eax + 0x4c]
mov word [eax + edx*2 + 0x4e], si
mov eax, dword [ebp + 0xc]
cmp byte [eax + 7], 0
mov dword [ebp - 8], 0
je 0x4ea46c
mov dword [ebp - 8], 0xb
mov eax, dword [ebp + 8]
xor ecx, ecx
and byte [eax + 0x48], 0xf9
mov word [eax + 0x2c], cx
mov eax, dword [ebp - 8]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret