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

Disassembly:
mov eax, edi
shl eax, 8
sub eax, edi
cdq
idiv dword [esp + 0x1c]
sub eax, 0x7f
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
imul dword [esp + 4]
imul dword [esp + 4]
test eax, eax
jns 0x50c60f
add eax, 0x7f
sar eax, 7
test eax, eax
jns 0x50c619
add eax, 0x7f
sar eax, 7
mov dword [esp + 4], eax
imul eax, dword [esp + 4], 0x70
test eax, eax
jns 0x50c62c
add eax, 0x7f
sar eax, 7
add eax, 0x80
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
test eax, eax
jl 0x50c6d9
inc eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x10], 0
movzx eax, byte [esp + 0x24]
mov edx, dword [esp + 4]
sar edx, 1
jns 0x50c661
adc edx, 0
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x28]
imul dword [esp + 8]
mov ecx, 0xff
cdq
idiv ecx
mov ecx, eax
movzx ecx, cl
mov eax, dword [esp + 0x30]
imul dword [esp + 8]
mov ebx, 0xff
cdq
idiv ebx
movzx eax, al
shl eax, 8
or ecx, eax
mov eax, dword [esp + 0x2c]
imul dword [esp + 8]
mov ebx, 0xff
cdq
idiv ebx
movzx eax, al
shl eax, 0x10
or ecx, eax
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esi + 0x74db0378]
call fcn.00464c88
mov ecx, edi
mov edx, dword [esp + 0x14]
and al, 0x14
and al, 0x14
mov ebx, dword [eax]
call dword [ebx + 0x20]
inc dword [esp + 0x10]
dec dword [esp + 0x38]
jne 0x50c651
inc edi
dec dword [esp + 0x34]
jne 0x50c5e9
mov eax, dword [esp + 0x18]
mov ecx, 6
cdq
idiv ecx
cmp eax, 0x10
jle 0x50c6ff
mov dword [esp + 0x40], 0x10
jmp 0x50c70f
mov eax, dword [esp + 0x18]
mov ecx, 6
cdq
idiv ecx
mov dword [esp + 0x40], eax
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x1c]
imul dword [esp + 0x1c]
test eax, eax
jns 0x50c722
add eax, 3
sar eax, 2
mov dword [esp], eax
mov eax, dword [esp + 0x1c]
test eax, eax
jl 0x50d013
inc eax
mov dword [esp + 0x34], eax
xor edi, edi
mov eax, dword [esp + 0x1c]
sar eax, 1
jns 0x50c746
adc eax, 0
mov edx, edi
sub edx, eax
mov dword [esp + 8], edx
mov eax, dword [esp + 0x18]
test eax, eax
jl 0x50c8ba
inc eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x18]
sar ecx, 1
jns 0x50c772
adc ecx, 0
mov eax, dword [esp + 0x10]
sub eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 8]
imul dword [esp + 8]
imul ebx
cdq
idiv dword [esp]
sub ecx, ebx
add eax, ecx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 4]
cmp eax, dword [esp + 0xc]
jle 0x50c821
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x10]
shl eax, 7
cdq
idiv ebx
mov ecx, eax
add ecx, 8
movzx eax, byte [esp + 0x24]
sar ecx, 1
jns 0x50c7bf
adc ecx, 0
sub eax, ecx
mov ecx, eax
mov eax, dword [esp + 0x28]
imul ecx
lahf
adc byte [ecx], al
add byte [eax], al
cdq
idiv ebp
movzx ebp, al
mov eax, dword [esp + 0x30]
imul ecx
xor ecx, edx
inc dword [eax]
add byte [eax], al
cdq
idiv ecx
pop ecx
movzx eax, al
shl eax, 8
or ebp, eax
mov eax, dword [esp + 0x2c]
imul ecx
wait
adc byte [ecx], al
add byte [eax], al
cdq
idiv ecx
movzx eax, al
shl eax, 0x10
or ebp, eax
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esi + 0x74db0378]
call fcn.00464c88
mov ecx, edi
mov edx, dword [esp + 0x14]
mov ebp, dword [eax]
call dword [ebp + 0x20]
mov eax, dword [esp + 4]
add eax, dword [esp + 0xc]
test eax, eax
jge 0x50c8ac
mov eax, dword [esp + 0x10]
shl eax, 7
cdq
idiv ebx
mov ecx, 0xf7
sub ecx, eax
movzx eax, byte [esp + 0x24]
sar ecx, 1
jns 0x50c84a
adc ecx, 0
sub eax, ecx
mov ecx, eax
mov eax, dword [esp + 0x28]
imul ecx
lahf
adc byte [ecx], al
add byte [eax], al
cdq
idiv ebp
movzx ebp, al
mov eax, dword [esp + 0x30]
imul ecx
xor ecx, edx
inc dword [eax]
add byte [eax], al
cdq
idiv ecx
pop ecx
movzx eax, al
shl eax, 8
or ebp, eax
mov eax, dword [esp + 0x2c]
imul ecx
wait
adc byte [ecx], al
add byte [eax], al
cdq
idiv ecx
movzx eax, al
shl eax, 0x10
or ebp, eax
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esi + 0x74db0378]
call fcn.00464c88
mov ecx, edi
mov edx, dword [esp + 0x14]
mov ebp, dword [eax]
call dword [ebp + 0x20]
inc dword [esp + 0x10]
dec dword [esp + 0x38]
jne 0x50c767
inc edi
dec dword [esp + 0x34]
jne 0x50c73b
jmp 0x50e0f5