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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x1cc]
test al, 2
lea ebx, [esi + 0x1cc]
mov ecx, 0
setne cl
mov edx, 0
push edi
inc ecx
test al, 1
setne dl
inc edx
imul ecx, edx
imul ecx, dword [esi + 0x1d0]
add ecx, 0xb90
mov dword [esp + 0x10], ecx
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
call dword [eax + 0x28]
mov edi, dword [esi + 0xc]
test edi, edi
lea ebp, [esi + 0xc]
je 0x50efba
mov eax, dword [edi + 0x2c]
test eax, eax
jne 0x50ef87
lea ebp, [edi + 0x28]
mov edi, dword [ebp]
test edi, edi
jne 0x50ef74
jmp 0x50efba
mov ecx, dword [esp + 0x10]
cmp dword [edi + 0x30], ecx
jne 0x50ef99
mov dword [edi + 0x2c], 0
jmp 0x50efc8
mov ecx, dword [esi + 0x214]
mov eax, dword [ebp]
mov edx, dword [ecx]
push eax
call dword [edx + 0x24]
mov eax, dword [ebp]
mov ecx, dword [eax + 0x28]
push eax
mov dword [ebp], ecx
call fcn.005dd350
add esp, 4
mov edx, dword [esp + 0x10]
push edx
mov ecx, esi
call fcn.0050e760
mov edi, eax
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
call dword [eax + 0x2c]
test edi, edi
je 0x50f3fa
mov eax, dword [esi + 0x1d0]
mov ecx, dword [esi + 0x1e8]
mov ebp, dword [ecx]
lea edx, [edi + 0x40]
push eax
push edx
call dword [ebp + 4]
test eax, eax
mov dword [esp + 0x10], eax
jle 0x50f3fc
mov eax, dword [esp + 0x34]
test eax, eax
je 0x50f13b
mov ecx, dword [eax + 0x50]
mov ebp, dword [eax + 0x54]
mov eax, dword [eax + 0x2c]
mov eax, dword [eax + 0xd4]
mov edx, dword [ecx + 0xe0]
add eax, 0x828
mov dword [esp + 0x14], eax
mov eax, 0x64
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], eax
xor eax, eax
cmp ebp, eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
je 0x50f13b
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x50f06c
push eax
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call fcn.00489b20
add esp, 0xc
jmp 0x50f0f1
mov eax, dword [esp + 0x38]
movzx edx, byte [eax + 0x12]
xor ecx, ecx
mov ch, byte [eax + 0x10]
mov cl, byte [eax + 0x11]
shl ecx, 8
or ecx, edx
cmp ecx, 0xffffff
jne 0x50f0b1
mov ebp, dword [eax + 4]
mov eax, dword [eax + 0x14]
sub ebp, 0x14
add eax, ebp
push eax
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call fcn.00489b20
mov ecx, dword [esp + 0x44]
add esp, 0xc
push ebp
call fcn.0052cb90
jmp 0x50f0f1
cmp ebp, dword [esp + 0x34]
je 0x50f0f1
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 0x78]
cmp eax, 0x62
je 0x50f0cc
cmp eax, 6
je 0x50f0cc
cmp eax, 0x61
jne 0x50f0e8
mov ecx, dword [ebp + 0x20]
call fcn.004a61e0
add eax, 0x34
push eax
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call fcn.00489b20
add esp, 0xc
mov ebp, dword [ebp + 8]
cmp ebp, dword [esp + 0x34]
jne 0x50f0b7
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call fcn.00489b20
mov eax, dword [ebx]
mov ebp, dword [ebx + 4]
mov edx, eax
lea ecx, [esp + 0x28]
push ecx
push eax
sar edx, 2
and edx, 3
mov ecx, dword [edx*4 + 0x5fb068]
sar eax, 2
shl ebp, cl
and eax, 3
mov ecx, dword [eax*4 + 0x5fb068]
lea eax, [edi + 0x40]
sar ebp, cl
push ebp
push eax
call fcn.00489c10
add esp, 0x1c
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
call dword [eax + 0x28]
fild dword [esi]
lea ebp, [esi + 0x10]
mov ecx, ebp
fstp qword [esp + 0x14]
call fcn.00511760
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fmul qword [str.333333]
fcomp qword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x50f29a
mov ecx, ebp
mov dword [esp + 0x34], 0x80
call fcn.00511760
mov ecx, dword [esi]
add eax, 0x4b0
cmp ecx, eax
jle 0x50f197
mov dword [esp + 0x34], 0x10
jmp 0x50f1cd
mov ecx, ebp
call fcn.00511760
mov ecx, dword [esi]
add eax, 0x258
cmp ecx, eax
jle 0x50f1b3
mov dword [esp + 0x34], 0x20
jmp 0x50f1cd
mov ecx, ebp
call fcn.00511760
mov ecx, dword [esi]
add eax, 0x12c
cmp ecx, eax
jle 0x50f1cd
mov dword [esp + 0x34], 0x40
mov eax, dword [esi + 0x218]
test eax, eax
jne 0x50f212
test byte [ebx], 1
jne 0x50f1f3
push 0x20
call fcn.005dd330
add esp, 4
test eax, eax
je 0x50f20a
mov ecx, eax
call fcn.0051bab0
jmp 0x50f20c
push 4
call fcn.005dd330
add esp, 4
test eax, eax
je 0x50f20a
mov ecx, eax
call fcn.0051ba00
jmp 0x50f20c
xor eax, eax
mov dword [esi + 0x218], eax
mov ecx, dword [esi + 0x218]
test ecx, ecx
mov ebp, dword [esp + 0x10]
je 0x50f232
mov eax, dword [esp + 0x34]
mov edx, dword [ecx]
push ebx
push eax
push ebp
lea eax, [edi + 0x24]
push eax
call dword [edx + 4]
mov ebp, eax
push ebx
call fcn.0050e640
xor edx, edx
mov ecx, eax
mov eax, ebp
imul eax, eax, 0x3e8
div ecx
mov ecx, dword [esi]
add esp, 4
mov edx, 0
add ecx, eax
mov dword [esi], ecx
mov ebx, dword [ebx]
test bl, 2
setne dl
mov ecx, 0
inc edx
test bl, 1
setne cl
inc ecx
imul edx, ecx
mov ecx, dword [esp + 0x38]
imul edx, ebp
mov dword [edi + 0x34], edx
movzx ebx, byte [ecx + 0xd]
xor edx, edx
mov dh, byte [ecx + 0xf]
mov dl, byte [ecx + 0xc]
movzx ecx, byte [ecx + 0xe]
shl edx, 8
or edx, ebx
shl edx, 8
or edx, ecx
add edx, eax
mov dword [edi + 0x38], edx
jmp 0x50f36f
push ebx
call fcn.0050e640
mov ecx, eax
mov eax, dword [esp + 0x14]
imul eax, eax, 0x3e8
xor edx, edx
div ecx
add esp, 4
mov edx, 0
mov ebp, eax
add dword [esi], ebp
mov eax, dword [ebx]
test al, 2
setne dl
inc edx
test al, 1
mov eax, 0
setne al
xor ecx, ecx
inc eax
imul edx, eax
imul edx, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
mov dword [edi + 0x34], edx
mov ch, byte [eax + 0xf]
movzx edx, byte [eax + 0xd]
mov cl, byte [eax + 0xc]
movzx eax, byte [eax + 0xe]
mov dword [edi + 0x3c], ebp
shl ecx, 8
or ecx, edx
shl ecx, 8
or ecx, eax
add ecx, ebp
mov dword [edi + 0x38], ecx
mov ecx, dword [esi + 0x218]
test ecx, ecx
je 0x50f372
mov ebp, dword [esp + 0x10]
mov edx, dword [ecx]
push ebx
push 0
push ebp
lea eax, [edi + 0x24]
push eax
call dword [edx + 4]
cmp eax, ebp
je 0x50f366
test eax, eax
je 0x50f36a
mov ebp, eax
mov eax, dword [esp + 0x10]
push ebx
sub ebp, eax
call fcn.0050e640
mov ecx, eax
mov eax, ebp
imul eax, eax, 0x3e8
cdq
idiv ecx
mov edx, dword [esi]
add esp, 4
add edx, eax
mov dword [esi], edx
mov ecx, dword [edi + 0x38]
mov edx, dword [edi + 0x3c]
add ecx, eax
mov dword [edi + 0x38], ecx
add edx, eax
mov ecx, ebx
mov dword [edi + 0x3c], edx
call fcn.0044f4f0
imul eax, ebp
add dword [edi + 0x34], eax
jmp 0x50f372
test eax, eax
jne 0x50f372
xor eax, eax
mov dword [edi + 0x34], eax
mov dword [edi + 0x3c], eax
mov ecx, dword [esi + 0x214]
mov edx, dword [ecx]
call dword [edx + 0x2c]
mov eax, dword [edi + 0x3c]
test eax, eax
jbe 0x50f392
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
push edi
call dword [eax + 0x1c]
jmp 0x50f399
mov dword [edi + 0x2c], 1
mov ecx, dword [esi + 0x214]
mov edx, dword [ecx]
call dword [edx + 0x28]
mov eax, dword [esi + 4]
test eax, eax
je 0x50f3df
lea ecx, [esi + 0x10]
call fcn.00511760
cmp dword [esi], eax
jl 0x50f3df
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
call dword [eax + 0x2c]
mov ecx, dword [esi + 0x214]
mov edx, dword [ecx]
call dword [edx + 0x14]
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
call dword [eax + 0x28]
mov dword [esi + 4], 0
mov esi, dword [esi + 0x214]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x2c]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc