Function at 0x5d8680
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0x30
cmp dword [esp + 0x48], 0
mov ecx, dword [esp + 0x44]
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
mov ebx, 1
push esi
push edi
mov edi, dword [esp + 0x48]
lea esi, [ebp + 8]
mov edx, dword [edi]
mov dword [esp + 0x24], edx
je 0x5d86b8
mov ecx, dword [esp + 0x58]
mov eax, dword [ebp + 0x108]
mov dword [ecx], eax
mov ecx, dword [esp + 0x54]
cmp dword [ebp + 0x5c], 0
jge 0x5d86c8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
mov eax, dword [esp + 0x50]
mov eax, dword [eax]
test eax, eax
je 0x5d86f1
test ecx, ecx
je 0x5d86db
cmp dword [ecx], 0
jne 0x5d86f1
sub edx, dword [edi]
push edx
push 0xffffffffffffffec
push ebp
call fcn.005ddc70
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
xor edx, edx
test eax, eax
mov eax, dword [ebp + 0x30]
cmovne edx, ecx
mov dword [esp + 0x20], edx
test eax, eax
jne 0x5d874f
mov ecx, dword [esp + 0x4c]
mov eax, dword [edi]
mov ecx, dword [ecx]
mov dword [esi + 8], ecx
test eax, eax
jne 0x5d8726
lea eax, [esi + 0x10]
mov dword [eax], ecx
mov dword [esp + 0x10], eax
lea eax, [esi + 0xc]
mov dword [esp + 0x14], eax
mov dword [eax], ecx
jmp case.default.0x5d8896
lea edi, [esi + 0x10]
lea edx, [ecx + eax]
mov dword [esp + 0x10], edi
lea edi, [esi + 0xc]
mov dword [esi + 0x10], edx
inc eax
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x48]
cmp eax, 0x1c
jbe 0x5d8791
mov eax, dword [esp + 0x14]
lea ecx, [edx - 0x1b]
mov dword [eax], ecx
jmp case.default.0x5d8896
lea ecx, [ebp + 0x28]
mov ebx, 2
lea edi, [esi + 0x10]
mov dword [esi + 8], ecx
lea edx, [ecx + eax]
mov dword [esp + 0x10], edi
lea edi, [esi + 0xc]
mov dword [esi + 0x10], edx
inc eax
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x48]
cmp eax, 0x1c
jbe 0x5d8783
mov eax, dword [esp + 0x14]
lea ecx, [edx - 0x1b]
mov dword [eax], ecx
jmp case.default.0x5d8896
lea eax, [esi + 0xc]
mov dword [esp + 0x14], eax
lea eax, [esi + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
jmp case.default.0x5d8896
mov ebx, 2
nop
mov edi, dword [esp + 0x48]
cmp ebx, 1
je 0x5d888a
cmp ebx, 2
jne 0x5d961d
cmp dword [ebp + 0x64], 0
je 0x5d87db
push 1
push dword [esp + 0x5c]
push dword [esp + 0x28]
push dword [esp + 0x5c]
push ebp
call fcn.005dde40
add esp, 0x14
test eax, eax
js 0x5d95ef
mov ecx, dword [ebp + 0x30]
mov eax, dword [esi + 8]
test ecx, ecx
je 0x5d95f3
mov edx, dword [esp + 0x10]
cmp eax, dword [edx]
jne 0x5d8835
mov ecx, dword [esp + 0x4c]
mov ebx, 1
mov dword [ebp + 0x30], 0
mov eax, dword [edi]
mov ecx, dword [ecx]
mov dword [esi + 8], ecx
test eax, eax
jne 0x5d8816
mov eax, dword [esp + 0x14]
mov dword [edx], ecx
mov dword [eax], ecx
jmp 0x5d888a
mov ebp, dword [esp + 0x10]
lea edx, [ecx + eax]
inc eax
mov dword [ebp], edx
mov ebp, dword [esp + 0x44]
cmp eax, 0x1c
jbe 0x5d882d
lea ecx, [edx - 0x1b]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
jmp 0x5d888a
cmp dword [edi], 0
je 0x5d95d6
mov eax, dword [esp + 0x4c]
lea edi, [ebp + 0x28]
mov ebx, 1
mov eax, dword [eax]
mov al, byte [eax]
mov byte [ecx + ebp + 0x28], al
mov eax, edi
add dword [ebp + 0x30], ebx
mov edx, dword [ebp + 0x30]
mov dword [esi + 8], edi
mov esi, dword [esp + 0x10]
lea ecx, [edi + edx]
cmovne eax, ecx
add ecx, 0xffffffe5
mov dword [esi], eax
lea eax, [edx + 1]
cmp eax, 0x1c
lea esi, [ebp + 8]
mov eax, dword [esp + 0x14]
cmovbe ecx, edi
mov edi, dword [esp + 0x48]
mov dword [eax], ecx
mov eax, dword [esp + 0x4c]
inc dword [eax]
dec dword [edi]
mov eax, dword [ebp]
cmp eax, 0x1a
ja case.default.0x5d8896
jmp dword [eax*4 + 0x5d96bc]
push esi
call fcn.005de070
add esp, 4
test eax, eax
jne 0x5d88b2
lea ebx, [eax + 2]
jmp case.default.0x5d8896
mov ebx, dword [ebp + 0x24c]
mov eax, ebx
and eax, 0xffffffdf
mov dword [ebp + 0x24c], eax
mov edx, dword [esi]
mov ecx, edx
and ecx, dword [0x64b624]
mov eax, dword [esi + 4]
dec eax
shr edx, 1
mov dword [esi + 4], eax
mov dword [esi], edx
test ecx, ecx
jne 0x5d88f3
mov ecx, dword [ebp + 0x24c]
and ecx, 0xfffff43f
or ecx, 0x400
jmp 0x5d8997
mov ecx, edx
add eax, 0xfffffffd
and ecx, dword [0x64b62c]
shr edx, 3
mov dword [esi + 4], eax
mov dword [esi], edx
test ecx, ecx
je 0x5d8922
mov eax, dword [ebp + 0x24c]
add ecx, 0x11
shl ecx, 6
xor ecx, eax
and ecx, 0xfc0
xor ecx, eax
jmp 0x5d8997
mov ecx, edx
add eax, 0xfffffffd
and ecx, dword [0x64b62c]
shr edx, 3
mov dword [esi + 4], eax
mov dword [esi], edx
cmp ecx, 1
jne 0x5d896d
test bl, 0x20
je 0x5d8954
mov ecx, edx
dec eax
and ecx, dword [0x64b624]
shr edx, 1
mov dword [esi + 4], eax
mov dword [esi], edx
cmp ecx, 1
jne 0x5d895e
mov ebx, 0xfffffff3
jmp case.default.0x5d8896
or dword [ebp + 0x24c], 0x20
mov ecx, dword [ebp + 0x24c]
jmp 0x5d899d
mov eax, dword [ebp + 0x24c]
test ecx, ecx
je 0x5d8989
add ecx, 8
shl ecx, 6
xor ecx, eax
and ecx, 0xfc0
xor ecx, eax
jmp 0x5d8997
mov ecx, eax
and ecx, 0xfffff47f
or ecx, 0x440
mov dword [ebp + 0x24c], ecx
and cl, 0x20
mov ebx, 1
movzx eax, cl
neg eax
sbb eax, eax
add eax, 2
mov dword [ebp], eax
jmp case.default.0x5d8896
mov edi, dword [esi + 4]
cmp edi, 6
jae 0x5d89ea
mov eax, dword [esp + 0x10]
mov ebx, dword [eax]
mov edx, dword [esi + 8]
cmp edx, ebx
je 0x5d8799
movzx eax, byte [edx]
mov ecx, edi
shl eax, cl
add edi, 8
or dword [esi], eax
lea eax, [edx + 1]
mov dword [esi + 4], edi
mov dword [esi + 8], eax
cmp edi, 6
jb 0x5d89c5
mov ecx, dword [esi]
lea eax, [edi - 6]
mov edx, ecx
shr ecx, 6
and edx, dword [0x64b638]
mov dword [esi], ecx
mov ecx, edx
shl ecx, 6
and edx, 0x3f
mov dword [esi + 4], eax
sub edx, 0xa
mov eax, dword [ebp + 0x24c]
xor ecx, eax
and ecx, 0xfc0
xor ecx, eax
mov dword [ebp + 0x24c], ecx
cmp edx, 0x14
ja 0x5d8a6b
mov edi, dword [esp + 0x48]
mov dword [ebp], 2
mov ecx, dword [ebp + 0x24c]
mov eax, 1
shr ecx, 6
and ecx, 0x3f
shl eax, cl
sub eax, 0x10
push 0x3030
push dword [ebp + 0x24]
mov dword [ebp + 0x38], eax
mov eax, dword [ebp + 0x1c]
call eax
add esp, 8
mov dword [ebp + 0xac], eax
test eax, eax
jne 0x5d8a75
lea ebx, [eax - 0x1e]
jmp case.default.0x5d8896
mov ebx, 0xfffffff3
jmp 0x5d87a0
add eax, 0x1da0
mov dword [ebp], 3
mov dword [ebp + 0xb0], eax
push ebp
call fcn.005dec00
add esp, 4
mov dword [ebp], 4
push esi
push ebp
call fcn.005da560
mov ebx, eax
add esp, 8
cmp ebx, 1
jne 0x5d87ad
test byte [ebp + 0x24c], 6
lea edi, [ebp + 0x24c]
je 0x5d8b1f
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [esp + 0x28], 0
and ecx, 7
je 0x5d8af5
mov ebp, dword [ecx*4 + 0x64b620]
sub edx, ecx
mov eax, dword [esi]
and ebp, eax
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x44]
shr eax, cl
mov dword [esi], eax
mov dword [esi + 4], edx
lea eax, [ebp + 0x24c]
mov dword [esp + 0x2c], eax
jmp 0x5d8af9
mov dword [esp + 0x2c], edi
cmp edx, 0x20
jae 0x5d8b0e
mov edi, dword [esp + 0x2c]
mov eax, 1
mov ecx, edx
shl eax, cl
dec eax
and dword [esi], eax
cmp dword [esp + 0x28], 0
je 0x5d8b1f
mov ebx, 0xfffffff2
jmp 0x5d87a0
test byte [edi], 4
je 0x5d8b50
mov eax, dword [ebp + 0x220]
mov edi, dword [esp + 0x48]
mov dword [ebp], 0xc
test eax, eax
je case.default.0x5d8896
push dword [ebp + 0x60]
push dword [ebp + 0x228]
call eax
add esp, 8
jmp case.default.0x5d8896
cmp dword [ebp + 0x60], 0
jne 0x5d8b62
mov dword [ebp], 0xe
jmp 0x5d87a0
push ebp
call fcn.005d8530
add esp, 4
test byte [edi], 2
mov edi, dword [esp + 0x48]
je case.0x5d8896.17
mov dword [ebp], 0xb
jmp case.default.0x5d8896
mov dword [ebp + 4], 0
lea eax, [ebp + 0x34c]
mov dword [ebp + 0x290], 0
mov dword [ebp + 0x328], eax
mov dword [ebp + 0x28c], 0
mov dword [ebp + 0x284], 0
mov dword [ebp + 0x288], 0
mov dword [ebp], 0x12
mov eax, dword [ebp + 4]
cmp eax, 3
jl 0x5d8bd6
mov dword [ebp], 5
jmp case.default.0x5d8896
lea eax, [eax*4 + 0xcc]
add eax, ebp
push eax
push esi
push ebp
call fcn.005dab00
mov ebx, eax
add esp, 0xc
cmp ebx, 1
jne 0x5d87ad
mov eax, dword [ebp + 4]
inc dword [ebp + eax*4 + 0xcc]
mov eax, dword [ebp + 4]
cmp dword [ebp + eax*4 + 0xcc], 2
jae 0x5d8c15
inc eax
mov dword [ebp + 4], eax
jmp case.default.0x5d8896
mov dword [ebp], 0x13
mov eax, dword [ebp + 4]
push ebp
push 0
mov ecx, dword [ebp + eax*4 + 0xcc]
imul eax, eax, 0x9e0
add ecx, 2
add eax, dword [ebp + 0xac]
push eax
push ecx
push ecx
call fcn.005dbbe0
mov ebx, eax
add esp, 0x14
cmp ebx, 1
jne 0x5d87ad
mov dword [ebp], 0x14
imul eax, dword [ebp + 4], 0x630
push ebp
push 0
add eax, dword [ebp + 0xb0]
push eax
push 0x1a
push 0x1a
call fcn.005dbbe0
mov ebx, eax
add esp, 0x14
cmp ebx, 1
jne 0x5d87ad
mov dword [ebp], 0x15
mov eax, dword [ebp + 4]
imul ecx, eax, 0x630
lea eax, [eax*4 + 0xbc]
add eax, ebp
add ecx, dword [ebp + 0xb0]
cmp dword [ebp + 0x244], 0
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
jne 0x5d8d58
mov edi, dword [esi + 4]
cmp edi, 0xf
jae 0x5d8ce5
nop dword [eax]
mov eax, dword [esp + 0x10]
mov edx, dword [esi + 8]
cmp edx, dword [eax]
je 0x5d8d37
movzx eax, byte [edx]
mov ecx, edi
shl eax, cl
add edi, 8
or dword [esi], eax
lea eax, [edx + 1]
mov dword [esi + 4], edi
mov dword [esi + 8], eax
cmp edi, 0xf
jb 0x5d8cc0
mov ecx, dword [0x64b65c]
and ecx, dword [esi]
mov edx, dword [esp + 0x2c]
movzx eax, cl
lea edx, [edx + eax*4]
mov al, byte [edx]
cmp al, 8
jbe 0x5d8d27
shr dword [esi], 8
add edi, 0xfffffff8
movzx eax, al
shr ecx, 8
mov dword [esi + 4], edi
mov dword [esp + 0x30], ecx
mov ecx, dword [eax*4 + 0x64b600]
movzx eax, word [edx + 2]
and ecx, dword [esp + 0x30]
add ecx, eax
mov al, byte [edx + ecx*4]
lea edx, [edx + ecx*4]
movzx ecx, al
sub edi, ecx
shr dword [esi], cl
mov dword [esi + 4], edi
movzx eax, word [edx + 2]
jmp 0x5d8d5e
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x18]
push eax
push esi
push edx
call fcn.005dcc70
add esp, 0xc
test eax, eax
je 0x5d8799
mov eax, dword [esp + 0x18]
jmp 0x5d8d62
mov eax, dword [ebp + 0xc8]
mov dword [esp + 0x18], eax
movzx edi, byte [eax*4 + 0x64c082]
movzx eax, word [eax*4 + 0x64c080]
mov ecx, dword [esi + 4]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], eax
cmp ecx, edi
jae 0x5d8dab
mov eax, dword [esp + 0x10]
mov edi, dword [eax]
mov edx, dword [esi + 8]
cmp edx, edi
je 0x5d8de4
movzx eax, byte [edx]
shl eax, cl
add ecx, 8
or dword [esi], eax
lea eax, [edx + 1]
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
cmp ecx, dword [esp + 0x2c]
jb 0x5d8d87
mov edi, dword [esp + 0x2c]
mov eax, dword [edi*4 + 0x64b620]
sub ecx, edi
mov edx, dword [esi]
and eax, edx
add eax, dword [esp + 0x30]
mov dword [esi + 4], ecx
mov ecx, edi
shr edx, cl
mov ecx, dword [esp + 0x28]
mov dword [esi], edx
mov dword [ecx], eax
inc dword [ebp + 4]
mov dword [ebp + 0x244], 0
mov dword [ebp], 0x12
jmp 0x5d87a0
mov eax, dword [esp + 0x18]
mov dword [ebp + 0xc8], eax
mov dword [ebp + 0x244], 1
jmp 0x5d8799
push ebp
push dword [esp + 0x5c]
push dword [esp + 0x28]
push dword [esp + 0x5c]
call fcn.005d9880
add esp, 0x10
mov ebx, eax
cmp ebx, 1
jne 0x5d87ad
mov dword [ebp], 0xe
jmp case.default.0x5d8896
push ebp
call fcn.005ddcd0
add esp, 4
jmp 0x5d8e12
mov edi, dword [esi + 4]
cmp edi, 6
jae 0x5d8e67
mov eax, dword [esp + 0x10]
mov ebx, dword [eax]
mov edx, dword [esi + 8]
cmp edx, ebx
je 0x5d8799
movzx eax, byte [edx]
mov ecx, edi
shl eax, cl
add edi, 8
or dword [esi], eax
lea eax, [edx + 1]
mov dword [esi + 4], edi
mov dword [esi + 8], eax
cmp edi, 6
jb 0x5d8e42
mov ecx, dword [esi]
lea eax, [edi - 6]
mov edx, ecx
shr ecx, 6
and edx, dword [0x64b638]
mov dword [esi], ecx
mov ecx, edx
mov dword [esi + 4], eax
and ecx, dword [0x64b628]
mov eax, dword [ebp + 0x1c]
shr edx, 2
shl edx, cl
mov dword [ebp + 0xf0], ecx
mov dword [ebp + 0xf4], edx
push dword [ebp + 0xcc]
push dword [ebp + 0x24]
call eax
add esp, 8
mov dword [ebp + 0x258], eax
test eax, eax
jne 0x5d8eb8
lea ebx, [eax - 0x15]
jmp 0x5d87a0
mov dword [ebp + 4], 0
mov dword [ebp], 6
mov eax, dword [ebp + 4]
mov dword [esp + 0x1c], eax
cmp eax, dword [ebp + 0xcc]
jge 0x5d8f34
mov edi, dword [esi + 4]
cmp edi, 2
jae 0x5d8f05
mov ebx, dword [esi + 0x10]
mov edx, dword [esi + 8]
cmp edx, ebx
je 0x5d906f
movzx eax, byte [edx]
mov ecx, edi
shl eax, cl
add edi, 8
or dword [esi], eax
lea eax, [edx + 1]
mov dword [esi + 4], edi
mov dword [esi + 8], eax
cmp edi, 2
jb 0x5d8ee0
mov ecx, dword [esi]
lea eax, [edi - 2]
mov edx, ecx
shr ecx, 2
and edx, dword [0x64b628]
mov dword [esi], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x258]
mov byte [ecx + eax], dl
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, dword [ebp + 0xcc]
jl 0x5d8ed5
mov dword [ebp], 0x16
push ebp
lea edi, [ebp + 0x254]
push edi
lea eax, [ebp + 0x250]
push eax
mov eax, dword [ebp + 0xcc]
shl eax, 6
push eax
call fcn.005d9c20
mov ebx, eax
add esp, 0x10
cmp ebx, 1
jne 0x5d87a0
xorps xmm0, xmm0
xor ebx, ebx
movups xmmword [ebp + 0x264], xmm0
mov dword [esp + 0x1c], ebx
movups xmmword [ebp + 0x274], xmm0
cmp dword [ebp + 0xcc], ebx
jbe 0x5d9020
nop word [eax + eax]
mov eax, dword [edi]
mov ecx, ebx
shl ecx, 6
xor esi, esi
mov bl, byte [eax + ecx]
lea edi, [ecx + 2]
add edi, eax
lea ebp, [esi + 0x10]
movzx edx, byte [edi - 2]
lea edi, [edi + 4]
movzx ecx, byte [edi - 5]
movzx eax, bl
xor edx, eax
movzx eax, bl
xor ecx, eax
movzx eax, bl
or edx, ecx
movzx ecx, byte [edi - 3]
xor ecx, eax
movzx eax, byte [edi - 4]
or edx, ecx
movzx ecx, bl
xor ecx, eax
or edx, ecx
or esi, edx
sub ebp, 1
jne 0x5d8fa4
mov ebp, dword [esp + 0x44]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x5d9006
mov eax, ebx
mov ecx, ebx
shr eax, 5
and ecx, 0x1f
lea edx, [eax*4]
mov eax, dword [edx + ebp + 0x264]
bts eax, ecx
mov dword [edx + ebp + 0x264], eax
inc ebx
lea edi, [ebp + 0x254]
mov dword [esp + 0x1c], ebx
cmp ebx, dword [ebp + 0xcc]
jb 0x5d8f90
lea esi, [ebp + 8]
mov dword [ebp], 0x17
mov ecx, dword [ebp + 0xf0]
mov eax, 0x18
mov ebx, dword [ebp + 0xf4]
lea ecx, [ecx + 1]
shl eax, cl
lea edi, [ebx + 0x10]
add edi, eax
test byte [ebp + 0x24c], 0x20
mov dword [esp + 0x2c], edi
mov dword [esp + 0x1c], edi
je 0x5d90df
mov ecx, dword [ebp + 0xf0]
cmp ebx, 0x7ffffffc
jb 0x5d907b
mov dword [esp + 0x1c], select
jmp 0x5d90ce
mov eax, dword [esp + 0x1c]
mov dword [ebp + 4], eax
jmp 0x5d8799
mov edx, 0x7ffffffc
mov edi, 1
sub edx, ebx
shl edi, cl
shr edx, cl
xor eax, eax
add edx, 4
dec edi
mov ecx, edx
shr ecx, 1
je 0x5d909c
inc eax
shr ecx, 1
jne 0x5d9097
lea ecx, [eax - 1]
shr edx, cl
lea eax, [eax*2 - 4]
mov ecx, dword [ebp + 0xf0]
and edx, 1
or edx, eax
jne 0x5d90be
lea edx, [ebx + 0x10]
mov dword [esp + 0x1c], edx
jmp 0x5d90ce
lea eax, [edx - 1]
shl eax, cl
or eax, edi
add eax, 0x11
add eax, ebx
mov dword [esp + 0x1c], eax
inc ecx
mov eax, 0x3e
shl eax, cl
add eax, 0x10
add eax, ebx
mov dword [esp + 0x2c], eax
push ebp
lea eax, [ebp + 0xfc]
push eax
mov eax, dword [ebp + 0xd4]
lea ecx, [ebp + 0xf8]
push ecx
shl eax, 2
push eax
call fcn.005d9c20
mov edi, dword [esp + 0x58]
mov ebx, eax
add esp, 0x10
cmp ebx, 1
jne 0x5d87ad
push dword [ebp + 0x250]
lea eax, [ebp + 0x7c]
push 0x100
push 0x100
push eax
push ebp
call fcn.005de830
push dword [ebp + 0xd0]
lea ecx, [ebp + 0x8c]
mov edi, eax
push 0x2c0
push 0x2c0
push ecx
push ebp
call fcn.005de830
push dword [ebp + 0xf8]
lea ecx, [ebp + 0x9c]
mov ebx, eax
push dword [esp + 0x48]
and ebx, edi
push dword [esp + 0x5c]
push ecx
push ebp
call fcn.005de830
and eax, ebx
add esp, 0x3c
test al, 1
je 0x5d9682
mov edi, dword [esp + 0x48]
mov dword [ebp + 4], 0
mov dword [ebp], 0x18
mov eax, dword [ebp + 4]
sub eax, 0
je 0x5d91aa
sub eax, 1
je 0x5d91a3
sub eax, 1
jne 0x5d96a0
mov edx, 0x9c
jmp 0x5d91af
mov edx, 0x8c
jmp 0x5d91af
mov edx, 0x7c
cmp dword [ebp + 0x284], 1
lea ecx, [ebp + 0x980]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], ecx
je 0x5d91e2
mov eax, dword [edx + ebp + 4]
mov dword [ebp + 0x984], eax
mov dword [ecx], 0
mov dword [ebp + 0x284], 1
jmp 0x5d91e6
mov dword [esp + 0x2c], ecx
movzx eax, word [edx + ebp + 0xc]
cmp dword [ecx], eax
jge 0x5d924d
nop
push ebp
lea eax, [esp + 0x38]
push eax
push dword [ebp + 0x984]
movzx eax, word [edx + ebp + 0xa]
push eax
movzx eax, word [edx + ebp + 8]
push eax
call fcn.005dbbe0
mov ebx, eax
add esp, 0x14
cmp ebx, 1
jne 0x5d87a0
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebp + 0x984]
mov edx, dword [ebx]
mov ecx, dword [ecx + ebp]
mov dword [ecx + edx*4], eax
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x1c]
inc dword [ebx]
shl eax, 2
add dword [ebp + 0x984], eax
movzx eax, word [edx + ebp + 0xc]
cmp dword [ebx], eax
jl 0x5d91f0
mov edi, dword [esp + 0x48]
mov ebx, 1
mov dword [ebp + 0x284], 0
inc dword [ebp + 4]
cmp dword [ebp + 4], 3
jl case.default.0x5d8896
mov dword [ebp], 0x19
mov edi, dword [ebp + 0xdc]
mov edx, edi
mov eax, edi
shl edx, 6
add edx, dword [ebp + 0x254]
mov ecx, edi
shr eax, 5
and ecx, 0x1f
mov dword [ebp + 0x74], edx
push ebp
mov eax, dword [ebp + eax*4 + 0x264]
shr eax, cl
and eax, 1
mov dword [ebp + 0xb4], eax
movzx ecx, byte [edx]
mov eax, dword [ebp + 0x7c]
mov eax, dword [eax + ecx*4]
mov dword [ebp + 0x100], eax
mov eax, dword [ebp + 0x258]
movzx eax, byte [eax + edi]
and eax, 3
shl eax, 9
add eax, 0x64c0e8
mov dword [ebp + 0x70], eax
mov eax, dword [ebp + 0xfc]
mov dword [ebp + 0x78], eax
mov eax, dword [ebp + 0x8c]
mov eax, dword [eax]
mov dword [ebp + 0x6c], eax
call fcn.005d9730
add esp, 4
test eax, eax
jne 0x5d92f4
lea ebx, [eax - 0x1b]
jmp 0x5d87a0
mov ecx, dword [ebp + 0xf4]
lea eax, [ebp + 0x284]
mov ebx, dword [ebp + 0xf0]
mov edx, 1
mov dword [esp + 0x1c], ecx
movzx ecx, word [ebp + 0xa6]
mov dword [esp + 0x30], ecx
mov ecx, ebx
mov dword [esp + 0x3c], ebx
mov ebx, 1
shl edx, cl
xor ecx, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], edx
lea edi, [ebx + 0xf]
mov dword [esp + 0x2c], ecx
cmp dword [esp + 0x1c], ecx
jbe 0x5d9378
mov ebp, 0xfffffff1
lea ecx, [eax + 0x10]
lea edx, [eax + 0x260]
sub ebp, eax
mov eax, dword [esp + 0x1c]
mov esi, eax
lea edi, [eax + 0x10]
mov byte [ecx], 0
lea eax, [ecx + ebp]
mov dword [edx], eax
lea edx, [edx + 4]
lea ecx, [ecx + 1]
sub esi, ebx
jne 0x5d9357
mov ebp, dword [esp + 0x44]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
lea esi, [ebp + 8]
cmp edi, dword [esp + 0x30]
jae 0x5d93d9
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x1c]
lea eax, [ecx + 2]
mov ecx, ebx
inc esi
shl eax, cl
mov ecx, dword [esp + 0x3c]
sub eax, 4
shl eax, cl
xor ecx, ecx
add esi, eax
test edx, edx
je 0x5d93bf
lea edx, [ebp + 0x220]
lea edx, [edx + edi*4]
lea eax, [esi + ecx]
mov byte [edi + ebp], bl
inc ecx
mov dword [edx], eax
inc edi
lea edx, [edx + 4]
cmp ecx, dword [esp + 0x28]
jb 0x5d93a8
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
add ebx, ecx
xor ecx, 1
mov dword [esp + 0x2c], ecx
cmp edi, dword [esp + 0x30]
jb 0x5d9382
mov ebp, dword [esp + 0x44]
lea esi, [ebp + 8]
mov edi, dword [esp + 0x48]
mov dword [ebp], 7
push ebp
call fcn.005dae20
mov ebx, eax
add esp, 4
cmp ebx, 2
jne case.default.0x5d8896
push ebp
call fcn.005dcd00
add esp, 4
mov ebx, eax
jmp case.default.0x5d8896
push 0
push dword [esp + 0x5c]
push dword [esp + 0x28]
push dword [esp + 0x5c]
push ebp
call fcn.005dde40
mov ebx, eax
add esp, 0x14
cmp ebx, 1
jne 0x5d87ad
push ebp
call fcn.005dde10
mov ecx, dword [ebp + 0x24c]
mov eax, ebx
shr ecx, 6
add esp, 4
and ecx, 0x3f
shl eax, cl
cmp dword [ebp + 0x40], eax
jne 0x5d944e
mov eax, dword [ebp + 0x38]
mov dword [ebp + 0x3c], eax
mov eax, dword [ebp]
cmp eax, 0xf
jne 0x5d949c
mov ecx, dword [ebp + 0x260]
test ecx, ecx
je 0x5d9483
mov eax, dword [ecx + 0x10]
cmp eax, dword [ecx + 0x14]
je 0x5d9483
push dword [ebp + 0x34]
push ebp
call fcn.005d97c0
add dword [ebp + 0x34], eax
add esp, 8
mov eax, dword [ebp + 0x34]
cmp eax, dword [ebp + 0x40]
jge case.default.0x5d8896
cmp dword [ebp + 0x60], 0
mov eax, 0xe
mov ecx, 7
cmovne eax, ecx
mov dword [ebp], eax
jmp case.default.0x5d8896
cmp eax, 0x10
jne 0x5d94ae
mov eax, 0xa
mov dword [ebp], eax
jmp case.default.0x5d8896
cmp dword [ebp + 4], 0
jne 0x5d94cd
cmp dword [ebp + 0x60], 0
mov eax, 0xe
mov ecx, 9
cmovne eax, ecx
mov dword [ebp], eax
jmp case.default.0x5d8896
mov eax, 8
mov dword [ebp], eax
jmp case.default.0x5d8896
cmp dword [ebp + 0x60], 0
jge 0x5d94ea
mov ebx, 0xfffffff6
jmp case.default.0x5d8896
push ebp
call fcn.005de980
add esp, 4
test byte [ebp + 0x24c], 1
jne 0x5d9508
mov dword [ebp], 3
jmp case.default.0x5d8896
mov edi, dword [esi + 4]
mov edx, 0
mov ecx, edi
and ecx, 7
je 0x5d952b
mov edx, dword [ecx*4 + 0x64b620]
sub edi, ecx
mov eax, dword [esi]
and edx, eax
shr eax, cl
mov dword [esi + 4], edi
mov dword [esi], eax
cmp edi, 0x20
jae 0x5d953c
mov eax, 1
mov ecx, edi
shl eax, cl
dec eax
and dword [esi], eax
test edx, edx
je 0x5d954a
mov ebx, 0xfffffff1
jmp 0x5d87a0
cmp dword [ebp + 0x30], 0
jne 0x5d95a3
mov eax, dword [esi + 8]
mov ecx, edi
shr ecx, 3
sub eax, ecx
test ecx, ecx
lea edx, [ecx*8]
mov ecx, dword [esi + 8]
cmovne ecx, eax
sub edi, edx
mov dword [esp + 0x2c], ecx
mov dword [esi + 8], ecx
mov dword [esi + 4], edi
cmp edi, 0x20
jae 0x5d958a
mov ecx, edi
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x2c]
dec eax
and dword [esi], eax
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x48]
mov eax, dword [eax]
sub eax, ecx
mov ecx, dword [esp + 0x4c]
mov dword [edi], eax
mov eax, dword [esi + 8]
mov dword [ecx], eax
jmp 0x5d95a7
mov edi, dword [esp + 0x48]
mov dword [ebp], 0x1a
cmp dword [ebp + 0x64], 0
je 0x5d95d6
push 1
push dword [esp + 0x5c]
push dword [esp + 0x28]
push dword [esp + 0x5c]
push ebp
call fcn.005dde40
mov ebx, eax
add esp, 0x14
cmp ebx, 1
jne 0x5d87ad
mov ecx, dword [esp + 0x24]
sub ecx, dword [edi]
push ecx
push ebx
push ebp
call fcn.005ddc70
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov ebx, eax
jmp 0x5d95d6
mov edx, dword [esp + 0x4c]
mov dword [edx], eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
sub eax, dword [esi + 8]
mov dword [edi], eax
je 0x5d95d6
mov eax, dword [edx]
mov ecx, dword [ebp + 0x30]
mov al, byte [eax]
mov byte [ecx + ebp + 0x28], al
inc dword [ebp + 0x30]
inc dword [edx]
add dword [edi], 0xffffffff
jne 0x5d9606
jmp 0x5d95d6
cmp dword [ebp + 0x30], 0
je 0x5d962c
mov dword [ebp + 0x30], 0
jmp 0x5d95d6
mov edi, dword [esi + 4]
mov ecx, edi
mov eax, dword [esi + 8]
shr ecx, 3
sub eax, ecx
test ecx, ecx
lea edx, [ecx*8]
mov ecx, dword [esi + 8]
cmovne ecx, eax
sub edi, edx
mov dword [esp + 0x44], ecx
mov dword [esi + 8], ecx
mov dword [esi + 4], edi
cmp edi, 0x20
jae 0x5d9669
mov ecx, edi
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x44]
dec eax
and dword [esi], eax
mov eax, dword [esi + 0x10]
mov edi, dword [esp + 0x48]
sub eax, ecx
mov ecx, dword [esp + 0x4c]
mov dword [edi], eax
mov eax, dword [esi + 8]
mov dword [ecx], eax
jmp 0x5d95d6
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x24]
sub ecx, dword [eax]
push ecx
push 0xffffffffffffffea
push ebp
call fcn.005ddc70
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x24]
sub ecx, dword [edi]
push ecx
push 0xffffffffffffffe1
push ebp
call fcn.005ddc70
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret