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

Disassembly:
sub esp, 0xe4
mov eax, dword [0x613ad0]
xor eax, esp
mov dword [esp + 0xe0], eax
mov edx, dword [esp + 0xec]
push esi
mov esi, dword [esp + 0xec]
mov eax, dword [esi + 0x5750]
test eax, eax
mov dword [esp + 0x2c], 0xffffffff
jg 0x4ea9ed
test edx, edx
jne 0x4eb3d8
mov ecx, dword [esi + 0x5754]
cmp ecx, eax
jne 0x4ea9ff
test edx, edx
je 0x4eb3d8
cmp ecx, eax
mov dword [esi + 0x575c], 1
jge 0x4eaa13
mov dword [esi + 0x5754], eax
push ebx
push ebp
push edi
jmp 0x4eaa20
cmp dword [esp + 0xfc], 0
mov edi, dword [esi + 0x5750]
je 0x4eaa33
sub edi, 1
mov edx, dword [esp + 0x38]
test edx, edx
jge 0x4eaa4f
mov ecx, dword [esi + 0x574c]
lea eax, [edi + edi*2]
shl eax, 5
mov edx, dword [ecx + eax + 0x1c]
mov dword [esp + 0x38], edx
test edi, edi
jl 0x4eb324
cmp edi, dword [esi + 0x5754]
jge 0x4eb324
mov eax, dword [esi + 0x574c]
lea ecx, [edi + edi*2]
shl ecx, 5
add eax, ecx
cmp dword [eax + 0x1c], edx
mov dword [esp + 0x20], ecx
jne 0x4eb324
mov dl, byte [eax + 0x18]
cmp dl, 0x31
je 0x4eaae5
cmp dl, 0x32
je 0x4eaae5
cmp dl, 0x33
je 0x4eaae5
cmp dl, 0x34
je 0x4eaae5
mov eax, dword [eax + 0x10]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
push esi
call fcn.004f88e0
mov eax, dword [esi + 0x574c]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x28]
push edx
mov edx, dword [eax + ecx + 0x14]
push edx
push esi
call fcn.004f88e0
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x50]
mov ecx, dword [esp + 0x40]
add esp, 0x20
mov dword [esi + 0x5d8], ebp
mov dword [esi + 0x47c], ebx
jmp 0x4eaaed
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x18]
mov eax, dword [esi + 0x574c]
add eax, ecx
movzx ecx, byte [eax + 0x18]
mov dword [esi + 0x5760], ecx
mov dword [esp + 0x34], ecx
movzx ecx, byte [eax + 0x18]
add ecx, 0xffffffcf
cmp ecx, 0x23
ja case.0x4eab1a.53
movzx ecx, byte [ecx + 0x4eb420]
jmp dword [ecx*4 + 0x4eb3f4]
cmp dword [esp + 0xfc], 0
je 0x4eab49
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push edx
push eax
push ebx
push ebp
push edi
push esi
call fcn.004f9c30
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x30]
add esp, 0x18
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov edx, dword [esi + 0x138]
add eax, 1
mov dword [esi + 0x4b48], 2
mov dword [esi + 0x4b3c], ebp
mov dword [esi + 0x4b40], ecx
mov dword [esi + 0x4b4c], ebx
mov dword [esi + 0x4b50], eax
mov edi, dword [edx + ecx*4]
cmp eax, dword [edi + 0xc]
lea edx, [edx + ecx*4]
jl 0x4eabad
add ecx, 1
cmp ecx, dword [esi + 0x5e4]
jge 0x4eabad
mov eax, dword [edx + 4]
mov edx, dword [edi + 0x2c]
cmp edx, dword [eax + 0x2c]
jne 0x4eabad
mov dword [esi + 0x4b40], ecx
mov dword [esi + 0x4b50], 0
cmp ebp, dword [esi + 0x4b40]
jne 0x4eabc2
cmp ebx, dword [esp + 0x24]
jne 0x4eabc2
or dword [esi + 0xa17c], 2
mov edi, dword [esi + 0x39b4]
xor ebx, ebx
push ebx
push ebx
push esi
mov dword [esi + 0x39b4], ebx
call fcn.004cf7c0
add esp, 0xc
and dword [esi + 0xa17c], 0xfffffffd
mov dword [esi + 0x39b4], edi
mov dword [esi + 0x4b48], ebx
mov dword [esp + 0x34], 0x44
jmp case.0x4eab1a.53
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0x6a4]
test ecx, ecx
je 0x4eac17
mov eax, dword [eax + 0xc]
mov dword [esp + 0x28], eax
jmp 0x4eac1f
mov dword [esp + 0x28], 0
test ecx, ecx
mov dl, byte [edx]
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x2f], dl
movzx edx, word [eax]
mov dword [esp + 0x1c], edx
je 0x4eac40
mov eax, dword [esp + 0x28]
mov cl, byte [eax]
mov byte [esp + 0x13], cl
jmp 0x4eac45
mov byte [esp + 0x13], 0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push edx
push eax
push ebx
push ebp
push edi
push esi
call fcn.004fa050
mov ecx, dword [esi + 0x5d8]
mov edx, dword [esi + 0x138]
mov eax, dword [edx + ecx*4]
mov ecx, dword [eax]
mov edx, dword [esi + 0x47c]
mov al, byte [esp + 0x47]
mov byte [ecx + edx], al
mov ecx, dword [esi + 0x5d8]
push ecx
push esi
call fcn.004ad140
mov edx, dword [esi + 0x47c]
mov cx, word [esp + 0x3c]
mov word [eax + edx*2], cx
mov edx, dword [esi + 0x5d8]
push edx
push esi
call fcn.004ad1d0
add esp, 0x28
cmp dword [esi + 0x6a4], 0
je case.0x4eab1a.53
mov eax, dword [esi + 0x5d8]
push eax
push esi
call fcn.004abf50
mov ecx, dword [esi + 0x47c]
mov dl, byte [esp + 0x1b]
mov byte [eax + ecx], dl
mov eax, dword [esi + 0x5d8]
push eax
push esi
call fcn.004abee0
add esp, 0x10
jmp case.0x4eab1a.53
cmp dword [esi + 0x6a4], 0
mov edx, dword [eax]
mov edi, dword [eax + 4]
je 0x4eacf1
mov ecx, dword [eax + 0xc]
jmp 0x4eacf3
xor ecx, ecx
mov ebx, dword [esi + 0x39b4]
mov dword [esi + 0x39b4], 0
cmp dword [eax + 4], 0
je 0x4ead1d
push 1
push 0
push edi
push ecx
push 0
push edx
push esi
call fcn.004cdf90
add esp, 0x1c
jmp 0x4ead6e
mov ecx, dword [eax + 0x20]
mov dword [esi + 0x590], ecx
mov ecx, dword [eax + 0x24]
mov dword [esi + 0x6ac], ecx
mov eax, dword [eax]
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4ead34
mov ecx, dword [esi + 0x47c]
push 0
push ecx
mov ecx, dword [esi + 0x5d8]
push ecx
sub eax, edi
push eax
push edx
mov edx, dword [esi + 0x39c]
push edx
call sym.LectoraViewer.exe__InsertRtfBuf_24
mov eax, 1
mov dword [esi + 0x590], eax
mov dword [esi + 0x6ac], eax
mov edx, dword [esi + 0x574c]
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x54]
push eax
mov eax, dword [edx + edi + 0x10]
lea ecx, [esp + 0x50]
push ecx
push eax
push esi
call fcn.004f88e0
mov eax, dword [esi + 0x574c]
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [eax + edi + 0x14]
lea edx, [esp + 0x50]
push edx
push ecx
push esi
call fcn.004f88e0
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x74]
push 1
push edx
mov edx, dword [esp + 0x74]
push eax
push ecx
push edx
push esi
call fcn.004ecba0
add esp, 0x38
mov dword [esi + 0x39b4], ebx
mov dword [esp + 0x34], 0x49
jmp case.0x4eab1a.53
mov ecx, dword [eax + 4]
xor ebp, ebp
mov dword [eax + 4], ebp
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x1c]
push eax
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x38]
push ecx
push edx
push edi
push esi
call fcn.004f9ed0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
add esp, 0x18
cmp eax, ecx
mov edi, eax
jg 0x4eae80
mov edx, dword [esi + 0x138]
mov edx, dword [edx + edi*4]
mov edx, dword [edx + 0xc]
test edx, edx
je 0x4eae79
xor ebx, ebx
cmp edi, eax
setne bl
sub ebx, 1
and ebx, dword [esp + 0x30]
cmp edi, ecx
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x24]
je 0x4eae3f
lea ebx, [edx - 1]
push edi
push esi
call fcn.004ad140
mov ecx, dword [esp + 0x24]
add esp, 8
cmp ecx, ebx
jg 0x4eae67
mov edx, dword [esp + 0x28]
mov dx, word [edx + ebp*2]
mov word [eax + ecx*2], dx
add ecx, 1
add ebp, 1
cmp ecx, ebx
jle 0x4eae51
push edi
push esi
call fcn.004ad1d0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
add esp, 8
add edi, 1
cmp edi, ecx
jle 0x4eae12
mov eax, dword [esp + 0x28]
push eax
call fcn.004e2890
add esp, 4
jmp case.0x4eab1a.53
cmp ebp, dword [esp + 0x14]
mov eax, dword [eax + 8]
movzx ecx, word [eax]
mov dword [esp + 0x1c], ecx
mov edx, 1
mov ecx, ebp
jg case.0x4eab1a.53
mov ebx, dword [esp + 0x40]
jmp 0x4eaeb7
mov ebp, dword [esp + 0x18]
mov edi, dword [esi + 0x138]
mov edi, dword [edi + ecx*4]
test byte [edi + 0x38], 4
jne 0x4eaeca
cmp ecx, ebp
jne 0x4eaedf
cmp edx, dword [esp + 0x1c]
mov di, word [edi + 0x14]
movzx ebx, word [eax + edx*2]
mov word [eax + edx*2], di
jge 0x4eaedf
add edx, 1
mov edi, dword [esi + 0x138]
mov edi, dword [edi + ecx*4]
add ecx, 1
mov dword [edi + 0x14], ebx
cmp ecx, dword [esp + 0x14]
jle 0x4eaeb3
mov dword [esp + 0x40], ebx
jmp case.0x4eab1a.53
mov ecx, dword [eax + 0x20]
mov edx, dword [eax]
mov dword [esi + 0x590], ecx
mov ecx, dword [eax + 0x24]
mov dword [esi + 0x6ac], ecx
mov eax, dword [eax]
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4eaf16
mov ecx, dword [esi + 0x47c]
push 0
push ecx
mov ecx, dword [esi + 0x5d8]
push ecx
sub eax, edi
push eax
push edx
mov edx, dword [esi + 0x39c]
push edx
call sym.LectoraViewer.exe__InsertRtfBuf_24
mov eax, 1
mov dword [esi + 0x590], eax
mov dword [esi + 0x6ac], eax
mov dword [esp + 0x34], 0x53
jmp case.0x4eab1a.53
cmp dword [esp + 0xfc], 0
je 0x4eaf83
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edi
push esi
call fcn.004fa140
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x28]
add esp, 0x10
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov edx, dword [esi + 0x138]
add eax, 1
mov dword [esi + 0x4b48], 2
mov dword [esi + 0x4b3c], ebp
mov dword [esi + 0x4b40], ecx
mov dword [esi + 0x4b4c], ebx
mov dword [esi + 0x4b50], eax
mov edi, dword [edx + ecx*4]
cmp eax, dword [edi + 0xc]
lea edx, [edx + ecx*4]
jl 0x4eafe7
add ecx, 1
cmp ecx, dword [esi + 0x5e4]
jge 0x4eafe7
mov eax, dword [edx + 4]
mov edx, dword [edi + 0x2c]
cmp edx, dword [eax + 0x2c]
jne 0x4eafe7
mov dword [esi + 0x4b40], ecx
mov dword [esi + 0x4b50], 0
cmp ebp, dword [esi + 0x4b40]
jne 0x4eaffc
cmp ebx, dword [esp + 0x24]
jne 0x4eaffc
or dword [esi + 0xa17c], 2
mov edi, dword [esi + 0xa170]
push 0
mov eax, edi
and eax, 0xdfffffff
push 0
push esi
mov dword [esi + 0xa170], eax
call fcn.004cf7c0
add esp, 0xc
and dword [esi + 0xa17c], 0xfffffffd
mov dword [esi + 0xa170], edi
mov dword [esi + 0x4b48], 0
mov dword [esp + 0x34], 0x54
jmp case.0x4eab1a.53
mov ecx, dword [eax + 0x28]
test ecx, ecx
mov dword [esp + 0x50], ecx
jl case.0x4eab1a.53
cmp ecx, dword [esi + 0x734]
jge case.0x4eab1a.53
cmp byte [eax + 0x18], 0x31
jne 0x4eb112
mov ecx, dword [esi + 0x5e4]
mov eax, dword [esi + 0x47c]
mov edx, dword [esi + 0x5e8]
mov ebx, dword [esi + 0x138]
lea edi, [esi + 0x47c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0x5d8]
lea ebp, [esi + 0x5d8]
push eax
push ecx
push esi
mov dword [esp + 0x34], edx
call fcn.004f6e40
mov edx, dword [esi + 0x574c]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + edx + 0x38]
add eax, edx
mov dword [esi + 0x138], ecx
mov edx, dword [eax + 0x3c]
mov dword [esi + 0x5e4], edx
mov ecx, dword [eax + 0x40]
push edi
mov dword [esi + 0x5e8], ecx
mov edx, dword [eax + 0x44]
push ebp
push edx
push esi
call fcn.004f88e0
mov ecx, dword [esi + 0x574c]
mov eax, dword [esp + 0x3c]
mov dword [ecx + eax + 0x38], ebx
mov edx, dword [esi + 0x574c]
mov ecx, dword [esp + 0x38]
mov dword [edx + eax + 0x3c], ecx
mov edx, dword [esi + 0x574c]
mov ecx, dword [esp + 0x44]
mov dword [edx + eax + 0x40], ecx
mov edx, dword [esi + 0x574c]
mov ecx, dword [esp + 0x64]
add esp, 0x1c
mov dword [edx + eax + 0x44], ecx
mov ebp, dword [esp + 0x50]
mov eax, dword [esi + 0x72c]
imul ebp, ebp, 0x98
push 0x98
lea edx, [esp + 0x5c]
push edx
add eax, ebp
push eax
call fcn.004e29c0
mov ecx, dword [esi + 0x72c]
mov edx, dword [esi + 0x574c]
mov edi, dword [esp + 0x2c]
mov eax, dword [edx + edi + 0x34]
push 0x98
add ecx, ebp
push ecx
push eax
call fcn.004e29c0
mov ecx, dword [esi + 0x574c]
mov edx, dword [ecx + edi + 0x34]
push 0x98
push edx
lea eax, [esp + 0x78]
push eax
call fcn.004e29c0
mov ecx, dword [esi + 0x72c]
mov ebx, dword [ecx + ebp + 0x48]
lea eax, [ecx + ebp]
add esp, 0x24
test ebx, ebx
jle 0x4eb225
cmp ebx, dword [esi + 0x343c]
jge 0x4eb225
mov eax, dword [eax + 0x10]
mov edx, dword [esi + 0x3434]
mov edi, ebx
imul edi, edi, 0x170
mov dword [edi + edx + 0xb4], eax
mov ecx, dword [esi + 0x72c]
mov eax, dword [ecx + ebp + 0x18]
mov edx, dword [esi + 0x3434]
mov dword [edi + edx + 0xb0], eax
mov ecx, dword [esi + 0x3434]
xor edx, edx
cmp dword [edi + ecx + 0xc0], edx
lea eax, [edi + ecx]
mov ecx, dword [esi + 0x500]
setne dl
push edx
mov edx, dword [eax + 0xb4]
push 0x5a0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov ecx, dword [esi + 0x3434]
mov edx, dword [edi + ecx + 0xb0]
push eax
mov eax, dword [esi + 0x504]
push 0x5a0
push eax
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
push ebx
push esi
call fcn.004e13e0
push ebx
push esi
call fcn.004ca4b0
add esp, 0x1c
mov eax, dword [esi + 0x39c]
push 1
push eax
call fcn.0052c2c0
jmp case.0x4eab1a.53
mov ebx, dword [eax + 0x28]
mov ecx, dword [esi + 0x3434]
mov edi, ebx
imul edi, edi, 0x170
add eax, 0x2c
push eax
lea edx, [edi + ecx + 0xb4]
push edx
call fcn.004e0910
mov eax, dword [esi + 0x574c]
mov ecx, dword [esp + 0x28]
lea edx, [eax + ecx + 0x30]
mov eax, dword [esi + 0x3434]
push edx
lea ecx, [edi + eax + 0xb0]
push ecx
call fcn.004e0910
mov edx, dword [esi + 0x3434]
mov ebp, dword [sym.imp.KERNEL32.dll_MulDiv]
add esp, 0x10
lea eax, [edi + edx]
mov edx, dword [esi + 0x500]
xor ecx, ecx
cmp dword [eax + 0xc0], ecx
mov eax, dword [eax + 0xb4]
setne cl
push ecx
push 0x5a0
push edx
push eax
call ebp
mov ecx, dword [esi + 0x504]
mov edx, dword [esi + 0x3434]
push eax
mov eax, dword [edi + edx + 0xb0]
push 0x5a0
push ecx
push eax
call ebp
push eax
push ebx
push esi
call fcn.004e13e0
push ebx
push esi
call fcn.004ca4b0
push esi
call fcn.004df7e0
add esp, 0x20
jmp case.0x4eab1a.53
push edi
push esi
call fcn.004e9840
add esp, 8
cmp dword [esp + 0xfc], 0
mov ecx, dword [esi + 0x574c]
mov dl, byte [esp + 0x34]
mov eax, dword [esp + 0x20]
mov byte [ecx + eax + 0x18], dl
je 0x4eb318
add dword [esi + 0x5750], 0xffffffff
jmp 0x4eaa20
add dword [esi + 0x5750], 1
jmp 0x4eaa20
mov eax, dword [esi + 0x5d8]
cmp eax, dword [esi + 0x5e4]
pop edi
pop ebp
mov dword [esi + 0x575c], 0
pop ebx
jl 0x4eb348
add eax, 0xffffffff
mov dword [esi + 0x5d8], eax
mov ecx, dword [esi + 0x5d8]
mov eax, dword [esi + 0x490]
mov edx, ecx
sub edx, dword [esi + 0x5e0]
cmp edx, eax
jge 0x4eb364
test edx, edx
jge 0x4eb373
cdq
sub eax, edx
sar eax, 1
mov edx, ecx
sub edx, eax
mov dword [esi + 0x5e0], edx
cmp dword [esi + 0x5e0], 0
jge 0x4eb386
mov dword [esi + 0x5e0], 0
mov edx, dword [esi + 0x138]
push 0
push 0
mov eax, ecx
sub eax, dword [esi + 0x5e0]
push 1
push 0
mov dword [esi + 0x5d4], eax
mov ecx, dword [edx + ecx*4]
and dword [ecx + 0x3c], 0xfffffffe
push 0
push esi
call fcn.004d9160
add esp, 0x18
test eax, eax
jle 0x4eb3c5
push 1
push 0
push esi
call fcn.004d56b0
add esp, 0xc
push esi
mov dword [esi + 0x498], 4
call fcn.004de3e0
add esp, 4
mov ecx, dword [esp + 0xe4]
pop esi
xor ecx, esp
mov eax, 1
call fcn.005aac48
add esp, 0xe4
ret