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

Disassembly:
sub esp, 0x50
mov ecx, dword [esp + 0x60]
push ebx
push ebp
mov ebp, dword [esp + 0x5c]
push esi
push edi
mov edi, dword [esp + 0x74]
mov ebx, dword [ebp + 0xd4]
mov eax, dword [ebp + 0xd8]
mov esi, dword [ebp + 0x80]
mov edx, dword [ebp + 0xac]
mov dword [esp + 0x24], eax
or eax, dword [esp + 0x80]
mov dword [esp + 0x2c], ebx
test al, 1
mov ebx, dword [esp + 0x78]
sete byte [esp + 0x64]
mov dword [esp + 0x10], edx
mov dword [esp + 0x30], ebx
lea eax, [ecx + ebx]
cmp eax, esi
jle 0x51abd1
mov ebx, esi
sub ebx, ecx
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x7c]
mov ecx, dword [ebp + 0x84]
mov dword [esp + 0x34], eax
add eax, edi
cmp eax, ecx
jle 0x51abed
mov eax, ecx
sub eax, edi
mov dword [esp + 0x34], eax
test ebx, ebx
jle 0x51ae7e
mov eax, dword [esp + 0x70]
add eax, ebx
js 0x51ae7e
mov ebx, dword [esp + 0x34]
lea eax, [edi + ebx]
test eax, eax
js 0x51ae7e
mov eax, dword [esp + 0x70]
cmp eax, esi
jge 0x51ae7e
cmp edi, ecx
jge 0x51ae7e
xor esi, esi
mov ecx, eax
neg ecx
test eax, eax
cmovns ecx, esi
and dword [esp + 0x80], 0
mov esi, edi
mov dword [esp + 0x40], ecx
neg esi
test edi, edi
cmovns esi, dword [esp + 0x80]
mov dword [esp + 0x38], esi
cmp esi, ebx
jge 0x51ae7e
movsd xmm2, qword [0x6356a8]
lea ebx, [ecx + eax]
movsd xmm3, qword [0x6350a8]
mov edi, dword [ebp + 0xd4]
movss xmm1, dword [0x6356a4]
imul eax, ecx, 3
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x20], 0xff
movsd qword [esp + 0x50], xmm2
movsd qword [esp + 0x58], xmm3
mov dword [esp + 0x3c], eax
cmp dword [ebp + 0xe8], 0
mov eax, dword [esp + 0x74]
lea ecx, [eax + esi]
mov dword [esp + 0x28], ecx
je 0x51acb4
mov ecx, dword [ebp + 0x84]
sub ecx, esi
sub ecx, eax
dec ecx
mov eax, dword [ebp + 0xcc]
imul esi, dword [esp + 0x6c]
imul ebx, edi
imul eax, ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x80], ecx
add esi, dword [esp + 0x3c]
add esi, dword [esp + 0x68]
add ebx, eax
mov dword [esp + 0x78], esi
add ebx, dword [ebp + 0xc8]
cmp ecx, dword [esp + 0x30]
jge 0x51ae67
mov eax, dword [esp + 0x70]
add eax, ecx
cmp dword [ebp + 0xe0], 0
je 0x51ad32
push dword [esp + 0x28]
push eax
push ebp
call fcn.0051a786
mov edi, dword [ebp + 0xd4]
mov edx, eax
movsd xmm2, qword [esp + 0x5c]
add esp, 0xc
movss xmm1, dword [0x6356a4]
movsd xmm3, qword [esp + 0x58]
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x10], edx
cmp dword [ebp + 0xe4], 0
je 0x51ae88
movzx ecx, byte [esi + 1]
movzx edx, byte [esi + 2]
movzx eax, byte [esi]
add edx, ecx
add edx, eax
mov ecx, dword [esp + 0x10]
mov eax, ecx
movzx esi, byte [ebx + 2]
sar eax, 0x18
and ecx, 0xffffff
movzx eax, al
movd xmm0, edx
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x7c], esi
cvtps2pd xmm0, xmm0
divsd xmm0, xmm2
cvtpd2ps xmm1, xmm0
movd xmm0, eax
movzx eax, byte [ebx + 1]
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x1c], eax
mulss xmm1, xmm0
cvttss2si edx, xmm1
shl edx, 0x18
or edx, ecx
movzx ecx, byte [ebx]
cmp edi, 4
jne 0x51ade7
movzx eax, byte [ebx + 3]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, dword [esp + 0x1c]
shl eax, 8
or eax, esi
push eax
mov eax, dword [esp + 0x74]
add eax, dword [esp + 0x84]
push edx
push dword [esp + 0x30]
push eax
call dword [ebp + 0xb8]
mov ecx, eax
mov edx, eax
sar ecx, 0x10
mov dword [esp + 0x7c], ecx
mov ecx, eax
sar edx, 8
sar ecx, 0x18
mov byte [ebx + 3], cl
mov ecx, dword [esp + 0x7c]
jmp 0x51ae1b
or ecx, 0xffffff00
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x70]
add eax, dword [esp + 0x80]
shl ecx, 8
or ecx, dword [esp + 0x7c]
push ecx
push edx
push dword [esp + 0x30]
push eax
call dword [ebp + 0xb8]
mov edx, eax
mov ecx, eax
sar edx, 8
sar ecx, 0x10
mov byte [ebx + 2], al
mov byte [ebx + 1], dl
mov byte [ebx], cl
mov esi, dword [esp + 0x78]
mov ecx, dword [esp + 0x80]
mov edi, dword [ebp + 0xd4]
add esi, 3
movsd xmm2, qword [esp + 0x50]
add ebx, edi
movss xmm1, dword [0x6356a4]
inc ecx
movsd xmm3, qword [esp + 0x58]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x78], esi
mov dword [esp + 0x80], ecx
cmp ecx, dword [esp + 0x30]
jl 0x51acee
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x4c]
inc esi
mov dword [esp + 0x38], esi
cmp esi, dword [esp + 0x34]
jl 0x51ac95
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0x20
mov eax, dword [esp + 0x24]
test al, 2
je 0x51aef2
movzx eax, byte [esi + 1]
movzx ecx, byte [esi + 2]
add ecx, eax
movzx eax, byte [esi]
add ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
cvtps2pd xmm0, xmm0
divsd xmm0, xmm2
cvtpd2ps xmm0, xmm0
comiss xmm0, xmm1
jbe 0x51aecd
xor byte [ebx + 2], dl
mov eax, edx
sar eax, 8
xor byte [ebx + 1], al
mov eax, edx
sar eax, 0x10
xor byte [ebx], al
jmp 0x51ae27
cmp byte [esp + 0x64], 0
je 0x51ae27
mov al, byte [ebp + 0x104]
xor byte [ebx + 2], al
mov al, byte [ebp + 0x108]
xor byte [ebx + 1], al
mov al, byte [ebp + 0x10c]
jmp 0x51aec6
test dword [ebp + 0xd8], 0x100
je 0x51b1fb
mov eax, edx
sar eax, 0x18
cmp byte [esp + 0x64], 0
movzx ecx, al
mov dword [esp + 0x78], ecx
je 0x51b1dc
cmp dword [ebp + 0x110], 0xc0
movzx edi, byte [esi + 2]
jl 0x51b0a8
imul edi, ecx
xor edx, edx
mov eax, edi
mov edi, 0xff
div edi
mov edi, eax
test edi, edi
jne 0x51af49
mov eax, dword [ebp + 0x104]
jmp 0x51af81
mov eax, dword [esp + 0x10]
mov edx, 0xff
mov ecx, dword [ebp + 0x104]
sub edx, edi
imul edx, dword [ebp + 0x110]
movzx eax, al
imul eax, edi
imul ecx, edx
imul eax, eax, 0xff
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x78]
mov byte [ebx + 2], al
xor edx, edx
movzx eax, byte [esi + 1]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [esp + 0x10]
mov edi, eax
test edi, edi
jne 0x51afa6
mov eax, dword [ebp + 0x108]
jmp 0x51aff0
mov eax, ecx
sar eax, 8
cmp dword [ebp + 0x110], 0
movzx eax, al
mov dword [esp + 0x7c], eax
je 0x51aff0
mov ecx, dword [esp + 0x7c]
mov edx, 0xff
mov eax, dword [ebp + 0x108]
sub edx, edi
imul edx, dword [ebp + 0x110]
imul ecx, edi
imul eax, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x78]
xor edx, edx
mov byte [ebx + 1], al
movzx eax, byte [esi]
imul eax, edi
div dword [esp + 0x20]
mov dword [esp + 0x78], eax
test eax, eax
jne 0x51b013
mov ecx, dword [ebp + 0x10c]
jmp 0x51b059
mov eax, ecx
sar eax, 0x10
cmp dword [ebp + 0x110], 0
movzx ecx, al
je 0x51b059
imul ecx, dword [esp + 0x78]
mov edx, 0xff
sub edx, dword [esp + 0x78]
imul edx, dword [ebp + 0x110]
mov eax, dword [ebp + 0x10c]
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, dword [esp + 0x78], 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, eax
mov byte [ebx], cl
movzx eax, byte [esi]
movzx ecx, byte [esi + 2]
add ecx, eax
movzx eax, byte [esi + 1]
add ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
cvtps2pd xmm1, xmm0
movd xmm0, edi
mov edi, 0xff
divsd xmm1, xmm2
mov eax, edi
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
cvttsd2si ecx, xmm1
sub eax, ecx
imul ecx, ecx, 0xff
imul eax, dword [ebp + 0x110]
add eax, ecx
cdq
idiv edi
jmp 0x51b1d8
movzx eax, byte [esi + 1]
movzx ecx, byte [esi]
add eax, edi
add ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
cvtps2pd xmm1, xmm0
movd xmm0, dword [esp + 0x78]
divsd xmm1, xmm2
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
cvttsd2si edi, xmm1
test edi, edi
jne 0x51b0df
mov ecx, dword [ebp + 0x104]
jmp 0x51b11b
mov eax, dword [ebp + 0x110]
movzx ecx, dl
test eax, eax
je 0x51b11b
mov edx, 0xff
imul ecx, edi
sub edx, edi
imul edx, eax
mov eax, dword [ebp + 0x104]
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov edx, dword [esp + 0x10]
mov ecx, eax
mov byte [ebx + 2], cl
test edi, edi
jne 0x51b12a
mov ecx, dword [ebp + 0x108]
jmp 0x51b167
mov eax, edx
sar eax, 8
movzx ecx, al
mov eax, dword [ebp + 0x110]
test eax, eax
je 0x51b167
mov edx, 0xff
imul ecx, edi
sub edx, edi
imul edx, eax
mov eax, dword [ebp + 0x108]
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, eax
mov byte [ebx + 1], cl
test edi, edi
jne 0x51b176
mov ecx, dword [ebp + 0x10c]
jmp 0x51b1b8
mov eax, dword [esp + 0x10]
sar eax, 0x10
cmp dword [ebp + 0x110], 0
movzx ecx, al
je 0x51b1b8
mov eax, dword [ebp + 0x10c]
mov edx, 0xff
sub edx, edi
imul ecx, edi
imul edx, dword [ebp + 0x110]
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov ecx, eax
mov eax, 0xff
mov byte [ebx], cl
sub eax, edi
imul ecx, edi, 0xff
imul eax, dword [ebp + 0x110]
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, eax
jmp 0x51b1ee
mov eax, edx
mov byte [ebx + 2], dl
sar eax, 8
mov byte [ebx + 1], al
mov eax, edx
sar eax, 0x10
mov byte [ebx], al
push 3
pop edx
mov eax, ebx
mov byte [eax + edx], cl
jmp 0x51ae27
test al, 8
je 0x51b287
cmp dword [esp + 0x2c], 4
jne 0x51ae2e
movzx eax, byte [esi + 1]
movzx ecx, byte [esi + 2]
add ecx, eax
movzx eax, byte [esi]
add ecx, eax
mov eax, edx
sar eax, 0x18
cmp byte [esp + 0x64], 0
movzx eax, al
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
mov ecx, dword [esp + 0x80]
cvtps2pd xmm0, xmm0
divsd xmm0, xmm2
movaps xmm2, xmm3
cvtpd2ps xmm1, xmm0
cvtps2pd xmm0, xmm1
subsd xmm2, xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
cvtps2pd xmm1, xmm0
je 0x51b267
movd xmm0, dword [ebp + 0x110]
jmp 0x51b26f
movzx eax, byte [ebx + 3]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm2
addsd xmm0, xmm1
cvttsd2si eax, xmm0
mov byte [ebx + 3], al
jmp 0x51ae2e
test al, 0x30
mov eax, edx
jne 0x51b363
sar eax, 8
mov ecx, 0xff
movzx eax, al
mov dword [esp + 0x78], eax
mov eax, edx
sar eax, 0x10
movzx edi, al
movzx eax, byte [esi + 2]
movzx edx, dl
sub ecx, eax
imul edx, eax
cmp byte [esp + 0x64], 0
je 0x51b31c
mov eax, dword [ebp + 0x104]
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov edx, dword [esp + 0x78]
mov byte [ebx + 2], al
mov eax, 0xff
movzx ecx, byte [esi + 1]
sub eax, ecx
imul edx, ecx
imul eax, dword [ebp + 0x108]
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov byte [ebx + 1], al
mov eax, 0xff
movzx ecx, byte [esi]
sub eax, ecx
imul eax, dword [ebp + 0x10c]
imul edi, ecx
add eax, edi
cdq
mov ecx, 0xff
idiv ecx
mov byte [ebx], al
jmp 0x51ae27
movzx eax, byte [ebx + 2]
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov byte [ebx + 2], al
mov eax, ecx
movzx edx, byte [esi + 1]
movzx ecx, byte [ebx + 1]
sub eax, edx
imul edx, dword [esp + 0x78]
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov byte [ebx + 1], al
mov eax, ecx
movzx edx, byte [esi]
movzx ecx, byte [ebx]
sub eax, edx
imul eax, ecx
imul edi, edx
jmp 0x51b30b
sar eax, 0x18
cmp byte [esp + 0x64], 0
je 0x51b788
mov edi, dword [ebp + 0x110]
movzx ecx, byte [esi + 2]
movzx eax, al
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x1c], eax
cmp edi, 0xc0
jl 0x51b4f0
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov ecx, eax
mov dword [esp + 0x7c], ecx
test ecx, ecx
jne 0x51b3b4
mov ecx, dword [ebp + 0x104]
mov dword [esp + 0x7c], ecx
jmp 0x51b3ea
mov eax, dword [esp + 0x10]
mov edx, 0xff
sub edx, ecx
movzx eax, al
imul eax, ecx
mov ecx, dword [ebp + 0x104]
imul edx, edi
imul eax, eax, 0xff
imul ecx, edx
add eax, ecx
imul ecx, dword [esp + 0x7c], 0xff
add ecx, edx
cdq
idiv ecx
mov dword [esp + 0x7c], eax
movzx eax, byte [esi + 1]
xor edx, edx
mov dword [esp + 0x48], eax
mov ecx, 0xff
imul eax, dword [esp + 0x1c]
div ecx
mov ecx, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
jne 0x51b416
mov ecx, dword [ebp + 0x108]
mov dword [esp + 0x14], ecx
jmp 0x51b44f
mov eax, dword [esp + 0x10]
mov edx, 0xff
sar eax, 8
sub edx, ecx
movzx eax, al
imul eax, ecx
mov ecx, dword [ebp + 0x108]
imul edx, edi
imul eax, eax, 0xff
imul ecx, edx
add eax, ecx
imul ecx, dword [esp + 0x18], 0xff
add ecx, edx
cdq
idiv ecx
mov dword [esp + 0x14], eax
movzx eax, byte [esi]
xor edx, edx
mov dword [esp + 0x44], eax
mov ecx, 0xff
imul eax, dword [esp + 0x1c]
div ecx
mov ecx, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
jne 0x51b476
mov eax, dword [ebp + 0x10c]
jmp 0x51b4ab
mov eax, dword [esp + 0x10]
mov edx, 0xff
sar eax, 0x10
sub edx, ecx
movzx eax, al
imul eax, ecx
mov ecx, dword [ebp + 0x10c]
imul edx, edi
imul eax, eax, 0xff
imul ecx, edx
add eax, ecx
imul ecx, dword [esp + 0x18], 0xff
add ecx, edx
cdq
idiv ecx
movzx ecx, byte [esi + 2]
add ecx, dword [esp + 0x44]
add ecx, dword [esp + 0x48]
mov dword [esp + 0x18], eax
mov eax, 0xff
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
cvtps2pd xmm1, xmm0
movd xmm0, dword [esp + 0x1c]
divsd xmm1, xmm2
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
cvttsd2si ecx, xmm1
sub eax, ecx
imul eax, edi
imul ecx, ecx, 0xff
jmp 0x51b627
movzx eax, byte [esi + 1]
add eax, dword [esp + 0x7c]
movzx ecx, byte [esi]
movd xmm0, dword [esp + 0x1c]
add ecx, eax
cvtdq2ps xmm0, xmm0
movd xmm1, ecx
cvtdq2ps xmm1, xmm1
mulss xmm1, xmm0
cvtps2pd xmm0, xmm1
divsd xmm0, xmm2
cvttsd2si edi, xmm0
test edi, edi
jne 0x51b53f
mov eax, dword [ebp + 0x104]
mov dword [esp + 0x7c], eax
mov eax, dword [ebp + 0x108]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10c]
jmp 0x51b60f
mov ecx, dword [ebp + 0x110]
movzx eax, dl
mov dword [esp + 0x7c], eax
test ecx, ecx
je 0x51b58b
mov eax, dword [ebp + 0x104]
mov edx, 0xff
sub edx, edi
imul edx, ecx
mov ecx, edi
imul ecx, dword [esp + 0x7c]
imul eax, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 0x110]
mov dword [esp + 0x7c], eax
mov eax, edx
sar eax, 8
movzx eax, al
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x51b5d0
mov eax, dword [ebp + 0x108]
mov edx, 0xff
sub edx, edi
imul edx, ecx
mov ecx, edi
imul ecx, dword [esp + 0x14]
imul eax, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, edx
sar eax, 0x10
movzx ecx, al
mov eax, dword [ebp + 0x110]
mov dword [esp + 0x18], ecx
test eax, eax
je 0x51b613
mov edx, 0xff
imul ecx, edi
sub edx, edi
imul edx, eax
mov eax, dword [ebp + 0x10c]
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, edi, 0xff
add ecx, edx
cdq
idiv ecx
mov dword [esp + 0x18], eax
mov eax, 0xff
sub eax, edi
imul eax, dword [ebp + 0x110]
imul ecx, edi, 0xff
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
cmp dword [esp + 0x2c], 3
mov edi, eax
jne 0x51b680
movzx eax, byte [ebx + 2]
sub ecx, edi
mov edx, dword [esp + 0x7c]
imul eax, ecx
imul edx, edi
add eax, edx
cdq
idiv dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov byte [ebx + 2], al
movzx eax, byte [ebx + 1]
imul eax, ecx
imul edx, edi
add eax, edx
cdq
idiv dword [esp + 0x20]
mov byte [ebx + 1], al
movzx eax, byte [ebx]
imul eax, ecx
mov ecx, dword [esp + 0x18]
imul ecx, edi
add eax, ecx
jmp 0x51b30d
movzx edx, byte [ebx + 3]
mov dword [esp + 0x1c], edx
test edi, edi
jne 0x51b692
movzx eax, byte [ebx + 2]
jmp 0x51b6cb
test edx, edx
jne 0x51b69c
mov eax, dword [esp + 0x7c]
jmp 0x51b6cb
movzx eax, byte [ebx + 2]
mov esi, ecx
mov ecx, dword [esp + 0x7c]
sub esi, edi
imul eax, esi
imul ecx, edi
imul esi, edx
imul eax, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edi, 0xff
cdq
add esi, ecx
idiv esi
mov edx, dword [esp + 0x1c]
mov byte [ebx + 2], al
test edi, edi
jne 0x51b6d8
movzx eax, byte [ebx + 1]
jmp 0x51b710
test edx, edx
jne 0x51b6e2
mov eax, dword [esp + 0x14]
jmp 0x51b710
movzx eax, byte [ebx + 1]
mov esi, 0xff
mov ecx, dword [esp + 0x14]
sub esi, edi
imul eax, esi
imul ecx, edi
imul esi, edx
imul eax, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edi, 0xff
cdq
add esi, ecx
idiv esi
mov edx, dword [esp + 0x1c]
mov byte [ebx + 1], al
test edi, edi
jne 0x51b720
movzx eax, byte [ebx]
jmp 0x51b75b
test edx, edx
jne 0x51b72a
mov eax, dword [esp + 0x18]
jmp 0x51b75b
movzx eax, byte [ebx]
mov esi, 0xff
mov ecx, dword [esp + 0x18]
sub esi, edi
imul eax, esi
imul ecx, edi
imul esi, edx
imul eax, edx
imul ecx, ecx, 0xff
add eax, ecx
imul ecx, edi, 0xff
cdq
add esi, ecx
idiv esi
mov edx, dword [esp + 0x1c]
mov byte [ebx], al
mov eax, dword [esp + 0x24]
test al, 0x10
je 0x51ae23
mov esi, 0xff
mov eax, esi
sub eax, edi
imul eax, edx
imul ecx, edi, 0xff
add eax, ecx
cdq
idiv esi
mov byte [ebx + 3], al
jmp 0x51ae23
cmp dword [esp + 0x2c], 3
jne 0x51b82e
movzx edi, al
xor edx, edx
movzx eax, byte [esi + 2]
mov ecx, 0xff
imul eax, edi
div ecx
mov edx, ecx
movzx ecx, byte [ebx + 2]
sub edx, eax
imul edx, ecx
mov ecx, dword [esp + 0x10]
movzx ecx, cl
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
xor edx, edx
mov byte [ebx + 2], al
movzx eax, byte [esi + 1]
imul eax, edi
div ecx
mov ecx, dword [esp + 0x10]
sar ecx, 8
movzx esi, cl
mov ecx, 0xff
sub ecx, eax
imul esi, eax
movzx eax, byte [ebx + 1]
imul eax, ecx
mov ecx, 0xff
add eax, esi
cdq
idiv ecx
xor edx, edx
mov byte [ebx + 1], al
mov eax, dword [esp + 0x78]
movzx eax, byte [eax]
imul eax, edi
mov edi, ecx
mov ecx, dword [esp + 0x10]
sar ecx, 0x10
movzx esi, cl
div edi
mov edx, edi
imul esi, eax
sub edx, eax
movzx eax, byte [ebx]
imul eax, edx
add eax, esi
cdq
idiv edi
mov byte [ebx], al
jmp 0x51ae23
cmp byte [ebx + 3], 0xc0
movzx edi, byte [ebx + 3]
movzx eax, al
mov dword [esp + 0x7c], eax
movzx eax, byte [esi + 2]
mov dword [esp + 0x48], eax
jb 0x51b9cf
imul eax, dword [esp + 0x7c]
xor edx, edx
mov ecx, 0xff
div ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x51b86b
movzx eax, byte [ebx + 2]
jmp 0x51b8b4
movzx eax, cl
mov dword [esp + 0x48], eax
test edi, edi
je 0x51b8b4
movzx eax, byte [ebx + 2]
mov edx, 0xff
mov ecx, dword [esp + 0x48]
mov esi, edi
imul ecx, dword [esp + 0x1c]
sub edx, dword [esp + 0x1c]
imul eax, edi
imul esi, edx
imul ecx, ecx, 0xff
imul eax, edx
add eax, ecx
imul ecx, dword [esp + 0x1c], 0xff
cdq
add esi, ecx
mov ecx, dword [esp + 0x10]
idiv esi
mov esi, dword [esp + 0x78]
mov byte [ebx + 2], al
xor edx, edx
movzx eax, byte [esi + 1]
imul eax, dword [esp + 0x7c]
div dword [esp + 0x20]
mov edx, eax
test edx, edx
jne 0x51b8d2
movzx ecx, byte [ebx + 1]
jmp 0x51b90e
mov eax, ecx
sar eax, 8
movzx ecx, al
test edi, edi
je 0x51b90e
movzx eax, byte [ebx + 1]
mov esi, 0xff
sub esi, edx
imul ecx, edx
imul eax, esi
imul esi, edi
imul ecx, ecx, 0xff
imul eax, edi
add eax, ecx
imul ecx, edx, 0xff
cdq
add esi, ecx
idiv esi
mov esi, dword [esp + 0x78]
mov ecx, eax
mov byte [ebx + 1], cl
xor edx, edx
movzx eax, byte [esi]
mov ecx, 0xff
imul eax, dword [esp + 0x7c]
div ecx
mov ecx, eax
mov dword [esp + 0x48], ecx
test ecx, ecx
jne 0x51b931
movzx edx, byte [ebx]
jmp 0x51b970
mov eax, dword [esp + 0x10]
sar eax, 0x10
movzx edx, al
test edi, edi
je 0x51b970
movzx eax, byte [ebx]
mov esi, 0xff
sub esi, ecx
imul ecx, edx
imul eax, esi
imul esi, edi
imul ecx, ecx, 0xff
imul eax, edi
add eax, ecx
imul ecx, dword [esp + 0x48], 0xff
cdq
add esi, ecx
idiv esi
mov esi, dword [esp + 0x78]
mov edx, eax
mov eax, dword [esp + 0x24]
mov byte [ebx], dl
test al, 0x10
je 0x51ae27
movzx eax, byte [esi]
movzx ecx, byte [esi + 2]
add ecx, eax
movzx eax, byte [esi + 1]
add ecx, eax
mov eax, 0xff
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
cvtps2pd xmm1, xmm0
movd xmm0, dword [esp + 0x7c]
divsd xmm1, xmm2
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm0
cvttsd2si ecx, xmm1
sub eax, ecx
imul ecx, ecx, 0xff
imul eax, edi
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov byte [ebx + 3], al
jmp 0x51ae27
movzx eax, byte [esi + 1]
add eax, dword [esp + 0x48]
movzx ecx, byte [esi]
movd xmm0, dword [esp + 0x7c]
add ecx, eax
cvtdq2ps xmm0, xmm0
movd xmm1, ecx
cvtdq2ps xmm1, xmm1
mulss xmm1, xmm0
cvtps2pd xmm0, xmm1
divsd xmm0, xmm2
cvttsd2si ecx, xmm0
mov dword [esp + 0x7c], ecx
test ecx, ecx
jne 0x51ba09
movzx eax, byte [ebx + 2]
jmp 0x51ba4c
movzx eax, dl
mov dword [esp + 0x48], eax
test edi, edi
je 0x51ba4c
movzx eax, byte [ebx + 2]
mov esi, 0xff
sub esi, ecx
imul ecx, dword [esp + 0x48]
imul eax, esi
imul esi, edi
imul ecx, ecx, 0xff
imul eax, edi
add eax, ecx
cvttsd2si ecx, xmm0
cdq
imul ecx, ecx, 0xff
add esi, ecx
mov ecx, dword [esp + 0x7c]
idiv esi
mov edx, dword [esp + 0x10]
mov byte [ebx + 2], al
test ecx, ecx
jne 0x51ba59
movzx edx, byte [ebx + 1]
jmp 0x51ba99
mov eax, edx
sar eax, 8
movzx edx, al
test edi, edi
je 0x51ba99
movzx eax, byte [ebx + 1]
mov esi, 0xff
sub esi, ecx
imul edx, ecx
imul eax, esi
imul esi, edi
imul ecx, edx, 0xff
imul eax, edi
add eax, ecx
cvttsd2si ecx, xmm0
cdq
imul ecx, ecx, 0xff
add esi, ecx
mov ecx, dword [esp + 0x7c]
idiv esi
mov edx, eax
mov byte [ebx + 1], dl
test ecx, ecx
jne 0x51baa5
movzx edx, byte [ebx]
jmp 0x51bae6
mov eax, dword [esp + 0x10]
sar eax, 0x10
movzx edx, al
test edi, edi
je 0x51bae6
movzx eax, byte [ebx]
mov esi, 0xff
sub esi, ecx
imul edx, ecx
imul eax, esi
imul esi, edi
imul ecx, edx, 0xff
imul eax, edi
add eax, ecx
cvttsd2si ecx, xmm0
cdq
imul ecx, ecx, 0xff
add esi, ecx
mov ecx, dword [esp + 0x7c]
idiv esi
mov edx, eax
mov eax, dword [esp + 0x24]
mov byte [ebx], dl
test al, 0x10
je 0x51ae23
mov esi, 0xff
mov eax, esi
sub eax, ecx
imul eax, edi
imul ecx, ecx, 0xff
jmp 0x51b77b