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

Disassembly:
sub esp, 0x98
lea eax, [esp + 0x18]
push ebx
push ebp
push esi
mov esi, dword [esp + 0xa8]
push edi
mov edi, dword [esp + 0xb0]
push eax
push edi
push esi
call fcn.005010f0
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp eax, 1
jne 0x4fefbd
mov edi, dword [esp + 0xb8]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0xb4]
push 0
push ecx
call fcn.00500fb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov eax, dword [edi]
cmp eax, 1
jg 0x4ff009
mov eax, dword [esp + 0xb4]
lea edx, [esp + 0x38]
xor ecx, ecx
push edx
mov cx, word [edi + 4]
push eax
push ecx
push esi
call fcn.004ff2d0
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0xc8]
add esp, 0x10
and edx, 0xffff
push edx
push eax
call fcn.00500fb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov cx, word [edi + eax*2 + 2]
mov ebp, 0xf
shr cx, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], ebp
mov ax, word [esp + 0x14]
test ax, ax
je 0x4ff032
dec ebp
shr ax, 1
jne 0x4ff028
mov dword [esp + 0x24], ebp
mov ecx, dword [esi]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x68]
push 0x21
push eax
push ebp
lea edx, [esi + 4]
push ecx
push edx
call fcn.00500fe0
mov edx, dword [edi]
add esp, 0x18
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x40]
push eax
push 0x10
push ecx
push ebp
add edi, 4
push edx
push edi
call fcn.00500fe0
mov ecx, dword [esp + 0x28]
mov eax, dword [esi]
add esp, 0x18
cmp ecx, eax
jne 0x4ff080
mov word [esp + ecx*2 + 0x64], 0
inc ecx
mov dword [esp + 0x10], ecx
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0xb4]
mov eax, ecx
lea ebx, [esp + ecx*2 + 0x64]
sub eax, esi
mov dword [edx], eax
lea edi, [edx + eax*2 + 4]
dec eax
mov dword [esp + 0x20], edi
mov di, word [esp + esi*2 + 0x3e]
mov si, word [esp + esi*2 + 0x3c]
mov dword [esp + 0x2c], edi
test eax, eax
mov dword [esp + 0x34], esi
jl 0x4ff25b
mov ebp, edi
and ebp, 0xffff
inc eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], eax
jmp 0x4ff0d3
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
mov ax, word [ebx - 2]
sub ebx, 2
mov ecx, eax
xor edx, edx
mov dx, word [ebx - 2]
and ecx, 0xffff
shl ecx, 0x10
or ecx, edx
cmp ax, di
mov dword [esp + 0x30], ebx
jb 0x4ff0fd
mov eax, 0xffff
jmp 0x4ff103
mov eax, ecx
xor edx, edx
div ebp
mov edx, eax
and edx, 0xffff
imul edx, ebp
sub ecx, edx
test ecx, 0xffff0000
jne 0x4ff153
xor edx, edx
and esi, 0xffff
mov dx, word [ebx - 4]
mov ebp, eax
mov edi, ecx
and ebp, 0xffff
imul ebp, esi
shl edi, 0x10
or edi, edx
cmp ebp, edi
jbe 0x4ff14f
mov ebp, dword [esp + 0x18]
add eax, 0xffff
add ecx, ebp
test ecx, 0xffff0000
je 0x4ff124
jmp 0x4ff153
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
xor esi, esi
lea edi, [esp + 0x40]
lea edx, [ecx + ecx]
mov ecx, edx
mov edx, ebx
sub edx, ecx
mov ecx, dword [esp + 0x3c]
dec ecx
test ecx, ecx
jl 0x4ff1b9
mov ebx, eax
and ebx, 0xffff
inc ecx
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov ebp, ebx
mov cx, word [edi]
and esi, 0xffff
imul ebp, ecx
xor ecx, ecx
add edi, 2
mov cx, word [edx]
add edx, 2
sub ecx, ebp
sub ecx, esi
mov word [edx - 2], cx
shr ecx, 0x10
neg ecx
mov esi, ecx
mov ecx, dword [esp + 0x1c]
dec ecx
mov dword [esp + 0x1c], ecx
jne 0x4ff17c
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x18]
xor ecx, ecx
and esi, 0xffff
mov cx, word [edx]
sub ecx, esi
mov word [edx], cx
mov edx, dword [esp + 0x20]
sub edx, 2
test ecx, 0xffff0000
mov dword [esp + 0x20], edx
mov word [edx], ax
je 0x4ff23d
dec eax
lea esi, [esp + 0x40]
mov word [edx], ax
mov eax, dword [esp + 0x3c]
xor edx, edx
lea ecx, [eax + eax]
mov edi, ecx
mov ecx, ebx
sub ecx, edi
dec eax
test eax, eax
jl 0x4ff22d
lea edi, [eax + 1]
mov eax, edx
xor edx, edx
mov dx, word [ecx]
and eax, 0xffff
add eax, edx
xor edx, edx
mov dx, word [esi]
add esi, 2
add eax, edx
mov edx, eax
mov word [ecx], ax
and edx, 0xffff0000
neg edx
sbb edx, edx
add ecx, 2
neg edx
dec edi
jne 0x4ff1fe
xor eax, eax
and edx, 0xffff
mov ax, word [ecx]
add edx, eax
mov word [ecx], dx
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
jne 0x4ff0cb
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xb4]
mov ebp, dword [esp + 0x24]
mov eax, dword [edx]
lea eax, [edx + eax*2 + 4]
sub eax, 2
cmp word [eax], 0
jne 0x4ff27e
mov edi, dword [edx]
dec edi
mov esi, edi
mov dword [edx], edi
test esi, esi
jle 0x4ff27e
sub eax, 2
cmp word [eax], 0
je 0x4ff26a
cmp word [esp + ecx*2 + 0x62], 0
lea eax, [esp + ecx*2 + 0x62]
jne 0x4ff29c
dec ecx
test ecx, ecx
mov dword [esp + 0x10], ecx
jle 0x4ff29c
sub eax, 2
cmp word [eax], 0
je 0x4ff28a
mov eax, dword [esp + 0xb8]
push eax
add eax, 4
push 0x10
push eax
push ebp
push ecx
lea ecx, [esp + 0x78]
push ecx
call fcn.00500f00
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret