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

Disassembly:
sub esp, 0x50
test ebx, ebx
push ebp
mov ebp, dword [esp + 0x58]
push esi
js 0x50f597
mov eax, ebx
and eax, 0x78000000
cmp eax, 0x20000000
jne 0x50f597
mov eax, ebx
and eax, 0xffff
cmp eax, 0x28
jge 0x50f597
mov eax, dword [eax*4 + 0x8ec5e0]
test eax, eax
je 0x50f597
mov ecx, dword [eax]
mov edx, ebx
shl ecx, 0x10
and edx, 0x7ff0000
cmp ecx, edx
mov dword [esp + 8], eax
je 0x50f59f
mov dword [esp + 8], 0
mov esi, dword [esp + 0x6c]
fld1
mov ecx, dword [esp + 0x60]
lea eax, [esp + 0x10]
push eax
push esi
push 0xffffffffffffffff
push 0
push ebx
push 0
push 0
push 0
push 0
push ecx
sub esp, 0x10
fst qword [esp + 8]
fstp qword [esp]
push 0
push 0
push 0
push 0
call fcn.0050aec0
mov eax, dword [0x8e80bc]
add esp, 0x48
test eax, eax
jne 0x50f5ed
mov edx, dword [esp + 8]
test byte [edx + 0x89f70], 2
je 0x50f60d
mov ecx, dword [esp + 8]
mov ecx, dword [ecx + 0x89f70]
and ecx, 2
jne 0x50f651
cmp eax, 1
jne 0x50f651
cmp dword [0x8e80c0], 0xff
jne 0x50f651
mov edx, dword [esp + 0x68]
fld1
mov eax, dword [0x8c6ae0]
mov ecx, dword [esp + 0x64]
push 0
push esi
push 0xffffffffffffffff
push edx
mov edx, dword [esp + 0x70]
push ebx
push 1
push 0x8e7f8c
push eax
push ecx
push edx
sub esp, 0x10
fst qword [esp + 8]
fstp qword [esp]
push 0
push edi
push ebp
push 1
call fcn.0050aec0
add esp, 0x48
pop esi
xor eax, eax
pop ebp
add esp, 0x50
ret
test ecx, ecx
mov esi, 0x8c6ac8
jne 0x50f65f
mov esi, 0x8c6ab0
mov ecx, dword [0x8e7f90]
mov edx, dword [0x8e7f94]
mov eax, dword [0x8e7f8c]
mov dword [esp + 0x3c], ecx
mov ecx, dword [0x8e80e4]
mov dword [esp + 0x40], edx
mov edx, dword [0x71df64]
mov dword [esp + 0x38], eax
mov eax, dword [0x8e7f98]
mov dword [esp + 0xc], ecx
mov ecx, dword [0x71df68]
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x44], eax
xor eax, eax
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x48]
mov dword [esp + 0x20], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x2c], eax
call fcn.00525aa0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [0x8e7f8c], eax
mov eax, dword [esp + 0x2c]
mov dword [0x8e7f90], ecx
mov ecx, dword [esp + 0x10]
add esp, 8
mov dword [0x8e7f94], edx
mov dword [0x8e7f98], eax
test byte [ecx + 0x89f70], 2
je 0x50f821
mov edx, dword [esi + 0x14]
mov dword [edx + 0x18], 0
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0x18]
push ecx
lea edx, [esp + 0x1c]
push edx
push esi
call fcn.0052b280
fld1
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
add esp, 0xc
push 0
push eax
mov eax, dword [esp + 0x6c]
push 0xffffffffffffffff
push ecx
mov ecx, dword [esp + 0x70]
push ebx
push 1
lea edx, [esp + 0x30]
push edx
push esi
push eax
push ecx
sub esp, 0x10
fst qword [esp + 8]
fstp qword [esp]
push 0
push 0
push 0
push 1
call fcn.0050aec0
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
add edx, ebp
lea ecx, [esp + 0x80]
mov dword [esp + 0x78], edx
push ecx
lea edx, [esp + 0x74]
add eax, edi
push edx
mov dword [0x8e80e4], 0xffffff
mov dword [esp + 0x78], ebp
mov dword [esp + 0x7c], edi
mov dword [esp + 0x84], eax
call fcn.00525aa0
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x78]
add esp, 0x50
mov dword [0x8e7f90], ecx
mov ecx, dword [0x8c6ae4]
push ecx
push 1
push edi
push ebp
mov dword [0x8e7f94], edx
mov edx, dword [0x8c6ae0]
mov dword [0x8e7f8c], eax
mov eax, dword [esp + 0x44]
push esi
push edx
mov dword [0x8e7f98], eax
call fcn.0053ec50
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
add esp, 0x18
mov dword [0x8e7f8c], eax
mov eax, dword [esp + 0x44]
mov dword [0x8e7f90], ecx
mov ecx, dword [esp + 0xc]
pop esi
mov dword [0x8e7f98], eax
mov dword [0x8e7f94], edx
mov dword [0x8e80e4], ecx
xor eax, eax
pop ebp
add esp, 0x50
ret
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0x18]
cmp dword [esp + 0x64], ecx
je 0x50f837
cmp dword [esp + 0x68], ecx
jne 0x50f718
add dword [eax + 0x18], 1
jmp 0x50f821