Function at 0xb5d4d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov edi, dword [ebp + 8]
mov dword [ebp + eax - 0x38], 0
add eax, 4
cmp eax, 0x20
jb 0xb5d4de
mov eax, dword [ebp + 0x18]
sar eax, 4
mov dword [ebp - 0x5c], eax
shl eax, 4
cmp dword [ebp + 0x18], eax
mov ebx, eax
jle 0xb5da4a
cmp dword [ebp + 0x18], 0x78
jne 0xb5da77
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x78], 0
mov dword [eax + 0x7c], 0
mov dword [eax + 0x80], 0
mov dword [eax + 0x84], 0
mov eax, 0x210
call fcn.00bd0e20
mov esi, 0x20
mov ebx, pe_nt_image_headers32
sub esp, eax
mov dword [ebp - 0x5c], 8
lea eax, [esp + 0x18]
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x3c], esi
mov edx, dword [ebp - 0x64]
xor eax, eax
mov esi, dword [ebp + 0x14]
mov dword [ebp + 8], edi
movsx ecx, byte [esi + eax]
mov edi, ecx
sar edi, 0x1f
xor ecx, edi
mov dword [edx + eax*4], ecx
movsx ecx, byte [esi + eax + 1]
sub dword [edx + eax*4], edi
mov edi, ecx
sar edi, 0x1f
xor ecx, edi
mov dword [edx + eax*4 + 4], ecx
movsx ecx, byte [esi + eax + 2]
sub dword [edx + eax*4 + 4], edi
mov edi, ecx
sar edi, 0x1f
xor ecx, edi
mov dword [edx + eax*4 + 8], ecx
movsx ecx, byte [esi + eax + 3]
sub dword [edx + eax*4 + 8], edi
mov edi, ecx
sar edi, 0x1f
xor ecx, edi
mov dword [edx + eax*4 + 0xc], ecx
sub dword [edx + eax*4 + 0xc], edi
add eax, 4
cmp eax, ebx
jl 0xb5d566
mov esi, dword [ebp - 0x3c]
mov edi, dword [ebp + 8]
lea edx, [esi + 0x12]
shr edx, 4
shl edx, 4
mov eax, edx
call fcn.00bd0e20
sub esp, eax
lea eax, [esp + 0x18]
mov dword [ebp - 0x58], eax
mov eax, edx
call fcn.00bd0e20
mov ebx, dword [ebp - 0x5c]
sub esp, eax
lea eax, [esp + 0x18]
test ebx, ebx
mov dword [ebp - 0x68], eax
jle 0xb5d768
movzx eax, byte [0xe0cb54]
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x64]
mov dword [ebp + 8], edi
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x50], eax
movzx eax, byte [0xe0cb55]
mov dword [ebp - 0x3c], eax
movzx eax, byte [0xe0cb56]
mov dword [ebp - 0x44], eax
movzx eax, byte [0xe0cb57]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x48], eax
lea eax, [eax + ecx*4]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x48]
lea ebx, [esi + 0x40]
mov dword [eax], 0
mov ecx, dword [ebp - 0x50]
xor eax, eax
nop
lea esi, [esi]
mov edx, dword [esi + eax*8 + 4]
add edx, dword [esi + eax*8]
cmp edx, ecx
jg 0xb5d710
mov dword [ebp + eax*4 - 0x38], edx
add eax, 1
cmp eax, 8
jne 0xb5d650
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], 0
lea edi, [ecx + eax]
cmp edi, edx
jg 0xb5d72b
mov eax, dword [ebp - 0x30]
add eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], edi
cmp eax, edx
jg 0xb5d917
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x34], eax
cmp edx, ecx
jg 0xb5d8fd
mov dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x20]
cmp edx, ecx
jg 0xb5d8fd
mov dword [ebp - 0x2c], edx
mov ecx, eax
xor edx, edx
mov eax, edi
add edx, dword [ebp - 0x40]
add eax, ecx
cmp eax, dword [ebp - 0x44]
jg 0xb5d73a
mov edi, dword [ebp - 0x2c]
add edi, dword [ebp - 0x30]
cmp edi, dword [ebp - 0x44]
mov dword [ebp - 0x38], eax
jg 0xb5d90b
mov dword [ebp - 0x34], edi
add eax, edi
xor ecx, ecx
add edx, ecx
cmp dword [ebp - 0x54], eax
jl 0xb5d746
mov edi, dword [ebp - 0x4c]
mov dword [edi], eax
xor eax, eax
add edx, eax
je 0xb5d74f
mov eax, dword [ebp - 0x48]
add dword [eax], 1
mov eax, esi
sar dword [eax], 1
add eax, 4
cmp ebx, eax
jne 0xb5d702
jmp 0xb5d643
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], 1
lea edi, [ecx + eax]
cmp edi, edx
jle 0xb5d686
mov edx, 1
add eax, ecx
add edx, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x44]
jle 0xb5d6cf
mov ecx, 1
add edx, ecx
cmp dword [ebp - 0x54], eax
jge 0xb5d6ef
mov eax, 1
add edx, eax
jne 0xb5d6fa
add dword [ebp - 0x48], 4
add dword [ebp - 0x4c], 4
mov esi, ebx
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x60], eax
jne 0xb5d637
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp + 8], edi
mov dword [ebp - 0x3c], esi
mov edi, dword [ebp - 0x68]
mov ebx, 0xe0c9e0
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x40], 0x7fffffff
sar eax, 1
mov dword [ebp - 0x48], 0
lea eax, [eax + eax*8]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x3c]
test esi, esi
movzx edx, byte [eax + ecx + 0xe0c9b8]
jle 0xb5d7d7
xor eax, eax
jmp 0xb5d7bd
movzx ecx, byte [ebx + 0x11]
add eax, 1
add edx, ecx
cmp eax, esi
je 0xb5d7d7
mov ecx, dword [edi + eax*4]
test ecx, ecx
jg 0xb5d7b0
mov ecx, dword [ebp - 0x58]
mov ecx, dword [ecx + eax*4]
add eax, 1
movzx ecx, byte [ebx + ecx]
add edx, ecx
cmp eax, esi
jne 0xb5d7bd
cmp edx, dword [ebp - 0x40]
jge 0xb5d7e5
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x48], eax
add dword [ebp - 0x3c], 1
add ebx, 0x12
mov eax, dword [ebp - 0x3c]
cmp eax, 9
jne 0xb5d794
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x48]
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], 8
add eax, 0xe0c9cc
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00b47330
lea eax, [ebx + ebx*8]
mov ecx, dword [ebp - 0x5c]
lea eax, [eax + eax + 0xe0caa0]
test ecx, ecx
mov dword [ebp - 0x4c], eax
jle 0xb5d935
mov eax, dword [ebp - 0x68]
shl ecx, 2
mov ebx, dword [ebp - 0x58]
mov esi, ecx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x48], eax
mov ecx, eax
add eax, esi
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ecx
jmp 0xb5d889
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], 8
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x40]
mov eax, dword [eax]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.00b47330
add dword [ebp - 0x3c], 4
add dword [ebp - 0x40], 4
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x44], eax
je 0xb5d968
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
test edx, edx
je 0xb5d855
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], 8
xor esi, esi
mov dword [esp + 4], 0x11
mov dword [esp], edi
mov dword [ebp - 0x50], edx
mov dword [esp + 8], eax
call fcn.00b47330
mov edx, dword [ebp - 0x50]
cmp edx, 1
lea ebx, [edx - 1]
jle 0xb5d8e8
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0xe0cb42
add esi, 1
mov dword [esp + 4], 0x11
mov dword [esp], edi
call fcn.00b47330
cmp esi, ebx
jne 0xb5d8c1
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0xe0cb42
jmp 0xb5d864
mov ecx, eax
mov edx, 1
mov eax, edi
jmp 0xb5d6c5
add eax, ecx
mov ecx, 1
jmp 0xb5d6e8
mov edx, 1
mov eax, edi
jmp 0xb5d6c5
lea eax, [esi + 0x10]
mov dword [ebp - 0x40], eax
add dword [ebp - 0x48], 4
mov esi, dword [ebp - 0x40]
cmp esi, dword [ebp - 0x4c]
jne 0xb5d9ab
mov eax, dword [ebp - 0x58]
mov dword [esp], edi
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
call fcn.00b67460
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x54]
add ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x64]
mov dword [ebp + 8], edi
mov edi, esi
mov esi, ebx
mov ebx, dword [ebp - 0x60]
mov eax, dword [ebx]
test eax, eax
jle 0xb5d990
mov eax, dword [ebp + 8]
mov dword [esp + 4], edi
mov dword [esp], eax
call 0xb5daa0
add ebx, 4
add edi, 0x40
cmp ebx, esi
jne 0xb5d97b
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
shl eax, 4
add eax, esi
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
test eax, eax
jle 0xb5d923
sub eax, 1
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x44], eax
lea eax, [esi + 0x10]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x3c]
movsx ebx, byte [eax]
test bl, bl
jle 0xb5da43
mov eax, dword [ebp - 0x44]
test eax, eax
mov esi, eax
je 0xb5da0a
lea esi, [esi]
mov ecx, esi
mov eax, ebx
mov dword [esp + 0xc], 8
sar eax, cl
mov dword [esp + 8], 0xe0c623
mov dword [esp], edi
and eax, 1
mov dword [esp + 4], eax
call fcn.00b47330
sub esi, 1
jne 0xb5d9e0
and ebx, 1
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0xe0c623
mov dword [esp + 4], ebx
mov dword [esp], edi
call fcn.00b47330
add dword [ebp - 0x3c], 1
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x40]
je 0xb5d929
mov eax, dword [ebp - 0x3c]
movsx ebx, byte [eax]
test bl, bl
jg 0xb5d9d1
neg ebx
movsx ebx, bl
jmp 0xb5d9d1
mov ecx, dword [ebp - 0x5c]
mov eax, ecx
shl eax, 6
add eax, 0x10
call fcn.00bd0e20
sub esp, eax
test ebx, ebx
lea esi, [ecx*4]
lea eax, [esp + 0x18]
mov dword [ebp - 0x64], eax
jg 0xb5d558
jmp 0xb5d5c0
mov dword [esp + 8], 0x59
mov dword [esp + 4], str.silk_encode_pulses.c
mov dword [esp], 0xe0c278
call fcn.00b371e0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
push edi
xor eax, eax
push esi
push ebx
sub esp, 0x6c
mov esi, dword [esp + 0x80]
mov ebx, dword [esp + 0x84]
mov esi, esi
lea edi, [edi]
mov edx, dword [ebx + eax*8 + 4]
add edx, dword [ebx + eax*8]
mov dword [esp + eax*4 + 0x40], edx
add eax, 1
cmp eax, 8
jne 0xb5dac0
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x40]
mov ebp, dword [esp + 0x54]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x14], ecx
add ecx, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov edx, ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x10], edi
mov dword [esp + 0x20], eax
add eax, edi
mov dword [esp + 0x2c], ebp
mov edi, dword [esp + 0x5c]
add edx, eax
mov dword [esp + 0x18], ecx
add ecx, ebp
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], edi
add edi, ebp
add ecx, edi
mov dword [esp + 0x34], edi
mov edi, ecx
add ecx, edx
test ecx, ecx
jle 0xb5db66
movzx ecx, byte [ecx + 0xe0c72c]
mov dword [esp + 4], edx
mov dword [esp + 0xc], 8
mov dword [esp], esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edx
add ecx, 0xe0c740
mov dword [esp + 8], ecx
call fcn.00b47330
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
test edx, edx
jle 0xb5db97
movzx edx, byte [edx + 0xe0c72c]
mov dword [esp + 4], eax
mov dword [esp + 0xc], 8
mov dword [esp], esi
mov dword [esp + 0x38], eax
add edx, 0xe0c7e0
mov dword [esp + 8], edx
call fcn.00b47330
mov eax, dword [esp + 0x38]
test eax, eax
jle 0xb5dbc3
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
mov dword [esp], esi
add eax, 0xe0c880
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x10]
test eax, eax
jle 0xb5dbf1
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x20]
test eax, eax
jle 0xb5dc20
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx + 8]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x28]
test eax, eax
jle 0xb5dc50
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
mov dword [esp], esi
add eax, 0xe0c880
mov dword [esp + 8], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x14]
test eax, eax
jle 0xb5dc7f
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x10]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x24]
test eax, eax
jle 0xb5dcae
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x18]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
test edi, edi
jle 0xb5dcda
movzx eax, byte [edi + 0xe0c72c]
mov dword [esp + 0xc], 8
mov dword [esp], esi
add eax, 0xe0c7e0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x1c]
test eax, eax
jle 0xb5dd0a
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
mov dword [esp], esi
add eax, 0xe0c880
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x18]
test eax, eax
jle 0xb5dd39
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x20]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0xb5dd68
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x28]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x34]
test eax, eax
jle 0xb5dd94
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
mov dword [esp + 4], ebp
mov dword [esp], esi
add eax, 0xe0c880
mov dword [esp + 8], eax
call fcn.00b47330
test ebp, ebp
jle 0xb5ddbf
movzx eax, byte [ebp + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
mov eax, dword [esp + 0x30]
test eax, eax
jle 0xb5ddee
movzx eax, byte [eax + 0xe0c72c]
mov dword [esp + 0xc], 8
add eax, 0xe0c920
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x38]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00b47330
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret