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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov eax, ebx
sub eax, dword [0x681e4c]
cdq
idiv dword [0x681e5c]
mov esi, eax
mov eax, ecx
sub eax, dword [0x681e50]
cdq
idiv dword [0x681e60]
mov dword [ebp - 8], eax
push 0
push 0x40
push 0x40
push 0
push dword [0x681ad8]
push 0x66
push ecx
push ebx
call fcn.004ee5e7
add esp, 0x20
mov edi, eax
cmp esi, 0
setge al
movzx eax, al
cmp eax, 0
je 0x500df8
mov eax, dword [ebp - 8]
cmp eax, 0
setge al
movzx eax, al
cmp eax, 0
je 0x500e09
cmp esi, dword [0x681e54]
setl al
movzx eax, al
cmp eax, 0
je 0x500e1d
mov eax, dword [ebp - 8]
cmp eax, dword [0x681e58]
setl al
movzx eax, al
cmp eax, 0
je 0x500e9e
mov edx, dword [0x681e48]
mov eax, esi
mov ecx, dword [0x681e48]
imul eax, dword [ecx + 0x18]
add eax, dword [ebp - 8]
mov eax, dword [edx + eax*4 + 0x1c]
mov eax, dword [eax + 0x1c]
cmp eax, 0x66dc40
je 0x500e50
push 1
push eax
call fcn.004ee8c3
add esp, 8
mov eax, edi
inc dword [eax + 4]
mov ebx, eax
mov ecx, dword [0x681e48]
mov edx, esi
mov eax, dword [0x681e48]
imul edx, dword [eax + 0x18]
mov eax, edx
add eax, dword [ebp - 8]
mov eax, dword [ecx + eax*4 + 0x1c]
mov eax, dword [eax + 0x1c]
dec dword [eax + 4]
jne 0x500e82
push eax
call fcn.004c1de0
add esp, 4
mov edx, dword [0x681e48]
mov eax, esi
mov ecx, dword [0x681e48]
imul eax, dword [ecx + 0x18]
add eax, dword [ebp - 8]
mov eax, dword [edx + eax*4 + 0x1c]
mov dword [eax + 0x1c], ebx
mov eax, dword [0x681d60]
mov eax, dword [eax + 0x2c]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x48]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0x66dc40
jne 0x500ed2
push 0xc
push 0x692f40
mov eax, dword [0x681d60]
push dword [eax + 0x2c]
call fcn.0050da4e
add esp, 0xc
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 8]
inc dword [ebx + 4]
mov eax, dword [edi + 0x50]
dec dword [eax + 4]
jne 0x500eec
push eax
call fcn.004c1de0
add esp, 4
mov dword [edi + 0x50], ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov dword [edi + 0x6c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov dword [edi + 0x7c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov dword [edi + 0x68], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov dword [edi + 0x74], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
mov dword [edi + 0x144], eax
push 0x10
mov eax, dword [ebp + 0x10]
sub eax, 0x29
push eax
call fcn.004c17f0
add esp, 8
cmp eax, 0
jg 0x500f3c
mov eax, 1
jmp 0x500f3c
cmp dword [0x6828a0], 0
jne 0x500f4a
mov dword [0x6828a0], eax
mov edx, dword [0x681d60]
mov edx, dword [edx + 0x30]
mov edx, dword [edx + 0xc]
mov esi, dword [edx + eax*4 + 0x18]
cmp dword [esi + 8], 0x66dc40
jne 0x500f79
push eax
push 0x691ea0
mov eax, dword [0x681d60]
push dword [eax + 0x30]
call fcn.0050da4e
add esp, 0xc
mov eax, dword [esi + 8]
inc dword [eax + 4]
mov ebx, eax
mov eax, dword [edi + 0x54]
dec dword [eax + 4]
jne 0x500f92
push eax
call fcn.004c1de0
add esp, 4
mov dword [edi + 0x54], ebx
mov eax, dword [esi + 0x10]
mov dword [edi + 0x80], eax
fldz
fstp dword [edi + 0x5c]
mov eax, dword [esi + 0x38]
mov dword [edi + 0x78], eax
mov eax, dword [0x681bb8]
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
fstp dword [edi + 0xf4]
mov dword [edi + 0x38], 0
mov dword [edi + 0x3c], 0
mov eax, dword [ebp + 0x14]
mov dword [edi + 0x184], eax
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x14c], eax
mov dword [edi + 0x18], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov dword [edi + 0x60], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov dword [edi + 0x64], eax
mov dword [edi + 0x14], 0x66
push edi
call fcn.0054d94c
add esp, 4
mov eax, edi
jmp 0x501007
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret