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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x114
mov eax, dword [0x5d60c4]
xor eax, esp
mov dword [esp + 0x110], eax
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 0x18]
mov dword [esp + 0x4c], eax
lea eax, [edx + 0x70]
mov dword [esp + 0x40], ecx
mov ecx, dword [ebp + 0x14]
push edi
push dword [ebp + 0x1c]
mov edi, dword [edx + 0xc]
add edi, dword [edx + 4]
mov dword [esp + 0x44], eax
lea eax, [ecx + esi]
mov dword [esp + 0x4c], eax
add eax, 0xfffffff8
push edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x94], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x64], eax
call fcn.0050a410
mov dword [esp + 0x9c], eax
mov ecx, 0xfff
mov eax, dword [edx + 0xcc]
xorps xmm0, xmm0
cmp eax, ecx
mov ebx, dword [edx + 0x84]
movaps xmmword [esp + 0xd8], xmm0
cmovb ecx, eax
mov dword [esp + 0x1c], ebx
xor eax, eax
mov dword [esp + 0xa4], ecx
cmp dword [edx + 0xc8], 3
mov ecx, 0x5a69c0
movups xmmword [esp + 0xbc], xmm0
setne al
mov dword [esp + 0xa0], 0
add eax, 3
mov dword [esp + 0x104], 0
mov dword [esp + 0x54], eax
mov eax, dword [edx + 0x1c]
mov dword [esp + 0x98], eax
mov eax, dword [edx + 0x80]
mov dword [esp + 0x40], eax
mov eax, dword [edx + 0xd4]
test eax, eax
push esi
cmovne ecx, eax
mov dword [esp + 0x100], 0
push 0
mov dword [esp + 0x108], 0
mov eax, dword [ecx + 0x10]
movups xmm0, xmmword [ecx]
mov dword [esp + 0x100], eax
lea eax, [esp + 0xf0]
push eax
movups xmmword [esp + 0xf4], xmm0
call fcn.00509b40
push 2
push esi
mov esi, dword [esp + 0xa8]
push esi
push dword [esp + 0x60]
call fcn.00509c20
xor ecx, ecx
add esp, 0x24
cmp esi, edi
sete cl
add ecx, esi
mov dword [esp + 0x24], ecx
cmp ecx, dword [esp + 0x5c]
jae 0x5094f0
mov edi, dword [esp + 0x18]
nop dword [eax]
push dword [esp + 0x4c]
mov esi, dword [esp + 0x3c]
mov eax, ecx
sub eax, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
mov eax, 0
sete al
push eax
push dword [esp + 0x58]
lea eax, [esp + 0x9c]
push dword [esp + 0x54]
push ecx
push eax
push edi
push esi
call dword [esp + 0xb4]
mov edx, dword [esp + 0x44]
sub edx, dword [esp + 0xac]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x68]
sub eax, dword [esp + 0x44]
push eax
push edx
lea eax, [esp + 0x38]
mov dword [esp + 0xd4], edx
push eax
lea eax, [esp + 0x10c]
push esi
push eax
call fcn.00509a30
mov esi, dword [esp + 0x44]
add esp, 0x34
test esi, esi
jne 0x508921
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x24], ecx
jmp 0x5094e6
mov ecx, dword [esp + 0x50]
mov eax, dword [ecx]
mov dword [ebx + 0x10], eax
mov eax, dword [ecx + 4]
mov dword [ebx + 0x14], eax
mov eax, dword [ecx + 8]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x28]
mov dword [ebx + 8], 0
add ebx, 0xc
mov dword [esp + 0x54], ebx
mov dword [ebx], eax
cmp dword [edi + 0xa8], 1
jne 0x508965
lea edx, [eax + 1]
bsr ecx, edx
shl edx, 8
shr edx, cl
shl ecx, 8
add edx, ecx
jmp 0x5089c2
cmp eax, 0x20000
jne 0x508987
push 2
lea eax, [edi + 0x70]
push eax
push 0x1ffff
call fcn.00509980
add esp, 0xc
lea edx, [eax + 0x100]
jmp 0x5089be
cmp eax, 0x3f
jbe 0x508994
bsr edx, eax
add edx, 0x13
jmp 0x50899b
movzx edx, byte [eax + 0x5a69d8]
mov eax, dword [edi + 0x74]
mov eax, dword [eax + edx*4]
movzx edx, byte [edx + 0x5a6864]
inc eax
bsr ecx, eax
shl eax, 8
sub edx, ecx
shr eax, cl
shl edx, 8
sub edx, eax
add edx, dword [edi + 0x9c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov dword [ecx], edx
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + esi*8 - 4]
cmp ecx, dword [esp + 0x9c]
jbe 0x508a74
movaps xmm2, xmmword [esp + 0xd0]
mov ebx, dword [esp + 0x28]
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xbc], ecx
mov edx, dword [eax + esi*8 - 8]
mov dword [esp + 0xb8], edx
movups xmm1, xmmword [esp + 0xb4]
xor esi, esi
mov dword [esp + 0x1c], esi
lea eax, [esi*8]
sub eax, esi
mov esi, dword [esp + 0x14]
movq xmm0, qword [esi + eax*4 + 0x10]
lea eax, [esi + eax*4]
test ecx, ecx
je 0x50926a
mov ecx, dword [eax + 0x18]
movq qword [esp + 0x78], xmm0
mov dword [esp + 0x80], ecx
cmp edx, 3
jbe 0x509224
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x7c], eax
lea eax, [edx - 3]
mov dword [esp + 0x78], eax
movq xmm0, qword [esp + 0x78]
movq qword [ebx], xmm0
mov dword [ebx + 8], ecx
jmp 0x509278
cmp dword [edi + 0xa8], 1
jne 0x508a93
mov eax, 1
mov esi, 0x100
bsr ecx, eax
shr esi, cl
shl ecx, 8
add esi, ecx
jmp 0x508aaf
mov eax, dword [edi + 0x74]
mov eax, dword [eax]
inc eax
bsr ecx, eax
shl eax, 8
imul esi, ecx, 0xffffff00
shr eax, cl
sub esi, eax
add esi, dword [edi + 0x9c]
mov edi, dword [esp + 0x4c]
add edx, esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x30], edx
lea ecx, [edi - 1]
lea eax, [esi + 0x1c]
mov dword [eax], 0x40000000
lea eax, [eax + 0x1c]
sub ecx, 1
jne 0x508ac3
xor eax, eax
mov dword [esp + 0x20], eax
cmp dword [esp + 0x10], eax
jbe 0x508bec
mov ebx, dword [esp + 0x38]
mov ecx, dword [ebx + eax*8]
mov eax, dword [ebx + eax*8 + 4]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x58], eax
cmp edi, eax
ja 0x508bd5
lea ebx, [edi*8]
sub ebx, edi
inc ebx
lea ebx, [esi + ebx*4]
nop dword [eax]
mov eax, dword [esp + 0x18]
bsr esi, ecx
cmp dword [eax + 0xa8], 1
jne 0x508b39
lea eax, [edi - 2]
bsr ecx, eax
shl eax, 8
shr eax, cl
add ecx, 0x10
add ecx, esi
add eax, edx
shl ecx, 8
add ecx, eax
jmp 0x508ba8
mov edx, eax
mov eax, dword [edx + 0x7c]
mov eax, dword [eax + esi*4]
inc eax
bsr ecx, eax
shl eax, 8
sub esi, ecx
shr eax, cl
shl esi, 8
sub esi, eax
lea eax, [edi - 3]
add esi, dword [edx + 0xa4]
cmp eax, 0x7f
jbe 0x508b67
bsr ecx, eax
add ecx, 0x24
jmp 0x508b6e
movzx ecx, byte [edi + 0x5a6a15]
mov eax, dword [edx + 0x78]
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + ecx*4]
mov eax, dword [esp + 0x2c]
inc edx
bsr ecx, edx
movzx eax, byte [eax + 0x5a68d4]
sub eax, ecx
shl edx, 8
shr edx, cl
mov ecx, dword [esp + 0x18]
shl eax, 8
sub eax, edx
mov edx, dword [esp + 0x30]
add eax, dword [ecx + 0xa0]
lea ecx, [edx + 0x33]
add ecx, eax
add ecx, esi
mov eax, dword [esp + 0x3c]
mov dword [ebx], eax
mov eax, dword [esp + 0x28]
mov dword [ebx + 4], edi
inc edi
mov dword [ebx - 4], ecx
mov ecx, dword [esp + 0x3c]
mov dword [ebx + 8], eax
add ebx, 0x1c
cmp edi, dword [esp + 0x58]
jbe 0x508b10
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x10]
jb 0x508ae5
mov ebx, dword [esp + 0x54]
lea esi, [edi - 1]
mov eax, 1
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], eax
cmp esi, eax
jb 0x5091bf
cmp dword [ebx - 4], 0
jne 0x508c0f
mov edi, dword [ebx]
inc edi
jmp 0x508c14
mov edi, 1
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0xb0], 2
jne 0x508c2b
mov dword [esp + 0x10], 0x800
jmp 0x508c79
cmp dword [ecx + 0xa8], 1
jne 0x508c3e
mov dword [esp + 0x10], 0x600
jmp 0x508c79
mov esi, dword [ecx + 0x98]
mov ecx, dword [esp + 0x24]
lea edx, [esi - 0x100]
movzx ecx, byte [ecx + eax - 1]
mov eax, dword [esp + 0x40]
mov eax, dword [eax]
mov eax, dword [eax + ecx*4]
inc eax
bsr ecx, eax
shl eax, 8
shr eax, cl
shl ecx, 8
add eax, ecx
mov ecx, dword [esp + 0x18]
cmp eax, edx
cmovbe edx, eax
sub esi, edx
mov dword [esp + 0x10], esi
cmp dword [ecx + 0xa8], 1
jne 0x508c94
lea esi, [edi + 1]
bsr ecx, esi
shl esi, 8
shr esi, cl
shl ecx, 8
add esi, ecx
jmp 0x508cf2
cmp edi, 0x20000
jne 0x508cb7
push 2
push dword [esp + 0x44]
push 0x1ffff
call fcn.00509980
add esp, 0xc
lea esi, [eax + 0x100]
jmp 0x508cf2
cmp edi, 0x3f
jbe 0x508cc4
bsr edx, edi
add edx, 0x13
jmp 0x508ccb
movzx edx, byte [edi + 0x5a69d8]
mov eax, dword [ecx + 0x74]
movzx esi, byte [edx + 0x5a6864]
mov eax, dword [eax + edx*4]
inc eax
bsr ecx, eax
shl eax, 8
sub esi, ecx
shr eax, cl
shl esi, 8
sub esi, eax
mov eax, dword [esp + 0x18]
add esi, dword [eax + 0x9c]
mov ecx, dword [esp + 0x18]
lea eax, [edi - 1]
cmp dword [ecx + 0xa8], 1
jne 0x508d13
bsr ecx, edi
mov edx, edi
shl edx, 8
shr edx, cl
shl ecx, 8
add edx, ecx
jmp 0x508d72
cmp eax, 0x20000
jne 0x508d35
push 2
push dword [esp + 0x44]
push 0x1ffff
call fcn.00509980
add esp, 0xc
lea edx, [eax + 0x100]
jmp 0x508d72
cmp eax, 0x3f
jbe 0x508d42
bsr edx, eax
add edx, 0x13
jmp 0x508d49
movzx edx, byte [eax + 0x5a69d8]
mov eax, ecx
mov eax, dword [eax + 0x74]
mov eax, dword [eax + edx*4]
movzx edx, byte [edx + 0x5a6864]
inc eax
bsr ecx, eax
shl eax, 8
sub edx, ecx
shr eax, cl
shl edx, 8
sub edx, eax
mov eax, dword [esp + 0x18]
add edx, dword [eax + 0x9c]
mov eax, dword [ebx - 0xc]
mov ecx, dword [ebx + 0x10]
sub eax, edx
add eax, dword [esp + 0x10]
add eax, esi
mov dword [esp + 0x2c], ecx
cmp eax, ecx
jg 0x508da0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], edi
mov dword [esp + 0x2c], eax
mov dword [ebx + 0x10], eax
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x508e48
mov ecx, dword [esp + 0x20]
mov edx, dword [ebx + 0x14]
sub ecx, esi
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [esp + 0x14]
movq xmm0, qword [ecx + eax*4 + 0x10]
mov ecx, dword [ecx + eax*4 + 0x18]
movq qword [esp + 0x68], xmm0
mov dword [esp + 0x70], ecx
cmp edx, 3
jbe 0x508df6
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x6c], eax
lea eax, [edx - 3]
lea edx, [ebx + 0x1c]
mov dword [esp + 0x68], eax
mov dword [esp + 0x10], edx
jmp 0x508e34
xor eax, eax
lea edi, [ebx + 0x1c]
cmp dword [edi], eax
mov dword [esp + 0x10], edi
sete al
dec eax
add eax, edx
je 0x508e34
mov edi, dword [esp + 0x68]
cmp eax, 3
jne 0x508e17
lea edx, [edi - 1]
jmp 0x508e20
mov edx, dword [esp + eax*4 + 0x68]
cmp eax, 2
jb 0x508e24
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x6c], edi
mov dword [esp + 0x68], edx
mov dword [esp + 0x10], eax
movq xmm0, qword [esp + 0x68]
movq qword [ebx + 0x20], xmm0
mov dword [ebx + 0x28], ecx
mov ecx, dword [esp + 0x10]
jmp 0x508e5f
movq xmm0, qword [ebx + 4]
lea ecx, [ebx + 0x1c]
mov eax, dword [ebx + 0xc]
movq qword [ebx + 0x20], xmm0
mov dword [ebx + 0x28], eax
mov dword [esp + 0x10], ecx
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add edi, eax
cmp edi, dword [esp + 0x5c]
ja 0x509149
cmp eax, dword [esp + 0x1c]
je 0x5091bb
xor eax, eax
test esi, esi
setne al
mov dword [esp + 0x30], eax
test esi, esi
jne 0x508e94
mov eax, dword [ecx]
mov dword [esp + 0x28], eax
jmp 0x508e9c
mov dword [esp + 0x28], 0
mov esi, dword [esp + 0x18]
cmp dword [esi + 0xa8], 1
jne 0x508ec1
mov eax, 1
bsr ecx, eax
mov eax, 0x100
mov edx, ecx
shr eax, cl
shl edx, 8
add edx, eax
jmp 0x508edd
mov eax, dword [esi + 0x74]
mov eax, dword [eax]
inc eax
bsr ecx, eax
shl eax, 8
imul edx, ecx, 0xffffff00
shr eax, cl
sub edx, eax
add edx, dword [esi + 0x9c]
push dword [esp + 0x4c]
mov eax, dword [esp + 0x30]
push dword [esp + 0x34]
add eax, edx
mov dword [esp + 0xa8], eax
lea eax, [ebx + 0x20]
mov ebx, dword [esp + 0x50]
push eax
push ebx
push edi
lea eax, [esp + 0xa4]
push eax
push esi
mov esi, dword [esp + 0x54]
push esi
call dword [esp + 0xb4]
mov dword [esp + 0x4c], eax
sub ebx, edi
mov eax, dword [esp + 0xcc]
mov edi, dword [esp + 0x40]
add eax, edi
push ebx
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x10c]
push esi
push eax
call fcn.00509a30
mov ebx, dword [esp + 0x60]
add esp, 0x34
test ebx, ebx
je 0x509145
mov ecx, dword [esi + ebx*8 - 4]
cmp ecx, dword [esp + 0x9c]
ja 0x509160
lea eax, [ecx + edi]
cmp eax, 0x1000
jae 0x509160
xor edx, edx
mov dword [esp + 0x30], edx
test ebx, ebx
je 0x509145
lea eax, [esi - 4]
nop dword [eax + eax]
mov ecx, dword [eax + 4]
lea ebx, [eax + 8]
mov dword [esp + 0x64], ebx
mov ebx, dword [ebx]
mov dword [esp + 0x58], ecx
mov dword [esp + 0xa4], ebx
test edx, edx
je 0x508fa0
mov eax, dword [eax]
inc eax
jmp 0x508fa4
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x54], eax
cmp ebx, eax
jb 0x509132
mov esi, dword [esp + 0x14]
lea edx, [ebx + 0x5a6a15]
add edi, ebx
mov dword [esp + 0xa8], edx
lea eax, [edi*8]
sub eax, edi
lea eax, [esi + eax*4]
mov dword [esp + 0x3c], eax
mov eax, 0xfffffffe
sub eax, dword [esp + 0x20]
mov dword [esp + 0xb0], eax
mov eax, 0xfffffffd
sub eax, dword [esp + 0x20]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x18]
bsr esi, ecx
cmp dword [eax + 0xa8], 1
jne 0x509022
mov eax, dword [esp + 0xb0]
lea edx, [esi + 0x10]
add eax, edi
bsr ecx, eax
shl eax, 8
add edx, ecx
shr eax, cl
shl edx, 8
add eax, dword [esp + 0xa0]
jmp 0x509092
mov eax, dword [eax + 0x7c]
mov eax, dword [eax + esi*4]
inc eax
bsr ecx, eax
shl eax, 8
sub esi, ecx
shr eax, cl
mov ecx, dword [esp + 0x18]
shl esi, 8
sub esi, eax
mov eax, dword [esp + 0x60]
add eax, edi
add esi, dword [ecx + 0xa4]
cmp eax, 0x7f
jbe 0x509055
bsr ebx, eax
add ebx, 0x24
jmp 0x509058
movzx ebx, byte [edx]
mov eax, dword [ecx + 0x78]
mov edx, dword [eax + ebx*4]
movzx eax, byte [ebx + 0x5a68d4]
inc edx
mov ebx, dword [esp + 0xa4]
bsr ecx, edx
shl edx, 8
sub eax, ecx
shr edx, cl
mov ecx, dword [esp + 0x18]
shl eax, 8
sub eax, edx
mov edx, dword [esp + 0xa0]
add eax, dword [ecx + 0xa0]
add eax, esi
add edx, 0x33
mov esi, dword [esp + 0x1c]
add edx, eax
cmp edi, esi
ja 0x5090a6
mov ecx, dword [esp + 0x3c]
cmp edx, dword [ecx]
jge 0x5090fd
jmp 0x5090cf
lea ecx, [esi + 1]
mov dword [esp + 0x1c], edi
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [esp + 0x14]
lea eax, [ecx + eax*4]
mov ecx, edi
sub ecx, esi
mov dword [eax], 0x40000000
lea eax, [eax + 0x1c]
sub ecx, 1
jne 0x5090c1
mov esi, dword [esp + 0x14]
lea eax, [edi*8]
mov ecx, dword [esp + 0x14]
sub eax, edi
mov dword [esi + eax*4 + 8], ebx
mov esi, dword [esp + 0x58]
mov dword [ecx + eax*4 + 4], esi
mov esi, dword [esp + 0x28]
mov dword [ecx + eax*4 + 0xc], esi
mov esi, ecx
mov ecx, dword [esp + 0x3c]
mov dword [esi + eax*4], edx
mov edx, dword [esp + 0xa8]
sub ecx, 0x1c
dec ebx
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x58]
dec edx
dec edi
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], edx
cmp ebx, dword [esp + 0x54]
jae 0x508ff0
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x64]
inc edx
mov dword [esp + 0x30], edx
cmp edx, dword [esp + 0x2c]
jb 0x508f80
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
inc eax
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x20], eax
cmp eax, esi
jbe 0x508c04
jmp 0x5091bf
mov edx, dword [esi + ebx*8 - 8]
lea eax, [edi*8]
mov esi, dword [esp + 0x14]
sub eax, edi
mov ebx, dword [esp + 0x28]
mov dword [esp + 0xbc], ecx
mov dword [esp + 0xb8], edx
cmp dword [esi + eax*4 + 8], 0
mov dword [esp + 0xc0], ebx
jne 0x509197
mov eax, dword [esi + eax*4 + 0xc]
jmp 0x509199
xor eax, eax
movups xmm1, xmmword [esp + 0xb4]
sub edi, eax
xor esi, esi
movaps xmm2, xmmword [esp + 0xd0]
cmp edi, 0x1000
cmovbe esi, edi
jmp 0x508a10
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
lea eax, [esi*8]
sub eax, esi
movups xmm1, xmmword [ecx + eax*4]
movq xmm2, qword [ecx + eax*4 + 0x10]
mov eax, dword [ecx + eax*4 + 0x18]
movaps xmm0, xmm1
psrldq xmm0, 8
movd ecx, xmm0
movaps xmm0, xmm1
psrldq xmm0, 0xc
movd ebx, xmm0
mov dword [esp + 0x98], eax
movups xmmword [esp + 0xb4], xmm1
mov edx, dword [esp + 0xb8]
movaps xmmword [esp + 0xd0], xmm2
lea eax, [ecx + ebx]
cmp esi, eax
jbe 0x508a0e
sub esi, ecx
sub esi, ebx
jmp 0x508a10
xor eax, eax
test ebx, ebx
sete al
dec eax
add eax, edx
je 0x509257
mov esi, dword [esp + 0x78]
cmp eax, 3
jne 0x50923e
lea edx, [esi - 1]
jmp 0x509247
mov edx, dword [esp + eax*4 + 0x78]
cmp eax, 2
jb 0x50924b
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x7c], esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x78], edx
mov ebx, dword [esp + 0x50]
movq xmm0, qword [esp + 0x78]
movq qword [ebx], xmm0
mov dword [ebx + 8], ecx
jmp 0x509278
mov ecx, dword [esp + 0x50]
movq qword [ecx], xmm0
mov eax, dword [eax + 0x18]
mov dword [ecx + 8], eax
mov edx, dword [esp + 0x1c]
lea ecx, [edx + 1]
lea eax, [ecx*8]
mov dword [esp + 0x10], ecx
sub eax, ecx
mov edi, ecx
lea esi, [esi + eax*4]
mov eax, dword [esp + 0x98]
movups xmmword [esi], xmm1
movq qword [esi + 0x10], xmm2
mov dword [esi + 0x18], eax
test edx, edx
je 0x509325
nop word [eax + eax]
mov ecx, dword [esp + 0x14]
lea eax, [edx*8]
sub eax, edx
lea esi, [esi - 0x1c]
movups xmm1, xmmword [ecx + eax*4]
lea edx, [ecx + eax*4]
dec edi
movq xmm0, qword [edx + 0x10]
mov ebx, edi
movq qword [esp + 0x110], xmm0
movaps xmm0, xmm1
psrldq xmm0, 8
movd ecx, xmm0
movups xmm0, xmmword [edx]
psrldq xmm1, 0xc
movups xmmword [esi], xmm0
movq xmm0, qword [edx + 0x10]
movd eax, xmm1
movq qword [esi + 0x10], xmm0
add ecx, eax
mov eax, dword [edx + 0x18]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x1c]
sub eax, ecx
cmp ecx, dword [esp + 0x1c]
sbb edx, edx
and edx, eax
mov dword [esp + 0x1c], edx
ja 0x5092b0
mov ecx, dword [esp + 0x10]
cmp ebx, ecx
ja 0x509469
mov edx, dword [esp + 0x14]
lea ebx, [edi*8]
sub ebx, edi
add edx, 8
sub ecx, edi
inc ecx
mov dword [esp + 0x10], ecx
lea ebx, [edx + ebx*4]
nop
mov edi, dword [ebx]
mov esi, dword [ebx + 4]
mov eax, dword [ebx - 4]
mov dword [esp + 0x30], edi
mov dword [esp + 0x64], eax
lea edx, [edi + esi]
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x34]
add edx, esi
mov dword [esp + 0x24], edx
test edi, edi
je 0x509459
push edi
push eax
push dword [esp + 0x3c]
push esi
push dword [esp + 0x50]
call fcn.0050a560
mov ecx, dword [esp + 0x5c]
add esp, 0x14
mov edx, dword [esp + 0x44]
add ecx, 0xffffffe0
mov eax, dword [edx + 0xc]
cmp dword [esp + 0x24], ecx
ja 0x50950d
mov ecx, dword [esp + 0x34]
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
cmp esi, 0x10
jbe 0x5093f0
movups xmm0, xmmword [ecx + 0x10]
lea edx, [ecx + 0x10]
mov ecx, dword [esp + 0x44]
lea eax, [esi - 0x10]
mov ecx, dword [ecx + 0xc]
add ecx, 0x10
lea edi, [ecx + eax]
movups xmmword [ecx], xmm0
cmp eax, 0x10
jle 0x5093e8
add ecx, 0x10
add edx, 0x10
nop dword [eax + eax]
movups xmm0, xmmword [edx]
lea edx, [edx + 0x20]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [edx - 0x10]
movups xmmword [ecx + 0x10], xmm0
add ecx, 0x20
cmp ecx, edi
jb 0x5093d0
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
add dword [edx + 0xc], esi
cmp esi, 0xffff
jbe 0x50940d
mov eax, dword [edx + 4]
sub eax, dword [edx]
sar eax, 3
mov dword [edx + 0x24], 1
mov dword [edx + 0x28], eax
mov eax, dword [edx + 4]
add edi, 0xfffffffd
mov ecx, dword [esp + 0x64]
mov word [eax + 4], si
mov eax, dword [edx + 4]
mov dword [eax], ecx
cmp edi, 0xffff
jbe 0x50943a
mov eax, dword [edx + 4]
sub eax, dword [edx]
sar eax, 3
mov dword [edx + 0x24], 2
mov dword [edx + 0x28], eax
mov eax, dword [edx + 4]
mov ecx, dword [esp + 0x10]
mov word [eax + 6], di
mov eax, dword [esp + 0x34]
add dword [edx + 4], 8
add eax, dword [esp + 0x60]
mov dword [esp + 0x34], eax
mov dword [esp + 0x24], eax
add ebx, 0x1c
sub ecx, 1
mov dword [esp + 0x10], ecx
jne 0x509340
mov edi, dword [esp + 0x18]
cmp dword [edi + 0xb0], 2
je 0x509490
mov eax, dword [edi + 0x88]
inc eax
bsr ecx, eax
shl eax, 8
shr eax, cl
shl ecx, 8
add eax, ecx
mov dword [edi + 0x98], eax
mov eax, dword [edi + 0x8c]
inc eax
mov ebx, dword [esp + 0x14]
bsr ecx, eax
shl eax, 8
shr eax, cl
shl ecx, 8
add eax, ecx
mov dword [edi + 0x9c], eax
mov eax, dword [edi + 0x90]
inc eax
bsr ecx, eax
shl eax, 8
shr eax, cl
shl ecx, 8
add eax, ecx
mov dword [edi + 0xa0], eax
mov eax, dword [edi + 0x94]
inc eax
bsr ecx, eax
shl eax, 8
shr eax, cl
shl ecx, 8
add eax, ecx
mov ecx, dword [esp + 0x24]
mov dword [edi + 0xa4], eax
cmp ecx, dword [esp + 0x5c]
jb 0x5088a0
mov ecx, dword [esp + 0x11c]
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret
push ecx
push dword [esp + 0x28]
push dword [esp + 0x3c]
push eax
call fcn.0050a270
add esp, 0x10
jmp 0x5093ec