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

Disassembly:
mov ecx, dword [0x8602c0]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x51b53a
sub esp, 0x5c
mov ecx, dword [esp + 0x78]
cmp ecx, 1
jle 0x51b39f
lea edx, [ecx - 1]
test ecx, edx
jne 0x51b39f
mov eax, dword [esp + 0x7c]
mov edx, eax
sar edx, 0x1f
mov ebx, dword [esp + 0x80]
mov ebp, edx
mov esi, eax
mul ebx
imul ebp, ebx
add edx, ebp
mov ebp, ebx
sar ebx, 0x1f
imul ebx, esi
add edx, ebx
test edx, edx
seta dl
sete bl
cmp eax, 0x40000000
xchg edi, ebx
setae bl
xchg edi, ebx
and ebx, edi
or edx, ebx
test dl, dl
jne 0x51b344
test ebp, ebp
je 0x51b534
mov eax, 0xffffff
cmp ebp, 0xffffffff
je 0x51b21b
cdq
idiv ebp
jmp 0x51b21d
neg eax
cmp esi, eax
jg 0x51b344
cmp esi, 0x7fffff
jg 0x51b344
test esi, esi
je 0x51b534
mov eax, 0xffffff
cmp esi, 0xffffffff
je 0x51b248
cdq
idiv esi
jmp 0x51b24a
neg eax
cmp ecx, eax
jg 0x51b344
lea eax, [0x60dc40]
mov dword [esp], eax
shl esi, 6
mov dword [esp + 0x40], esi
mov dword [esp + 4], esi
mov dword [esp + 8], esi
call fcn.0044da60
mov eax, dword [esp + 0x78]
shl eax, 5
mov edx, dword [esp + 0x7c]
imul eax, edx
mov dword [esp + 0x38], eax
mov ebx, dword [esp + 0x80]
shl ebx, 7
imul ebx, edx
mov dword [esp + 0x44], ebx
mov esi, dword [esp + 0xc]
mov dword [esp + 0x58], esi
lea edi, [0x60dc40]
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], eax
call fcn.0044da60
mov eax, dword [esp + 0xc]
mov dword [esp + 0x54], eax
mov ecx, dword [esp + 0x60]
mov dword [esp], ecx
mov edx, dword [esp + 0x64]
mov dword [esp + 4], edx
mov ebx, dword [esp + 0x68]
mov dword [esp + 8], ebx
mov ebp, dword [esp + 0x6c]
mov dword [esp + 0xc], ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], 1
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x1c], ebp
lea ebp, [0x64ce40]
mov dword [esp + 0x20], ebp
call fcn.00519d20
mov eax, dword [esp + 0x24]
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x30], ecx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x34], edx
mov ebx, dword [esp + 0x80]
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x38]
mov dword [esp + 0x48], eax
xor eax, eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
jmp 0x51b48e
nop
lea eax, [0x615580]
mov dword [esp], eax
call fcn.0040c2d0
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x20
lea ecx, [0x6444a5]
mov dword [eax], ecx
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
lea ecx, [0x689e20]
mov dword [esp + 0x94], ecx
mov dword [esp + 0x98], eax
add esp, 0x5c
ret
nop
lea eax, [0x615580]
mov dword [esp], eax
call fcn.0040c2d0
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x26
lea ecx, [0x64661b]
mov dword [eax], ecx
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
lea ecx, [0x689e20]
mov dword [esp + 0x94], ecx
mov dword [esp + 0x98], eax
add esp, 0x5c
ret
sub edx, ebp
mov dword [esp + 0x44], edx
sub ecx, ebp
neg edx
sar edx, 0x1f
and edx, ebp
add edx, eax
mov dword [esp], edx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x54]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], esi
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
call fcn.0051ab50
mov eax, dword [esp + 0x3c]
inc eax
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x58]
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x78]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x80]
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x38]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x50]
mov ebp, dword [esp + 0x3c]
cmp ebx, ebp
jle 0x51b4ad
shl ebp, 7
mov ebx, dword [esp + 0x7c]
imul ebp, ebx
cmp ecx, ebp
jae 0x51b3fa
jmp 0x51b52d
mov ebx, dword [esp + 0x60]
mov dword [esp], ebx
mov ebx, dword [esp + 0x64]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x68]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x84]
mov dword [esp + 0x1c], eax
lea eax, [0x64ce40]
mov dword [esp + 0x20], eax
call fcn.00519d20
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
add esp, 0x5c
ret
mov eax, ebp
call fcn.00467d10
call fcn.00436f20
nop
call fcn.00466840
jmp fcn.0051b190