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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x518c57
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xfc
push ebx
push esi
xor ebx, ebx
push edi
lea ecx, [esp + 0x98]
mov dword [esp + 0x14], ebx
xor esi, esi
mov dword [esp + 0x38], ebx
call fcn.004a9910
lea ecx, [esp + 0x5c]
mov dword [esp + 0x58], ebx
call fcn.004afeb0
lea ecx, [esp + 0x6c]
mov dword [esp + 0x110], ebx
call fcn.004afeb0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x110], 1
call fcn.004afeb0
lea ecx, [esp + 0xd0]
mov dword [esp + 0x110], 2
call fcn.004a9910
mov edi, dword [ebp + 0x10]
xor ecx, ecx
mov eax, dword [edi + 4]
cmp eax, ebx
jg 0x4aeeb6
sub ecx, eax
cmp ecx, eax
jge 0x4aeeb0
mov eax, dword [edi]
fld qword [eax + ecx*8]
fstp qword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [edi + 4]
mov dword [esp + 0x10], eax
xor eax, eax
cmp ecx, ebx
jg 0x4aeeea
sub eax, ecx
cmp eax, ecx
jge 0x4aeee4
fild dword [esp + 0x10]
mov ecx, dword [edi]
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x34], 3
mov dword [esp + 0x2c], ebx
fsubr qword [ecx + eax*8]
xor eax, eax
mov ecx, 0xcc
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
fstp qword [esp + 0x1c]
cmp dword [ebp + 0x20], ebx
je 0x4aef24
mov eax, dword [esp + 0x34]
mov dword [esp + 0x54], ecx
jmp 0x4aef2c
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x54], edx
test al, 1
mov eax, dword [ebp + 0x18]
jne 0x4aef36
mov eax, dword [ebp + 0x14]
cmp eax, ebx
jle 0x4af2a4
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x38]
inc eax
mov dword [esp + 0x90], ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], eax
jns 0x4aef87
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 4]
add eax, ecx
js 0x4aef81
jmp 0x4aef97
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx + 4]
cmp eax, ecx
jl 0x4aef97
sub eax, ecx
cmp eax, ecx
jge 0x4aef91
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
fld qword [edx + eax*8]
fstp qword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
test eax, eax
jge 0x4aefd3
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx + 4]
add eax, ecx
js 0x4aefcd
jmp 0x4aefe3
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 4]
cmp eax, ecx
jl 0x4aefe3
sub eax, ecx
cmp eax, ecx
jge 0x4aefdd
mov edx, dword [ebp + 0x10]
fild dword [esp + 0x10]
mov ecx, dword [edx]
fsubr qword [ecx + eax*8]
fstp qword [esp + 0x1c]
fld qword [esp + 0x24]
fcomp qword [esp + 0x8c]
fnstsw ax
test ah, 1
je 0x4af01d
fild dword [ebp + 0x1c]
mov edx, dword [ebp + 0x1c]
mov eax, dword [esp + 0x10]
add eax, edx
fadd qword [esp + 0x24]
mov dword [esp + 0x10], eax
fstp qword [esp + 0x24]
push 0
lea ecx, [esp + 0x5c]
call fcn.004ac0c0
cmp dword [esp + 0x14], ebx
jge 0x4af061
mov eax, dword [edi]
mov ecx, dword [edi + 0x14]
lea edx, [eax - 1]
mov eax, ebx
mov ebx, dword [esp + 0x14]
sub eax, ebx
add ebx, eax
mov dword [esp + 0x14], ebx
mov bl, byte [ecx + esi + 1]
inc esi
and bl, 0xc0
cmp bl, 0xc0
jne 0x4af054
add esi, 2
cmp esi, edx
jl 0x4af05a
xor esi, esi
dec eax
jne 0x4af044
mov ebx, dword [esp + 0x18]
lea eax, [ebx + 1]
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x30], eax
mov edx, dword [edi + 4]
fild dword [esp + 0x30]
sub esp, 8
add ecx, esi
lea eax, [edx + esi*8]
fstp qword [esp]
fild dword [esp + 0x20]
sub esp, 8
fstp qword [esp]
push ecx
push eax
lea ecx, [esp + 0xb0]
call fcn.004a9fa0
fld qword [esp + 0x3c]
fcomp qword [0x51be98]
fnstsw ax
test ah, 0x41
mov eax, dword [esp + 0x10]
jne 0x4af0de
cmp ebx, eax
jne 0x4af0d0
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push edx
push eax
push ecx
lea ecx, [esp + 0xa8]
call fcn.004aa090
jmp 0x4af0fa
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
push 0
push edx
push eax
jmp 0x4af0ee
cmp ebx, eax
jne 0x4af0fa
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push 1
push ecx
push edx
lea ecx, [esp + 0xa4]
call fcn.004a9fe0
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4af10d
lea ecx, [esp + 0x98]
call fcn.004a9f00
lea eax, [esp + 0x98]
lea ecx, [esp + 0x58]
push eax
call fcn.004abd60
mov ecx, dword [esp + 0x10]
cmp ebx, ecx
jge 0x4af27c
mov eax, dword [edi + 0x14]
inc esi
mov dl, byte [eax + esi]
and dl, 0xc0
cmp dl, 0xc0
jne 0x4af13c
add esi, 2
mov edx, dword [edi]
dec edx
cmp esi, edx
jl 0x4af145
xor esi, esi
mov ebx, dword [esp + 0x14]
inc ebx
cmp ebx, ecx
mov dword [esp + 0x14], ebx
jge 0x4af1fd
lea ecx, [ebx + 1]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0x24]
fild dword [esp + 0x18]
test ecx, ecx
je 0x4af1ad
sub esp, 8
mov edx, dword [edi + 4]
add eax, esi
lea ecx, [esp + 0xd8]
fstp qword [esp]
fild dword [esp + 0x1c]
sub esp, 8
fstp qword [esp]
push eax
lea eax, [edx + esi*8]
push eax
call fcn.004a9fa0
lea ecx, [esp + 0xd0]
call fcn.004a9f00
lea ecx, [esp + 0xd0]
push ecx
lea ecx, [esp + 0x5c]
call fcn.004abd60
jmp 0x4af1c8
sub esp, 8
lea ecx, [esp + 0x60]
fstp qword [esp]
fild dword [esp + 0x1c]
sub esp, 8
fstp qword [esp]
push esi
push edi
call fcn.004abe30
mov eax, dword [edi + 0x14]
inc esi
mov dl, byte [eax + esi]
and dl, 0xc0
cmp dl, 0xc0
jne 0x4af1da
add esi, 2
mov ecx, dword [edi]
dec ecx
cmp esi, ecx
jl 0x4af1e3
xor esi, esi
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
inc ebx
inc edx
cmp ebx, ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edx
jl 0x4af15d
fld qword [esp + 0x1c]
fcomp qword [0x51be98]
fnstsw ax
test ah, 0x41
jne 0x4af27c
inc ecx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x30], ecx
mov eax, dword [edi + 4]
fild dword [esp + 0x30]
sub esp, 8
add edx, esi
lea ecx, [eax + esi*8]
fstp qword [esp]
fild dword [esp + 0x18]
sub esp, 8
fstp qword [esp]
push edx
push ecx
lea ecx, [esp + 0xb0]
call fcn.004a9fa0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
push 1
push edx
push eax
lea ecx, [esp + 0xa4]
call fcn.004a9fe0
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4af26b
lea ecx, [esp + 0x98]
call fcn.004a9f00
lea ecx, [esp + 0x98]
push ecx
lea ecx, [esp + 0x5c]
call fcn.004abd60
mov eax, dword [esp + 0x54]
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x58]
add ecx, eax
push edx
call fcn.004ac880
mov eax, dword [esp + 0x50]
dec eax
mov dword [esp + 0x50], eax
jne 0x4aef42
mov ecx, dword [esp + 0x4c]
xor ebx, ebx
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x48]
add edx, 0x44
inc eax
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x34]
sub ecx, 0x44
dec edx
cmp ecx, 0xffffffbc
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x34], edx
jg 0x4aef15
mov eax, dword [ebp + 0x20]
mov esi, dword [ebp + 8]
cmp eax, ebx
je 0x4af2e7
mov ecx, esi
call fcn.004aca90
lea ecx, [esi + 0x44]
jmp 0x4af2f8
lea ecx, [esi + 0x88]
call fcn.004aca90
lea ecx, [esi + 0xcc]
call fcn.004aca90
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x110], 3
cmp eax, ebx
je 0x4af334
cmp dword [esp + 0x88], ebx
je 0x4af322
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], ebx
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x110], 4
cmp eax, ebx
je 0x4af362
cmp dword [esp + 0x78], ebx
je 0x4af356
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x70], ebx
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x110], 0xffffffff
cmp eax, ebx
je 0x4af384
cmp dword [esp + 0x68], ebx
je 0x4af384
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x108]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret