Function at 0x1004d96
Capabilities:
Encode data using xor
Encrypt data using speck

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x34]
xor eax, eax
lea ebx, [esp + 0x10]
lea ebp, [esp + 0xc]
lea esi, [esp + 8]
mov dword [esp + 0x18], edx
mov edi, dword [esp + 0x3c]
mov dword [ebx], eax
mov dword [ebp], eax
mov dword [esi], eax
mov eax, dword [ecx + 0x40]
lea edx, [eax + eax*4]
add eax, eax
add edx, dword [esp + 0x38]
sub edi, eax
mov eax, esp
mov dword [eax], edx
push eax
push ebx
push esi
push ebp
push edi
call fcn.0100e900
add esp, 0x14
test eax, eax
je 0x1004df1
mov eax, dword [esp + 0xc]
test eax, eax
mov dword [esp + 4], eax
jne 0x1004dff
mov eax, dword [esp]
mov ecx, dword [esp + 0x40]
mov dword [ecx], eax
jmp 0x1005674
mov edx, 0x10065d0
mov esi, 3
xor eax, eax
movzx ebx, byte [0x117418b]
sub esi, edx
mov ecx, esi
xor ecx, edx
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt ebx, eax
jb 0x1004f42
mov al, byte [0x117418b]
mov ebp, esi
xor ebx, ebx
mov ah, 1
xor ebp, edx
sete bl
mov ecx, ebx
xor ecx, 3
lea ecx, [ecx + ebx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0x117418b], ah
jne 0x1004e31
mov ecx, 0x10065d0
mov edx, 3
xor ebx, ebx
movzx eax, al
sub edx, ecx
mov esi, edx
xor esi, ecx
sete bl
mov esi, ebx
xor ebx, 3
lea ebx, [ebx + esi*2]
xor bl, 7
movzx esi, bl
bt eax, esi
jae 0x1004ea2
mov esi, edx
xor eax, eax
xor esi, ecx
movzx esi, byte [0x117418b]
sete al
mov ebx, eax
xor ebx, 3
lea eax, [ebx + eax*2]
bt esi, eax
jae 0x1004e80
jmp 0x1004f42
xor eax, eax
xor edx, ecx
movzx esi, byte [0x117418b]
sete al
mov ecx, eax
xor ecx, 0x4920a51b
lea edx, [ecx + eax*2 + 0x11c8]
mov eax, edx
and al, 7
movzx eax, al
bt esi, eax
jb 0x1004f1a
mov ebp, 0x117417c
xor eax, eax
mov esi, dword [ebp]
mov ecx, eax
mov ebx, edx
inc eax
shl ebx, cl
xor cl, 0x1f
xor esi, edx
shr edx, cl
mov dword [ebp], esi
or edx, ebx
not esi
add ebp, 4
imul edx, esi
cmp eax, 3
jne 0x1004ed2
mov eax, 0x10065d0
mov ecx, 3
xor edx, edx
sub ecx, eax
xor ecx, eax
sete dl
mov eax, edx
xor eax, 3
lea ecx, [eax + edx*2]
mov dl, 1
shl dl, cl
or byte [0x117418b], dl
mov eax, 0x10065d0
mov ecx, 3
xor edx, edx
sub ecx, eax
xor ecx, eax
sete dl
mov eax, edx
xor eax, 3
lea ecx, [eax + edx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0x117418b], al
mov ebx, dword [esp + 8]
push 0x117417c
push ebx
mov esi, dword [esp + 0xc]
push esi
mov eax, dword [esp + 0x40]
push eax
call dword [eax + 0x18]
add esp, 0x10
test eax, eax
jne 0x1004f78
cmp dword [esp + 0x18], 0
je 0x1004f6d
mov dword [esp + 0x14], ebx
jmp 0x1004fea
mov eax, dword [esp + 0x40]
mov dword [eax], esi
jmp 0x1005674
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
test ecx, ecx
je 0x1004f8a
mov edx, dword [esp + 0x10]
mov dword [ecx], edx
mov ebx, dword [esp + 0x18]
test eax, eax
mov esi, 0
jne 0x1004f9c
mov edx, dword [esp]
jmp 0x1004fa1
mov edx, dword [esp]
mov dword [eax], edx
mov ecx, dword [esp + 0x34]
mov eax, esp
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0100e900
add esp, 0x14
test eax, eax
jne 0x1004fd2
mov eax, dword [esp]
mov ecx, dword [esp + 0x40]
mov dword [ecx], eax
jmp 0x1005676
mov eax, dword [esp + 0xc]
test eax, eax
mov dword [esp + 4], eax
je 0x100509f
mov eax, dword [esp + 8]
mov dword [esp + 0x14], eax
mov ebp, fcn.010072f0
mov edx, fcn.010072f0
xor eax, eax
movzx esi, byte [0x117419b]
not ebp
and ebp, 1
mov ecx, ebp
add ecx, edx
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt esi, eax
jb 0x1005159
mov al, byte [0x117419b]
mov esi, ebp
xor ecx, ecx
mov ah, 1
add esi, edx
sete cl
mov ebx, ecx
not ebx
lea ecx, [ebx + ecx*2]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0x117419b], ah
jne 0x1005023
mov edx, fcn.010072f0
mov ecx, fcn.010072f0
xor ebx, ebx
movzx eax, al
not edx
and edx, 1
mov esi, edx
add esi, ecx
sete bl
mov esi, ebx
not ebx
lea ebx, [ebx + esi*2]
and bl, 7
xor bl, 7
movzx esi, bl
bt eax, esi
jae 0x10050af
mov esi, edx
xor eax, eax
add esi, ecx
movzx esi, byte [0x117419b]
sete al
mov ebx, eax
not ebx
lea eax, [ebx + eax*2]
and al, 7
movzx eax, al
bt esi, eax
jae 0x1005079
jmp 0x1005159
test ebx, ebx
jne 0x1004fc4
xor esi, esi
inc esi
jmp 0x1005676
xor eax, eax
add edx, ecx
movzx esi, byte [0x117419b]
sete al
mov ecx, eax
xor ecx, 0x98aba89f
lea edx, [ecx + eax*2 + 0xe40]
mov eax, edx
and al, 7
movzx eax, al
bt esi, eax
jb 0x100512c
mov ebp, 0x117418c
xor eax, eax
mov esi, dword [ebp]
mov ecx, eax
mov ebx, edx
inc eax
shl ebx, cl
xor cl, 0x1f
xor esi, edx
shr edx, cl
mov dword [ebp], esi
or edx, ebx
not esi
add ebp, 4
imul edx, esi
cmp eax, 3
jne 0x10050df
mov ecx, fcn.010072f0
mov eax, fcn.010072f0
xor edx, edx
not ecx
and ecx, 1
add ecx, eax
sete dl
mov eax, edx
not eax
lea ecx, [eax + edx*2]
mov al, 1
and cl, 7
shl al, cl
or byte [0x117419b], al
mov ecx, fcn.010072f0
mov eax, fcn.010072f0
xor edx, edx
not ecx
and ecx, 1
add ecx, eax
sete dl
mov eax, edx
not eax
lea ecx, [eax + edx*2]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0x117419b], al
push 0x117418c
mov ebp, dword [esp + 0x18]
push ebp
mov ebx, dword [esp + 0xc]
push ebx
mov esi, dword [esp + 0x40]
push esi
call dword [esi + 0x18]
add esp, 0x10
test eax, eax
je 0x10051ff
mov ebx, dword [esp + 0x10]
mov ecx, esi
mov edx, ebx
push edi
call fcn.0100ea68
add esp, 4
and eax, 0xffffffdf
add eax, 0xffffffbf
cmp eax, 0x1a
jb 0x10051a0
mov eax, dword [esp + 0x40]
jmp 0x1005672
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
test eax, eax
je 0x10051ae
mov dword [eax], ebx
mov ebp, dword [esp]
test ecx, ecx
je 0x10051c8
mov eax, ebp
sub eax, dword [esi + 0x40]
push eax
push ebx
push esi
mov ebx, ecx
call dword [esp + 0x28]
add esp, 0xc
mov dword [ebx], eax
mov eax, esp
mov ecx, esi
mov edx, ebp
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0100e900
add esp, 0x14
test eax, eax
je 0x1004df1
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x10050a7
mov ebp, dword [esp + 8]
mov edx, 0x10067e0
mov dword [esp + 0x14], ebp
mov ebp, 0x10067e0
mov dword [esp + 4], ebx
or edx, 2
xor ebp, 2
movzx ecx, byte [0x11741ab]
mov ebx, dword [esp + 0x18]
mov eax, edx
add eax, ebp
sete al
or al, 6
movzx eax, al
bt ecx, eax
jb 0x1005337
mov al, byte [0x11741ab]
mov ecx, edx
mov ah, 1
add ecx, ebp
sete cl
or cl, 6
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0x11741ab], ah
jne 0x100523c
mov ecx, 0x10067e0
mov ebp, 0x10067e0
movzx eax, al
or ecx, 2
xor ebp, 2
mov edx, ecx
add edx, ebp
sete dl
or dl, 6
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x100529e
mov eax, ecx
movzx edx, byte [0x11741ab]
add eax, ebp
sete al
or al, 6
movzx eax, al
bt edx, eax
jae 0x1005281
jmp 0x1005337
xor edx, edx
add ecx, ebp
movzx ecx, byte [0x11741ab]
sete dl
or edx, 0x8e310cbe
mov eax, edx
and al, 7
movzx eax, al
bt ecx, eax
jb 0x1005312
mov ebp, 0x117419c
xor eax, eax
mov esi, dword [ebp]
mov ecx, eax
mov ebx, edx
inc eax
shl ebx, cl
xor cl, 0x1f
xor esi, edx
shr edx, cl
mov dword [ebp], esi
or edx, ebx
not esi
add ebp, 4
imul edx, esi
cmp eax, 3
jne 0x10052c5
mov eax, 0x10067e0
mov ecx, 0x10067e0
mov esi, dword [esp + 0x34]
xor ecx, 2
or eax, 2
add eax, ecx
mov al, 1
sete cl
or cl, 6
shl al, cl
or byte [0x11741ab], al
mov ebx, dword [esp + 0x18]
mov eax, 0x10067e0
mov ecx, 0x10067e0
xor ecx, 2
or eax, 2
add eax, ecx
mov al, 0xfe
sete cl
or cl, 6
xor cl, 7
rol al, cl
and byte [0x11741ab], al
push 0x117419c
push dword [esp + 0x18]
push dword [esp + 0xc]
push esi
call dword [esi + 0x18]
add esp, 0x10
test ebx, ebx
jne 0x1005353
test eax, eax
jne 0x1005362
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 4]
mov dword [eax], ecx
jmp 0x1005674
mov ebp, fcn.00dcffb0
mov ebx, 3
xor eax, eax
movzx edx, byte [0x11741b7]
sub ebx, ebp
mov ecx, ebx
xor ecx, ebp
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x10054ab
mov al, byte [0x11741b7]
mov esi, ebx
xor edx, edx
xor esi, ebp
sete dl
mov ecx, edx
xor ecx, 1
lea ecx, [edx + ecx*2 + 2]
mov dl, 1
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0x11741b7], dl
jne 0x1005395
mov ecx, fcn.00dcffb0
mov edx, 3
xor ebx, ebx
movzx eax, al
sub edx, ecx
mov esi, edx
xor esi, ecx
sete bl
mov esi, ebx
xor ebx, 1
lea ebx, [esi + ebx*2 + 2]
xor bl, 7
movzx esi, bl
bt eax, esi
jae 0x1005409
mov esi, edx
xor eax, eax
xor esi, ecx
movzx esi, byte [0x11741b7]
sete al
mov ebx, eax
xor ebx, 1
lea eax, [eax + ebx*2 + 2]
bt esi, eax
jae 0x10053e6
jmp 0x10054ab
xor eax, eax
xor edx, ecx
movzx esi, byte [0x11741b7]
sete al
mov ecx, eax
not ecx
and ecx, 0x861
lea edx, [eax + ecx*2 + 0x6c53079a]
mov eax, edx
and al, 7
movzx eax, al
bt esi, eax
jb 0x1005482
mov ebx, 0x11741ac
xor eax, eax
mov esi, dword [ebx]
mov ecx, eax
mov ebp, edx
inc eax
shl ebp, cl
xor cl, 0x1f
xor esi, edx
shr edx, cl
mov dword [ebx], esi
or edx, ebp
not esi
add ebx, 4
imul edx, esi
cmp eax, 2
jne 0x100543b
mov eax, fcn.00dcffb0
mov ecx, 3
xor edx, edx
sub ecx, eax
xor ecx, eax
sete dl
mov eax, edx
xor eax, 1
lea ecx, [edx + eax*2 + 2]
mov dl, 1
shl dl, cl
or byte [0x11741b7], dl
mov eax, fcn.00dcffb0
mov ecx, 3
xor edx, edx
sub ecx, eax
xor ecx, eax
sete dl
mov eax, edx
xor eax, 1
lea ecx, [edx + eax*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0x11741b7], al
mov ebx, dword [esp]
mov esi, dword [esp + 0x34]
mov ebp, dword [esp + 0x10]
mov eax, ebx
sub eax, dword [esi + 0x40]
push 0x11741ac
push eax
push ebp
push esi
call dword [esi + 0x18]
add esp, 0x10
test eax, eax
je 0x10054e4
mov eax, dword [esp + 0x54]
test eax, eax
je 0x1005630
mov dword [eax], 1
jmp 0x1005630
mov dword [esp + 4], ebp
mov ebp, 0x1006880
mov edx, 0x1006880
not ebp
movzx ecx, byte [0x11741bf]
and ebp, 1
mov eax, ebp
add eax, edx
sete al
or al, 4
add al, 0xc4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x1005603
mov al, byte [0x11741bf]
mov ecx, ebp
mov ah, 1
add ecx, edx
sete cl
or cl, 4
add cl, 0xc4
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0x11741bf], ah
jne 0x100551c
mov edx, 0x1006880
mov ecx, 0x1006880
not edx
and edx, 1
mov esi, edx
add esi, ecx
sete ah
or ah, 4
add ah, 0xc4
and ah, 7
xor ah, 7
movzx esi, ah
movzx eax, al
bt eax, esi
jae 0x100558a
mov eax, edx
movzx esi, byte [0x11741bf]
add eax, ecx
sete al
or al, 4
add al, 0xc4
and al, 7
movzx eax, al
bt esi, eax
jae 0x100556c
jmp 0x1005603
add edx, ecx
movzx ecx, byte [0x11741bf]
sete al
or al, 4
add al, 0xc4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x10055d9
mov edx, 0x1006880
mov eax, 0x1006880
xor ecx, ecx
not edx
and edx, 1
add edx, eax
mov al, 1
sete cl
or ecx, 0x57679b04
add ecx, 0xc4
xor dword [0x11741b8], ecx
and cl, 7
shl al, cl
or byte [0x11741bf], al
mov ecx, 0x1006880
mov eax, 0x1006880
not ecx
and ecx, 1
add ecx, eax
mov al, 0xfe
sete cl
or cl, 4
add cl, 0xc4
and cl, 7
xor cl, 7
rol al, cl
and byte [0x11741bf], al
mov esi, dword [esp + 0x34]
mov eax, ebx
sub eax, dword [esi + 0x40]
push 0x11741b8
push eax
mov ebp, dword [esp + 0xc]
push ebp
push esi
call dword [esi + 0x18]
add esp, 0x10
test eax, eax
je 0x1005680
mov eax, dword [esp + 0x54]
test eax, eax
je 0x1005630
mov dword [eax], 0
mov ecx, esi
mov edx, ebx
push edi
call fcn.0100ea68
add esp, 4
mov ecx, eax
call fcn.0100eaa6
test eax, eax
je 0x1005666
add ebx, dword [esi + 0x40]
mov ecx, esi
mov edx, ebx
push edi
call fcn.0100ea68
add esp, 4
mov ecx, eax
call fcn.0100eaa6
test eax, eax
jne 0x1005648
mov dword [esp], ebx
mov eax, dword [esp + 0x40]
cmp ebx, edi
je 0x10050a7
mov dword [eax], ebx
xor esi, esi
mov eax, esi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 0x40]
mov dword [eax], ebp
jmp 0x1005674