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

Disassembly:
sub esp, 0xe4
push ebx
push ebp
mov ebp, ecx
mov ecx, dword [ebp + 0x47c]
mov eax, dword [ebp + 0x478]
mov edx, dword [ebp + 0x480]
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp + 0x570]
push esi
push edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], edx
test ecx, ecx
je 0x50b1bb
mov eax, dword [ecx + 0x478]
mov edx, dword [ecx + 0x47c]
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 0x480]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
call fcn.0050b160
mov ecx, dword [ebp + 0x2ec]
mov ebx, dword [ecx]
mov edi, dword [ebp + 0x2d8]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov esi, dword [ebp + 0x2ec]
mov eax, dword [ebp + 0x2d8]
test edi, edi
je 0x50b1e5
cmp edi, eax
je 0x50b1ea
call fcn.006121a6
cmp ebx, esi
je 0x50b466
test edi, edi
jne 0x50b24a
call fcn.006121a6
xor eax, eax
cmp ebx, dword [eax + 0x14]
jne 0x50b207
call fcn.006121a6
cmp dword [ebx + 0xc], 0
je 0x50b2c1
mov edx, dword [ebp + 0x1d8]
sub edx, dword [ebp + 0x1d4]
mov esi, dword [ebx + 0x10]
sar edx, 2
cmp esi, edx
jb 0x50b24e
mov eax, dword [ebp + 0x1d8]
sub eax, dword [ebp + 0x1d4]
sar eax, 2
push eax
push esi
push 0x687708
call fcn.00584df0
add esp, 0xc
jmp 0x50b440
mov eax, dword [edi]
jmp 0x50b1fd
mov ecx, dword [ebp + 0x1d8]
sub ecx, dword [ebp + 0x1d4]
sar ecx, 2
cmp esi, ecx
jb 0x50b266
call fcn.006121a6
mov edx, dword [ebp + 0x1d4]
mov ecx, dword [edx + esi*4]
test ecx, ecx
jne 0x50b289
mov eax, dword [ebx + 0x10]
push eax
push 0x6876a0
call fcn.00584df0
add esp, 8
jmp 0x50b440
call fcn.005b40e1
test eax, eax
je 0x50b440
mov ecx, dword [ebx + 0x14]
push ecx
mov ecx, eax
call fcn.005b6799
add ebp, 0x6c
push ebp
lea edx, [esp + 0x38]
mov esi, eax
push edx
mov eax, edx
mov ecx, 0x10
lea edi, [esp + 0x3c]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.005d97aa
jmp 0x50b2cf
lea esi, [ebp + 0x6c]
mov ecx, 0x10
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov ebp, dword [ebx + 8]
test ebp, ebp
je 0x50b438
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp + 0x14]
mov eax, 0x66666667
imul ecx
sar edx, 3
mov ecx, edx
xor edi, edi
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x18], edi
je 0x50b438
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
jmp 0x50b314
mov edi, dword [esp + 0x18]
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp + 0x14]
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x50b334
call fcn.006121a6
mov ecx, dword [ebp + 0x14]
add ecx, dword [esp + 0x20]
call fcn.00564780
mov ecx, dword [ebx + 0x28]
sub ecx, dword [ebx + 0x24]
mov esi, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp edi, ecx
jb 0x50b364
call fcn.006121a6
fld dword [esi + 8]
mov ebx, dword [ebx + 0x24]
add ebx, dword [esp + 0x1c]
sub esp, 0xc
fstp dword [esp + 8]
lea edx, [esp + 0x80]
fld dword [esi + 4]
fstp dword [esp + 4]
fld dword [esi]
fstp dword [esp]
push edx
call fcn.005da107
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0xbc]
push edx
call fcn.005d97aa
fld dword [esp + 0xe4]
mov ecx, 0x10
lea esi, [esp + 0xb4]
lea edi, [esp + 0x74]
rep movsd dword es:[edi], dword [esi]
fstp dword [ebx + 0xc]
fld dword [esp + 0xa8]
fstp dword [ebx + 0x10]
fld dword [esp + 0xac]
fstp dword [ebx + 0x14]
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov esi, dword [esp + 0x18]
fld dword [ebx]
add dword [esp + 0x20], 0x14
fadd dword [esp + 0x24]
add dword [esp + 0x1c], 0x1c
mov eax, 0x66666667
inc esi
fstp dword [ebx]
mov dword [esp + 0x18], esi
fld dword [ebx + 4]
fadd dword [esp + 0x28]
fstp dword [ebx + 4]
fld dword [ebx + 8]
fadd dword [esp + 0x2c]
fstp dword [ebx + 8]
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp + 0x14]
mov ebx, dword [esp + 0x14]
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x50b310
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x30]
test edi, edi
jne 0x50b462
call fcn.006121a6
xor eax, eax
cmp ebx, dword [eax + 0x14]
jne 0x50b455
call fcn.006121a6
mov ecx, dword [ebx]
mov dword [esp + 0x14], ecx
mov ebx, ecx
jmp 0x50b1d1
mov eax, dword [edi]
jmp 0x50b44b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret