Function at 0x50f7c0
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 0x50f85a
mov eax, dword [edi + 0x2c]
test eax, eax
jne 0x50f827
lea ebp, [edi + 0x28]
mov edi, dword [ebp]
test edi, edi
jne 0x50f814
jmp 0x50f85a
mov ecx, dword [esp + 0x10]
cmp dword [edi + 0x30], ecx
jne 0x50f839
mov dword [edi + 0x2c], 0
jmp 0x50f868
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.005ddc00
add esp, 4
mov edx, dword [esp + 0x10]
push edx
mov ecx, esi
call fcn.0050f050
mov edi, eax
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
call dword [eax + 0x2c]
test edi, edi
je 0x50fc9a
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 0x50fc9c
mov eax, dword [esp + 0x34]
test eax, eax
je 0x50f9db
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 0x50f9db
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x50f90c
push eax
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call fcn.00489e20
add esp, 0xc
jmp 0x50f991
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 0x50f951
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.00489e20
mov ecx, dword [esp + 0x44]
add esp, 0xc
push ebp
call fcn.0052d4d0
jmp 0x50f991
cmp ebp, dword [esp + 0x34]
je 0x50f991
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 0x78]
cmp eax, 0x62
je 0x50f96c
cmp eax, 6
je 0x50f96c
cmp eax, 0x61
jne 0x50f988
mov ecx, dword [ebp + 0x20]
call fcn.004a63e0
add eax, 0x34
push eax
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call fcn.00489e20
add esp, 0xc
mov ebp, dword [ebp + 8]
cmp ebp, dword [esp + 0x34]
jne 0x50f957
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
mov edx, ecx
push edx
call fcn.00489e20
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.00489f10
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.00512000
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
fmul qword [str.333333]
fcomp qword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x50fb3a
mov ecx, ebp
mov dword [esp + 0x34], 0x80
call fcn.00512000
mov ecx, dword [esi]
add eax, 0x4b0
cmp ecx, eax
jle 0x50fa37
mov dword [esp + 0x34], 0x10
jmp 0x50fa6d
mov ecx, ebp
call fcn.00512000
mov ecx, dword [esi]
add eax, 0x258
cmp ecx, eax
jle 0x50fa53
mov dword [esp + 0x34], 0x20
jmp 0x50fa6d
mov ecx, ebp
call fcn.00512000
mov ecx, dword [esi]
add eax, 0x12c
cmp ecx, eax
jle 0x50fa6d
mov dword [esp + 0x34], 0x40
mov eax, dword [esi + 0x218]
test eax, eax
jne 0x50fab2
test byte [ebx], 1
jne 0x50fa93
push 0x20
call fcn.005ddbe0
add esp, 4
test eax, eax
je 0x50faaa
mov ecx, eax
call fcn.0051c360
jmp 0x50faac
push 4
call fcn.005ddbe0
add esp, 4
test eax, eax
je 0x50faaa
mov ecx, eax
call fcn.0051c2b0
jmp 0x50faac
xor eax, eax
mov dword [esi + 0x218], eax
mov ecx, dword [esi + 0x218]
test ecx, ecx
mov ebp, dword [esp + 0x10]
je 0x50fad2
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.0050ef30
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 0x50fc0f
push ebx
call fcn.0050ef30
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 0x50fc12
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 0x50fc06
test eax, eax
je 0x50fc0a
mov ebp, eax
mov eax, dword [esp + 0x10]
push ebx
sub ebp, eax
call fcn.0050ef30
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.0044f630
imul eax, ebp
add dword [edi + 0x34], eax
jmp 0x50fc12
test eax, eax
jne 0x50fc12
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 0x50fc32
mov ecx, dword [esi + 0x214]
mov eax, dword [ecx]
push edi
call dword [eax + 0x1c]
jmp 0x50fc39
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 0x50fc7f
lea ecx, [esi + 0x10]
call fcn.00512000
cmp dword [esi], eax
jl 0x50fc7f
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