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

Disassembly:
push 0x28
mov eax, 0x5286d1
call fcn.0051c582
mov edx, ecx
mov dword [ebp - 0x10], edx
mov ebx, dword [edx + 0x14]
test ebx, ebx
jle 0x502d50
mov esi, dword [edx + 0x1c]
mov edi, ebx
add esi, 4
mov eax, dword [esi]
lea esi, [esi + 4]
mov ecx, dword [eax + 0x10]
mov eax, ecx
or eax, 1
bsr eax, eax
mov dword [ebp - 0x18], eax
imul eax, eax, 9
add eax, 0x49
shr eax, 6
add eax, ecx
add ebx, eax
sub edi, 1
jne 0x502d2b
mov esi, dword [edx + 0x2c]
mov ecx, dword [edx + 0x24]
add ebx, ecx
lea eax, [esi + 4]
neg esi
sbb esi, esi
and esi, eax
lea edi, [esi + ecx*4]
cmp esi, edi
je 0x502d91
mov ecx, dword [esi]
call fcn.0050438b
mov ecx, eax
add esi, 4
or ecx, 1
bsr ecx, ecx
mov dword [ebp - 0x1c], ecx
imul ecx, ecx, 9
add ecx, 0x49
shr ecx, 6
add ecx, eax
add ebx, ecx
cmp esi, edi
jne 0x502d68
mov edx, dword [ebp - 0x10]
mov esi, dword [edx + 0x3c]
mov ecx, dword [edx + 0x34]
add ebx, ecx
lea eax, [esi + 4]
neg esi
sbb esi, esi
and esi, eax
lea edi, [esi + ecx*4]
cmp esi, edi
je 0x502dd2
mov ecx, dword [esi]
call fcn.00506079
mov ecx, eax
add esi, 4
or ecx, 1
bsr ecx, ecx
mov dword [ebp - 0x20], ecx
imul ecx, ecx, 9
add ecx, 0x49
shr ecx, 6
add ecx, eax
add ebx, ecx
cmp esi, edi
jne 0x502da9
mov edx, dword [ebp - 0x10]
mov esi, dword [edx + 0x4c]
mov ecx, dword [edx + 0x44]
add ebx, ecx
lea eax, [esi + 4]
neg esi
sbb esi, esi
and esi, eax
lea edi, [esi + ecx*4]
cmp esi, edi
je 0x502e13
mov ecx, dword [esi]
call fcn.00506c14
mov ecx, eax
add esi, 4
or ecx, 1
bsr ecx, ecx
mov dword [ebp - 0x24], ecx
imul ecx, ecx, 9
add ecx, 0x49
shr ecx, 6
add ecx, eax
add ebx, ecx
cmp esi, edi
jne 0x502dea
mov edx, dword [ebp - 0x10]
mov esi, dword [edx + 0x5c]
mov ecx, dword [edx + 0x54]
add ebx, ecx
lea eax, [esi + 4]
neg esi
sbb esi, esi
and esi, eax
lea edi, [esi + ecx*4]
jmp 0x502e35
mov ecx, dword [esi]
call fcn.0050d119
add ebx, eax
add esi, 4
cmp esi, edi
jne 0x502e29
mov edi, dword [ebp - 0x10]
lea ecx, [edi + 0x60]
call fcn.004d50f4
mov ecx, dword [edi + 0x60]
add ecx, eax
add ebx, ecx
lea ecx, [edi + 0x6c]
call fcn.004d50f4
mov ecx, dword [edi + 0x6c]
mov edx, dword [edi + 8]
add ecx, eax
add ebx, ecx
mov dword [ebp - 0x10], edx
test dl, 0x1f
je 0x502f2d
test dl, 1
je 0x502e8d
mov eax, dword [edi + 0x78]
mov ecx, dword [eax + 0x10]
mov eax, ecx
or eax, 1
bsr eax, eax
mov dword [ebp - 0x28], eax
imul eax, eax, 9
add eax, 0x49
shr eax, 6
inc eax
add eax, ecx
add ebx, eax
test dl, 2
je 0x502eb1
mov eax, dword [edi + 0x7c]
mov ecx, dword [eax + 0x10]
mov eax, ecx
or eax, 1
bsr eax, eax
mov dword [ebp - 0x2c], eax
imul eax, eax, 9
add eax, 0x49
shr eax, 6
inc eax
add eax, ecx
add ebx, eax
test dl, 4
je 0x502ed8
mov eax, dword [edi + 0x80]
mov ecx, dword [eax + 0x10]
mov eax, ecx
or eax, 1
bsr eax, eax
mov dword [ebp - 0x30], eax
imul eax, eax, 9
add eax, 0x49
shr eax, 6
inc eax
add eax, ecx
add ebx, eax
test dl, 8
je 0x502f04
mov ecx, dword [edi + 0x84]
call fcn.0050801d
mov ecx, eax
mov edx, dword [ebp - 0x10]
or ecx, 1
bsr ecx, ecx
mov dword [ebp - 0x34], ecx
imul ecx, ecx, 9
add ecx, 0x49
shr ecx, 6
inc ecx
add ecx, eax
add ebx, ecx
test dl, 0x10
je 0x502f2d
mov ecx, dword [edi + 0x88]
call fcn.0050bcae
mov ecx, eax
or ecx, 1
bsr ecx, ecx
mov dword [ebp - 0x10], ecx
imul ecx, ecx, 9
add ecx, 0x49
shr ecx, 6
inc ecx
add ecx, eax
add ebx, ecx
lea ecx, [edi + 4]
add edi, 0xc
test byte [ecx], 1
je 0x502f42
push edi
mov edx, ebx
call fcn.004e0702
jmp 0x502f46
mov dword [edi], ebx
mov eax, ebx
call fcn.0051c556
ret