Function at 0x402d2c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push esi
push edi
push ebx
sub esp, 0x94
mov esi, edx
mov ebx, dword [0x587700]
lea edx, [esp + 0x90]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x60]
mov dword [esp + 8], ebx
mov dword [esp + 0x60], 0
mov dword [esp + 0x90], 0x58b734
push 0x20
push edx
push 0x559490
push 0x8384ff01
mov ebx, dword [eax]
push ebx
push ecx
mov edi, dword [0x5876c4]
call fcn.004e7090
add esp, 0x18
test eax, eax
jne 0x402e24
mov dword [esp + 0x88], 0x58b744
lea eax, [esp + 0x88]
push eax
push 0x559498
lea edx, [esp + 0x68]
push edx
call fcn.004e8930
add esp, 0xc
test eax, eax
jne 0x402e24
mov dword [esp + 0x80], 0x58b748
lea eax, [esp + 0x80]
push eax
push 0x5594a0
lea edx, [esp + 0x68]
push edx
call fcn.004e8930
add esp, 0xc
test eax, eax
jne 0x402e24
mov dword [esp + 0x58], 0x58b838
lea eax, [esp + 0x58]
push eax
push 0x5594a8
lea edx, [esp + 0x68]
push edx
call fcn.004e8930
add esp, 0xc
test eax, eax
jne 0x402e24
mov dword [esp + 0x50], 0x58b83c
lea eax, [esp + 0x50]
push eax
push 0x5594b0
lea edx, [esp + 0x68]
push edx
call fcn.004e8930
add esp, 0xc
test eax, eax
jle 0x402e3d
mov dword [esi], 0xffffffeb
add esp, 0x94
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x18
mov edx, dword [0x5876c4]
mov eax, dword [0x58b734]
cmp eax, edx
jg 0x402e7d
test eax, eax
jl 0x402e7d
mov ecx, dword [0x58b744]
mov dword [esp], ecx
cmp ecx, dword [0x587700]
jg 0x402e7d
cmp dword [esp], 0
jl 0x402e7d
mov ecx, dword [0x58b838]
cmp ecx, dword [0x5876fc]
jg 0x402e7d
cmp edx, dword [0x58b83c]
jge 0x402e92
mov dword [esi], 0xffffffea
add esp, 0x94
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x18
test eax, eax
jle 0x402ee0
xor eax, eax
test edi, edi
mov edx, edi
cmovle edx, eax
mov ecx, dword [ebp + 0x18]
shl edx, 2
mov dword [esp + 0x60], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
push 0x20
push eax
push 0x5594b8
push 0x8384ff01
push ebx
lea edx, [esp + 0x74]
push edx
call fcn.004e7090
add esp, 0x18
test eax, eax
jg 0x402e28
mov eax, dword [0x58b744]
mov dword [esp], eax
cmp dword [esp], 0
jle 0x402f2a
mov edx, dword [esp + 8]
xor eax, eax
test edx, edx
mov dword [esp + 0x60], eax
cmovg eax, edx
mov ecx, dword [ebp + 0x1c]
shl eax, 2
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
mov dword [esp + 0x3c], ecx
push 0x20
push eax
push 0x5594c0
push 0x8384ff01
push ebx
lea edx, [esp + 0x74]
push edx
call fcn.004e7090
add esp, 0x18
test eax, eax
jg 0x402e28
xor eax, eax
test edi, edi
cmovle edi, eax
test edi, edi
jle 0x40310a
mov edx, dword [ebp + 0x18]
and edx, 0xf
je 0x402f52
test dl, 3
jne 0x403c40
neg edx
add edx, 0x10
shr edx, 2
lea eax, [edx + 4]
cmp edi, eax
jl 0x403c40
mov eax, edi
mov ecx, 0x80000000
sub eax, edx
and eax, 3
neg eax
add eax, edi
mov dword [esp + 4], eax
test edx, edx
jbe 0x402f8f
mov dword [esp + 0x1c], esi
xor eax, eax
mov esi, dword [ebp + 0x18]
cmp ecx, dword [esi + eax*4]
jg 0x402f86
mov ecx, dword [esi + eax*4]
inc eax
cmp eax, edx
jb 0x402f7e
mov esi, dword [esp + 0x1c]
movd xmm0, ecx
pshufd xmm0, xmm0, 0
mov eax, dword [esp + 4]
mov ecx, dword [ebp + 0x18]
movdqa xmm1, xmmword [ecx + edx*4]
add edx, 4
movdqa xmm2, xmm1
pxor xmm1, xmm0
pcmpgtd xmm2, xmm0
cmp edx, eax
pand xmm2, xmm1
pxor xmm0, xmm2
jb 0x402f9f
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm0, xmm1
pand xmm2, xmm0
pxor xmm2, xmm1
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm2, xmm0
pand xmm3, xmm2
pxor xmm3, xmm0
mov dword [esp + 4], eax
movd dword [esp], xmm3
cmp edi, dword [esp + 4]
jbe 0x403022
mov eax, dword [esp]
mov edx, dword [esp + 4]
mov ecx, dword [ebp + 0x18]
cmp eax, dword [ecx + edx*4]
jg 0x40301a
mov eax, dword [ecx + edx*4]
inc edx
cmp edx, edi
jb 0x403012
mov dword [esp], eax
mov edx, dword [ebp + 0x18]
and edx, 0xf
je 0x40303b
test dl, 3
jne 0x403c2e
neg edx
add edx, 0x10
shr edx, 2
lea eax, [edx + 4]
cmp edi, eax
jl 0x403c2e
mov eax, edi
mov ecx, 0x7fffffff
sub eax, edx
and eax, 3
neg eax
add eax, edi
mov dword [esp + 4], eax
test edx, edx
jbe 0x403078
mov dword [esp + 0x1c], esi
xor eax, eax
mov esi, dword [ebp + 0x18]
cmp ecx, dword [esi + eax*4]
jle 0x40306f
mov ecx, dword [esi + eax*4]
inc eax
cmp eax, edx
jb 0x403067
mov esi, dword [esp + 0x1c]
movd xmm0, ecx
pshufd xmm0, xmm0, 0
mov eax, dword [esp + 4]
mov ecx, dword [ebp + 0x18]
movdqa xmm1, xmmword [ecx + edx*4]
add edx, 4
movdqa xmm2, xmm1
cmp edx, eax
pcmpgtd xmm2, xmm0
pxor xmm0, xmm1
pand xmm2, xmm0
movdqa xmm0, xmm1
pxor xmm0, xmm2
jb 0x403088
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm1, xmm0
pand xmm2, xmm1
pxor xmm2, xmm0
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm0, xmm2
pand xmm3, xmm0
pxor xmm3, xmm2
mov dword [esp + 4], eax
movd eax, xmm3
cmp edi, dword [esp + 4]
jbe 0x403116
mov edx, dword [esp + 4]
mov ecx, dword [ebp + 0x18]
cmp eax, dword [ecx + edx*4]
jle 0x403103
mov eax, dword [ecx + edx*4]
inc edx
cmp edx, edi
jb 0x4030fb
jmp 0x403116
mov dword [esp], 0x80000000
mov eax, 0x7fffffff
mov edx, dword [0x58b734]
test edx, edx
jle 0x403133
cmp edx, dword [esp]
jl 0x402e7d
neg edx
cmp eax, edx
jl 0x402e7d
mov edx, dword [esp + 8]
xor eax, eax
test edx, edx
cmovle edx, eax
mov dword [esp + 8], edx
test edx, edx
jle 0x40332a
mov edi, dword [ebp + 0x1c]
and edi, 0xf
je 0x403166
test edi, 3
jne 0x403c54
neg edi
add edi, 0x10
shr edi, 2
lea eax, [edi + 4]
cmp eax, dword [esp + 8]
jg 0x403c54
mov eax, edx
sub eax, edi
mov ecx, 0x80000000
and eax, 3
neg eax
add eax, edx
test edi, edi
jbe 0x4031a1
mov dword [esp + 0x1c], esi
xor edx, edx
mov esi, dword [ebp + 0x1c]
cmp ecx, dword [esi + edx*4]
jg 0x403198
mov ecx, dword [esi + edx*4]
inc edx
cmp edx, edi
jb 0x403190
mov esi, dword [esp + 0x1c]
movd xmm0, ecx
pshufd xmm0, xmm0, 0
mov edx, dword [ebp + 0x1c]
movdqa xmm1, xmmword [edx + edi*4]
add edi, 4
movdqa xmm2, xmm1
pxor xmm1, xmm0
pcmpgtd xmm2, xmm0
cmp edi, eax
pand xmm2, xmm1
pxor xmm0, xmm2
jb 0x4031ad
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm0, xmm1
pand xmm2, xmm0
pxor xmm2, xmm1
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm2, xmm0
pand xmm3, xmm2
pxor xmm3, xmm0
movd ecx, xmm3
cmp eax, dword [esp + 8]
jae 0x403225
mov edx, dword [esp + 8]
mov edi, dword [ebp + 0x1c]
cmp ecx, dword [edi + eax*4]
jg 0x403220
mov ecx, dword [edi + eax*4]
inc eax
cmp eax, edx
jb 0x403218
mov eax, dword [ebp + 0x1c]
and eax, 0xf
mov dword [esp], eax
je 0x403245
test byte [esp], 3
jne 0x403c60
neg eax
add eax, 0x10
shr eax, 2
mov dword [esp], eax
lea edx, [eax + 4]
cmp edx, dword [esp + 8]
jg 0x403c60
mov eax, dword [esp + 8]
mov edx, eax
mov edi, dword [esp]
sub edx, edi
and edx, 3
neg edx
add edx, eax
mov eax, 0x7fffffff
test edi, edi
jbe 0x403295
mov dword [esp + 0xc], ebx
xor edi, edi
mov dword [esp + 0x1c], esi
mov ebx, dword [esp]
mov esi, dword [ebp + 0x1c]
cmp eax, dword [esi + edi*4]
jle 0x403285
mov eax, dword [esi + edi*4]
inc edi
cmp edi, ebx
jb 0x40327d
mov dword [esp], ebx
mov ebx, dword [esp + 0xc]
mov esi, dword [esp + 0x1c]
movd xmm0, eax
pshufd xmm0, xmm0, 0
mov eax, dword [esp]
mov edi, dword [ebp + 0x1c]
movdqa xmm1, xmmword [edi + eax*4]
add eax, 4
movdqa xmm2, xmm1
cmp eax, edx
pcmpgtd xmm2, xmm0
pxor xmm0, xmm1
pand xmm2, xmm0
movdqa xmm0, xmm1
pxor xmm0, xmm2
jb 0x4032a4
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm1, xmm0
pand xmm2, xmm1
pxor xmm2, xmm0
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm0, xmm2
pand xmm3, xmm0
pxor xmm3, xmm2
movd eax, xmm3
cmp edx, dword [esp + 8]
jae 0x403334
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 8]
mov edi, dword [ebp + 0x1c]
cmp eax, dword [edi + edx*4]
jle 0x40331f
mov eax, dword [edi + edx*4]
inc edx
cmp edx, esi
jb 0x403317
mov esi, dword [esp + 0x1c]
jmp 0x403334
mov ecx, 0x80000000
mov eax, 0x7fffffff
cmp dword [0x58b744], 0
jle 0x40334f
cmp ecx, 1
jg 0x402e7d
cmp eax, 0xffffffff
jl 0x402e7d
mov edi, dword [0x58b838]
test edi, edi
jle 0x403b07
mov ecx, 0
mov eax, dword [esp + 0x10]
cmovle edi, ecx
mov edx, 1
mov dword [esp + 0x60], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edi
lea edi, [esp + 0x20]
mov dword [esp + 0x30], 4
push 0x20
push edi
push 0x5594c8
push 0x8384ff01
push ebx
lea eax, [esp + 0x74]
push eax
call fcn.004e7090
add esp, 0x18
test eax, eax
jg 0x402e28
mov edx, dword [0x58b838]
xor eax, eax
test edx, edx
cmovle edx, eax
mov dword [esp], edx
test edx, edx
jle 0x403645
mov edi, dword [esp + 0x10]
and edi, 0xf
je 0x4033e6
test edi, 3
jne 0x403a80
neg edi
add edi, 0x10
shr edi, 2
lea eax, [edi + 0x10]
cmp eax, dword [esp]
jg 0x403a80
mov eax, edx
mov ecx, eax
sub ecx, edi
mov edx, 0x80000000
and ecx, 0xf
neg ecx
add ecx, eax
test edi, edi
jbe 0x403423
mov dword [esp + 0x1c], esi
xor eax, eax
mov esi, dword [esp + 0x10]
cmp edx, dword [esi + eax*4]
jg 0x40341a
mov edx, dword [esi + eax*4]
inc eax
cmp eax, edi
jb 0x403412
mov esi, dword [esp + 0x1c]
movd xmm0, edx
pshufd xmm0, xmm0, 0
mov eax, dword [esp + 0x10]
movdqa xmm1, xmmword [eax + edi*4]
movdqa xmm2, xmm1
pxor xmm1, xmm0
pcmpgtd xmm2, xmm0
pand xmm2, xmm1
pxor xmm2, xmm0
movdqa xmm0, xmmword [eax + edi*4 + 0x10]
movdqa xmm4, xmm0
pxor xmm0, xmm2
pcmpgtd xmm4, xmm2
movdqa xmm3, xmmword [eax + edi*4 + 0x20]
pand xmm4, xmm0
pxor xmm4, xmm2
movdqa xmm6, xmm3
pcmpgtd xmm6, xmm4
pxor xmm3, xmm4
movdqa xmm5, xmmword [eax + edi*4 + 0x30]
pand xmm6, xmm3
pxor xmm6, xmm4
movdqa xmm0, xmm5
pcmpgtd xmm0, xmm6
pxor xmm5, xmm6
add edi, 0x10
pand xmm0, xmm5
pxor xmm0, xmm6
cmp edi, ecx
jb 0x403430
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm0, xmm1
pand xmm2, xmm0
pxor xmm2, xmm1
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm2, xmm0
pand xmm3, xmm2
pxor xmm3, xmm0
movd dword [esp + 4], xmm3
cmp ecx, dword [esp]
jae 0x4034ff
mov eax, dword [esp + 4]
mov edx, dword [esp]
mov edi, dword [esp + 0x10]
cmp eax, dword [edi + ecx*4]
jg 0x4034f6
mov eax, dword [edi + ecx*4]
inc ecx
cmp ecx, edx
jb 0x4034ee
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
and eax, 0xf
mov dword [esp + 8], eax
je 0x403523
test byte [esp + 8], 3
jne 0x403a74
neg eax
add eax, 0x10
shr eax, 2
mov dword [esp + 8], eax
lea edx, [eax + 0x10]
cmp edx, dword [esp]
jg 0x403a74
mov eax, dword [esp]
mov ecx, eax
mov edx, dword [esp + 8]
sub ecx, edx
and ecx, 0xf
neg ecx
add ecx, eax
mov eax, 0x7fffffff
test edx, edx
jbe 0x40356d
mov dword [esp + 0x1c], esi
xor edx, edx
mov esi, dword [esp + 8]
mov edi, dword [esp + 0x10]
cmp eax, dword [edi + edx*4]
jle 0x403560
mov eax, dword [edi + edx*4]
inc edx
cmp edx, esi
jb 0x403558
mov dword [esp + 8], esi
mov esi, dword [esp + 0x1c]
movd xmm0, eax
pshufd xmm0, xmm0, 0
mov eax, dword [esp + 8]
mov edx, dword [esp + 0x10]
movdqa xmm1, xmmword [edx + eax*4]
movdqa xmm2, xmm1
pcmpgtd xmm2, xmm0
pxor xmm0, xmm1
pand xmm2, xmm0
movdqa xmm0, xmmword [edx + eax*4 + 0x10]
pxor xmm2, xmm1
movdqa xmm3, xmm0
pcmpgtd xmm3, xmm2
pxor xmm2, xmm0
movdqa xmm4, xmmword [edx + eax*4 + 0x20]
pand xmm3, xmm2
pxor xmm3, xmm0
movdqa xmm5, xmm4
pcmpgtd xmm5, xmm3
pxor xmm3, xmm4
movdqa xmm6, xmmword [edx + eax*4 + 0x30]
pand xmm5, xmm3
pxor xmm5, xmm4
movdqa xmm0, xmm6
pcmpgtd xmm0, xmm5
pxor xmm5, xmm6
add eax, 0x10
pand xmm0, xmm5
pxor xmm0, xmm6
cmp eax, ecx
jb 0x40357e
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm1, xmm0
pand xmm2, xmm1
pxor xmm2, xmm0
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm0, xmm2
pand xmm3, xmm0
pxor xmm3, xmm2
movd eax, xmm3
cmp ecx, dword [esp]
jae 0x403652
mov edx, dword [esp]
mov edi, dword [esp + 0x10]
cmp eax, dword [edi + ecx*4]
jle 0x40363e
mov eax, dword [edi + ecx*4]
inc ecx
cmp ecx, edx
jb 0x403636
jmp 0x403652
mov dword [esp + 4], 0x80000000
mov eax, 0x7fffffff
mov edx, dword [esp + 4]
cmp edx, dword [0x5876fc]
jg 0x402e7d
test eax, eax
jl 0x402e7d
mov edi, dword [0x58b83c]
test edi, edi
jle 0x403a8f
mov ecx, 0
mov eax, dword [ebp + 0x14]
cmovle edi, ecx
mov edx, 1
mov dword [esp + 0x60], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edi
lea edi, [esp + 8]
mov dword [esp + 0x18], 4
push 0x20
push edi
push 0x5594d0
push 0x8384ff01
push ebx
lea ebx, [esp + 0x74]
push ebx
call fcn.004e7090
add esp, 0x18
test eax, eax
jg 0x402e28
mov ecx, dword [0x58b83c]
xor eax, eax
test ecx, ecx
cmovle ecx, eax
test ecx, ecx
jle 0x403934
mov edi, dword [ebp + 0x14]
and edi, 0xf
je 0x4036fc
test edi, 3
jne 0x403a1a
neg edi
add edi, 0x10
shr edi, 2
lea eax, [edi + 0x10]
cmp ecx, eax
jl 0x403a1a
mov eax, ecx
mov ebx, 0x80000000
sub eax, edi
and eax, 0xf
neg eax
add eax, ecx
test edi, edi
jbe 0x403735
mov dword [esp + 0x1c], esi
xor edx, edx
mov esi, dword [ebp + 0x14]
cmp ebx, dword [esi + edx*4]
jg 0x40372c
mov ebx, dword [esi + edx*4]
inc edx
cmp edx, edi
jb 0x403724
mov esi, dword [esp + 0x1c]
movd xmm0, ebx
pshufd xmm0, xmm0, 0
mov edx, dword [ebp + 0x14]
movdqa xmm1, xmmword [edx + edi*4]
movdqa xmm2, xmm1
pxor xmm1, xmm0
pcmpgtd xmm2, xmm0
pand xmm2, xmm1
pxor xmm2, xmm0
movdqa xmm0, xmmword [edx + edi*4 + 0x10]
movdqa xmm4, xmm0
pxor xmm0, xmm2
pcmpgtd xmm4, xmm2
movdqa xmm3, xmmword [edx + edi*4 + 0x20]
pand xmm4, xmm0
pxor xmm4, xmm2
movdqa xmm6, xmm3
pcmpgtd xmm6, xmm4
pxor xmm3, xmm4
movdqa xmm5, xmmword [edx + edi*4 + 0x30]
pand xmm6, xmm3
pxor xmm6, xmm4
movdqa xmm0, xmm5
pcmpgtd xmm0, xmm6
pxor xmm5, xmm6
add edi, 0x10
pand xmm0, xmm5
pxor xmm0, xmm6
cmp edi, eax
jb 0x403741
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm0, xmm1
pand xmm2, xmm0
pxor xmm2, xmm1
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm2, xmm0
pand xmm3, xmm2
pxor xmm3, xmm0
movd edx, xmm3
cmp eax, ecx
jae 0x403801
mov ebx, dword [ebp + 0x14]
cmp edx, dword [ebx + eax*4]
jg 0x4037fc
mov edx, dword [ebx + eax*4]
inc eax
cmp eax, ecx
jb 0x4037f4
mov edi, dword [ebp + 0x14]
and edi, 0xf
je 0x40381d
test edi, 3
jne 0x403a26
neg edi
add edi, 0x10
shr edi, 2
lea eax, [edi + 0x10]
cmp ecx, eax
jl 0x403a26
mov eax, ecx
mov ebx, 0x7fffffff
sub eax, edi
and eax, 0xf
neg eax
add eax, ecx
test edi, edi
jbe 0x403866
mov dword [esp + 4], 0
mov dword [esp], ecx
mov dword [esp + 0x1c], esi
mov ecx, dword [esp + 4]
mov esi, dword [ebp + 0x14]
cmp ebx, dword [esi + ecx*4]
jle 0x40385a
mov ebx, dword [esi + ecx*4]
inc ecx
cmp ecx, edi
jb 0x403852
mov ecx, dword [esp]
mov esi, dword [esp + 0x1c]
movd xmm0, ebx
pshufd xmm0, xmm0, 0
mov ebx, dword [ebp + 0x14]
movdqa xmm1, xmmword [ebx + edi*4]
movdqa xmm2, xmm1
pcmpgtd xmm2, xmm0
pxor xmm0, xmm1
pand xmm2, xmm0
movdqa xmm0, xmmword [ebx + edi*4 + 0x10]
pxor xmm2, xmm1
movdqa xmm3, xmm0
pcmpgtd xmm3, xmm2
pxor xmm2, xmm0
movdqa xmm4, xmmword [ebx + edi*4 + 0x20]
pand xmm3, xmm2
pxor xmm3, xmm0
movdqa xmm5, xmm4
pcmpgtd xmm5, xmm3
pxor xmm3, xmm4
movdqa xmm6, xmmword [ebx + edi*4 + 0x30]
pand xmm5, xmm3
pxor xmm5, xmm4
movdqa xmm0, xmm6
pcmpgtd xmm0, xmm5
pxor xmm5, xmm6
add edi, 0x10
pand xmm0, xmm5
pxor xmm0, xmm6
cmp edi, eax
jb 0x403872
movdqa xmm1, xmm0
movdqa xmm2, xmm0
psrldq xmm1, 8
pcmpgtd xmm2, xmm1
pxor xmm1, xmm0
pand xmm2, xmm1
pxor xmm2, xmm0
movdqa xmm0, xmm2
movdqa xmm3, xmm2
psrldq xmm0, 4
pcmpgtd xmm3, xmm0
pxor xmm0, xmm2
pand xmm3, xmm0
pxor xmm3, xmm2
movd ebx, xmm3
cmp eax, ecx
jae 0x40393e
mov edi, dword [ebp + 0x14]
cmp ebx, dword [edi + eax*4]
jle 0x40392d
mov ebx, dword [edi + eax*4]
inc eax
cmp eax, ecx
jb 0x403925
jmp 0x40393e
mov edx, 0x80000000
mov ebx, 0x7fffffff
cmp edx, dword [0x5876c4]
jg 0x402e7d
test ebx, ebx
jl 0x402e7d
mov ebx, dword [0x58b744]
test ebx, ebx
mov dword [0x57bb64], 0
jle 0x4039d9
xor edx, edx
mov ecx, dword [0x587700]
xor eax, eax
test ecx, ecx
jle 0x4039c5
mov dword [esp + 4], 1
lea edi, [ecx*4]
mov dword [esp + 0x40], edi
lea edi, [ecx*8]
mov dword [esp + 0x44], ecx
mov dword [esp], ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], esi
mov ebx, dword [esp + 4]
mov ecx, dword [ebp + 0x1c]
cmp dword [ecx + ebx*4 - 4], 0
jle 0x403a32
add eax, dword [ebx*4 + 0x587a5c]
inc edx
inc ebx
cmp ebx, dword [esp + 0x44]
jle 0x4039a4
mov ebx, dword [esp]
mov esi, dword [esp + 0x1c]
cmp ebx, edx
jne 0x402e7d
cmp eax, dword [0x58b748]
jne 0x402e7d
mov edx, dword [0x58b734]
test edx, edx
jle 0x402e2e
mov eax, dword [0x5876c4]
xor ebx, ebx
test eax, eax
jle 0x403a0d
mov edi, dword [ebp + 0x18]
mov ecx, 1
cmp dword [edi + ecx*4 - 4], 0
je 0x403a08
inc ebx
mov dword [0x57bb64], ebx
inc ecx
cmp ecx, eax
jle 0x4039fa
cmp edx, ebx
jne 0x402e7d
jmp 0x402e2e
mov edx, 0x80000000
xor eax, eax
jmp 0x4037ed
mov ebx, 0x7fffffff
xor eax, eax
jmp 0x40391e
jl 0x403a58
mov edi, dword [esp + 0x40]
xor esi, esi
mov dword [ebx*4 + 0x587a5c], esi
mov dword [edi + ebx*4 + 0x587a5c], esi
mov edi, dword [esp + 0x34]
mov dword [edi + ebx*4 + 0x587a5c], esi
jmp 0x4039b7
mov esi, dword [esp + 0x34]
inc edx
add eax, dword [ebx*4 + 0x587a5c]
mov dword [esi + ebx*4 + 0x587a5c], 0
jmp 0x4039b7
mov eax, 0x7fffffff
xor ecx, ecx
jmp 0x40362a
mov dword [esp + 4], 0x80000000
xor ecx, ecx
jmp 0x4034de
jge 0x403952
mov eax, dword [0x58b734]
test eax, eax
jle 0x403ae3
mov dword [0x58b83c], eax
mov eax, dword [0x5876c4]
test eax, eax
mov dword [0x57bb64], 0
jle 0x403952
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
mov edi, dword [ebp + 0x18]
mov edx, 1
cmp dword [edi + edx*4 - 4], 0
je 0x403ad9
inc ecx
mov dword [0x57bb64], ecx
mov dword [ebx + ecx*4 - 4], edx
inc edx
cmp edx, eax
jle 0x403ac7
jmp 0x403952
mov eax, dword [0x5876c4]
test eax, eax
mov dword [0x58b83c], eax
jle 0x403952
mov ecx, dword [0x57bb64]
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx*4 - 4], eax
jmp 0x403952
jge 0x40366a
mov eax, dword [0x5876fc]
test eax, eax
mov dword [esp + 4], eax
mov dword [0x58b838], eax
jle 0x40366a
mov eax, dword [esp + 0x10]
and eax, 0xf
mov dword [esp + 8], eax
je 0x403b47
test byte [esp + 8], 3
jne 0x403c2a
neg eax
add eax, 0x10
shr eax, 2
mov dword [esp + 8], eax
lea edx, [eax + 0x10]
cmp edx, dword [esp + 4]
jg 0x403c2a
mov eax, dword [esp + 4]
mov edx, eax
mov ecx, dword [esp + 8]
sub edx, ecx
and edx, 0xf
neg edx
add edx, eax
test ecx, ecx
jbe 0x403b8b
mov dword [esp + 0x1c], esi
xor eax, eax
mov esi, ecx
mov edi, dword [esp + 0x10]
lea ecx, [eax + 1]
mov dword [edi + eax*4], ecx
mov eax, ecx
cmp ecx, esi
jb 0x403b77
mov dword [esp + 8], esi
mov esi, dword [esp + 0x1c]
mov eax, 4
mov edi, dword [esp + 8]
mov dword [esp + 0xc], ebx
mov dword [esp], edx
movd xmm0, eax
lea edx, [edi + 1]
pshufd xmm1, xmm0, 0
lea ecx, [edi + 2]
lea ebx, [edi + 3]
lea eax, [edi + 4]
movd xmm0, edx
movd xmm2, ecx
movd xmm4, ebx
movd xmm3, eax
mov eax, edi
punpcklqdq xmm0, xmm2
punpcklqdq xmm4, xmm3
shufps xmm0, xmm4, 0x88
mov edx, dword [esp]
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
movdqa xmmword [ecx + eax*4], xmm0
paddd xmm0, xmm1
movdqa xmmword [ecx + eax*4 + 0x10], xmm0
paddd xmm0, xmm1
movdqa xmmword [ecx + eax*4 + 0x20], xmm0
paddd xmm0, xmm1
movdqa xmmword [ecx + eax*4 + 0x30], xmm0
add eax, 0x10
paddd xmm0, xmm1
cmp eax, edx
jb 0x403bd9
cmp edx, dword [esp + 4]
jae 0x40366a
mov ecx, dword [esp + 4]
mov edi, dword [esp + 0x10]
lea eax, [edx + 1]
mov dword [edi + edx*4], eax
mov edx, eax
cmp eax, ecx
jb 0x403c19
jmp 0x40366a
xor edx, edx
jmp 0x403c07
mov dword [esp + 4], 0
mov eax, 0x7fffffff
jmp 0x4030ee
mov dword [esp], 0x80000000
mov dword [esp + 4], 0
jmp 0x403002
mov ecx, 0x80000000
xor eax, eax
jmp 0x40320b
mov eax, 0x7fffffff
xor edx, edx
jmp 0x403306