Function at 0x40e350
Capabilities:
Encode data using xor
Hash data using sha1

Disassembly:
sub esp, 0xc0
push ebx
mov ebx, dword [esp + 0xcc]
push ebp
mov ebp, ebx
mov eax, ebx
and ebp, 0xffffffc0
and eax, 0x3f
add ebp, 0x40
cmp al, 0x38
mov dword [esp + 8], ebp
jl 0x40e37b
add ebp, 0x40
mov dword [esp + 8], ebp
mov ecx, ebp
sar ecx, 2
shl ecx, 2
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [esp + 0x44], eax
test eax, eax
jne 0x40e3b7
mov eax, dword [esp + 0xd4]
xor edx, edx
pop ebp
pop ebx
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
xor eax, eax
add esp, 0xc0
ret
sub ebp, ebx
push esi
push edi
mov byte [esp + 0x50], 0x80
lea eax, [ebp - 8]
mov dword [esp + 0x48], ebp
cmp eax, 1
jle 0x40e3e3
lea ecx, [eax - 1]
xor eax, eax
mov edx, ecx
lea edi, [esp + 0x51]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [ebp - 8]
lea esi, [ebp - 4]
mov eax, ecx
lea edx, [ebx*8]
cmp eax, esi
jge 0x40e402
mov byte [esp + eax + 0x50], dl
shr edx, 8
inc eax
cmp eax, esi
jl 0x40e3f6
mov eax, esi
cmp eax, ebp
jge 0x40e414
mov byte [esp + eax + 0x50], dl
shr edx, 8
inc eax
cmp eax, ebp
jl 0x40e408
lea eax, [ebp - 8]
cmp eax, ecx
jge 0x40e431
sub ecx, eax
lea edi, [esp + eax + 0x50]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, ebx
mov edi, 0
and eax, 0xfffffffc
mov dword [esp + 0x34], edi
jle 0x40e495
mov ecx, dword [esp + 0xd4]
mov ebp, dword [esp + 0x4c]
lea esi, [ecx + 3]
lea ecx, [eax + 3]
shr ecx, 2
mov dword [esp + 0x44], ecx
lea edx, [ecx*4]
mov dword [esp + 0x34], edx
xor eax, eax
mov edx, esi
mov edi, 4
xor ebx, ebx
mov bl, byte [edx]
shl eax, 8
xor eax, ebx
dec edx
dec edi
jne 0x40e46d
mov dword [ebp], eax
add esi, 4
add ebp, 4
dec ecx
jne 0x40e464
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0x44]
mov ebx, dword [esp + 0xd8]
mov esi, ebx
mov ecx, 3
and esi, 3
xor eax, eax
sub ecx, esi
js 0x40e4b3
xor edx, edx
mov dl, byte [esp + ecx + 0x50]
shl eax, 8
xor eax, edx
dec ecx
jns 0x40e4a5
mov edx, dword [esp + 0x34]
lea ecx, [ebx - 1]
cmp ecx, edx
jl 0x40e4d8
mov ebx, dword [esp + 0xd4]
xor edx, edx
shl eax, 8
mov dl, byte [ecx + ebx]
xor eax, edx
mov edx, dword [esp + 0x34]
dec ecx
cmp ecx, edx
jge 0x40e4be
mov ecx, dword [esp + 0x4c]
inc edi
mov dword [ecx + edi*4 - 4], eax
mov eax, 4
sub eax, esi
cmp eax, ebp
jge 0x40e513
lea edi, [ecx + edi*4]
xor ecx, ecx
lea edx, [esp + eax + 0x53]
mov esi, 4
xor ebx, ebx
mov bl, byte [edx]
shl ecx, 8
xor ecx, ebx
dec edx
dec esi
jne 0x40e4fa
mov dword [edi], ecx
add eax, 4
add edi, 4
cmp eax, ebp
jl 0x40e4ef
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x4c]
sar eax, 6
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x10]
mov ebx, 0x67452301
mov edi, 0xefcdab89
mov eax, 0x98badcfe
mov esi, 0x10325476
mov ecx, 0xc3d2e1f0
test edx, edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x34], ecx
jle 0x40eb7f
mov dword [esp + 0x48], edx
jmp 0x40e575
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x3c]
xor ebp, ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], ebx
mov edx, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x10], ebp
mov ecx, ebp
mov ebx, esi
sar ecx, 4
shl ecx, 2
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov cl, byte [ebp + 0x43d5ac]
mov ebp, dword [esp + 0x20]
xor ebx, eax
xor ebx, ebp
mov ebp, dword [esp + 0x24]
mov ecx, dword [ebp + ecx*4]
add ecx, ebx
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d6ec]
mov ebx, dword [esp + 0x18]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d64c]
mov ecx, 0x20
sub ecx, ebx
mov dword [esp + 0x18], ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x18]
shl ebp, cl
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], ecx
or ebx, ebp
mov ebp, dword [esp + 0x24]
add ebx, ecx
mov ecx, eax
shr ecx, 0x16
shl eax, 0xa
or ecx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x10]
mov esi, ecx
xor ecx, ecx
mov cl, byte [ebx + 0x43d5fc]
mov ebx, dword [esp + 0x1c]
not ebx
mov ecx, dword [ebp + ecx*4]
or ebx, edx
xor ebx, edi
add ecx, ebx
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d710]
mov ebx, dword [esp + 0x30]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d69c]
mov ecx, 0x20
mov dword [esp + 0x14], ebx
sub ecx, ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x14]
shl ebp, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
or ebx, ebp
mov ebp, dword [esp + 0x10]
add ebx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, edx
shr ecx, 0x16
shl edx, 0xa
or ecx, edx
inc ebp
mov edx, edi
mov dword [esp + 0x1c], ecx
mov edi, ebx
mov dword [esp + 0x10], ebp
cmp ebp, 0x10
jl 0x40e595
xor ecx, ecx
mov dword [esp + 0x10], ecx
add ecx, 0x10
mov ebp, eax
sar ecx, 4
shl ecx, 2
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x20]
mov ebx, ecx
and ebp, ecx
not ebx
and ebx, esi
xor ecx, ecx
or ebx, ebp
mov ebp, dword [esp + 0x10]
mov cl, byte [ebp + 0x43d5bc]
mov ebp, dword [esp + 0x24]
add ebx, dword [ebp + ecx*4]
mov ecx, dword [esp + 0x14]
mov ebp, dword [ecx + 0x43d6ec]
mov ecx, dword [esp + 0x18]
add ebx, ebp
lea ebp, [ebx + ecx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d65c]
mov ecx, 0x20
sub ecx, ebx
mov dword [esp + 0x18], ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x18]
shl ebp, cl
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], ecx
or ebx, ebp
mov ebp, dword [esp + 0x10]
add ebx, ecx
mov ecx, eax
shr ecx, 0x16
shl eax, 0xa
or ecx, eax
mov eax, dword [esp + 0x20]
mov esi, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], ebx
mov ebx, ecx
not ebx
and ebx, edx
and ecx, edi
or ebx, ecx
xor ecx, ecx
mov cl, byte [ebp + 0x43d60c]
mov ebp, dword [esp + 0x24]
add ebx, dword [ebp + ecx*4]
mov ecx, dword [esp + 0x14]
mov ebp, dword [ecx + 0x43d710]
mov ecx, dword [esp + 0x30]
add ebx, ebp
lea ebp, [ebx + ecx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d6ac]
mov ecx, 0x20
mov dword [esp + 0x14], ebx
sub ecx, ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x14]
shl ebp, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
or ebx, ebp
add ebx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, edx
shr ecx, 0x16
shl edx, 0xa
or ecx, edx
mov edx, edi
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x10]
mov edi, ebx
inc ecx
mov dword [esp + 0x10], ecx
lea ebx, [ecx + 0x10]
cmp ebx, 0x20
jl 0x40e6a7
xor ebp, ebp
mov dword [esp + 0x10], ebp
lea ecx, [ebp + 0x20]
mov ebx, eax
sar ecx, 4
shl ecx, 2
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov cl, byte [ebp + 0x43d5cc]
mov ebp, dword [esp + 0x20]
not ebx
or ebx, ebp
mov ebp, dword [esp + 0x24]
xor ebx, esi
mov ecx, dword [ebp + ecx*4]
add ecx, ebx
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d6ec]
mov ebx, dword [esp + 0x18]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d66c]
mov ecx, 0x20
sub ecx, ebx
mov dword [esp + 0x18], ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x18]
shl ebp, cl
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], ecx
or ebx, ebp
mov ebp, dword [esp + 0x1c]
add ebx, ecx
mov ecx, eax
shr ecx, 0x16
shl eax, 0xa
or ecx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x10]
mov esi, ecx
xor ecx, ecx
mov cl, byte [ebx + 0x43d61c]
mov ebx, edx
not ebx
or ebx, edi
xor ebx, ebp
mov ebp, dword [esp + 0x24]
mov ecx, dword [ebp + ecx*4]
add ecx, ebx
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d710]
mov ebx, dword [esp + 0x30]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d6bc]
mov ecx, 0x20
mov dword [esp + 0x14], ebx
sub ecx, ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x14]
shl ebp, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
or ebx, ebp
mov ebp, dword [esp + 0x10]
add ebx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, edx
shr ecx, 0x16
shl edx, 0xa
or ecx, edx
mov edx, edi
mov dword [esp + 0x1c], ecx
mov edi, ebx
inc ebp
mov dword [esp + 0x10], ebp
lea ecx, [ebp + 0x20]
cmp ecx, 0x30
jl 0x40e7c7
xor ecx, ecx
mov dword [esp + 0x10], ecx
add ecx, 0x30
mov ebp, dword [esp + 0x20]
sar ecx, 4
shl ecx, 2
mov dword [esp + 0x14], ecx
mov ecx, esi
not ecx
mov ebx, esi
and ecx, eax
and ebx, ebp
mov ebp, dword [esp + 0x10]
or ecx, ebx
xor ebx, ebx
mov bl, byte [ebp + 0x43d5dc]
mov ebp, dword [esp + 0x24]
add ecx, dword [ebp + ebx*4]
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d6ec]
mov ebx, dword [esp + 0x18]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d67c]
mov ecx, 0x20
sub ecx, ebx
mov dword [esp + 0x18], ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x18]
shl ebp, cl
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], ecx
or ebx, ebp
mov ebp, dword [esp + 0x10]
add ebx, ecx
mov ecx, eax
shr ecx, 0x16
shl eax, 0xa
or ecx, eax
mov eax, dword [esp + 0x20]
mov esi, ecx
mov ecx, edi
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x1c]
not ecx
and ecx, ebx
mov ebx, edx
and ebx, edi
or ecx, ebx
xor ebx, ebx
mov bl, byte [ebp + 0x43d62c]
mov ebp, dword [esp + 0x24]
add ecx, dword [ebp + ebx*4]
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d710]
mov ebx, dword [esp + 0x30]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d6cc]
mov ecx, 0x20
mov dword [esp + 0x14], ebx
sub ecx, ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x14]
shl ebp, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
or ebx, ebp
add ebx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, edx
shr ecx, 0x16
shl edx, 0xa
or ecx, edx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x10]
mov edx, edi
inc ecx
mov edi, ebx
mov dword [esp + 0x10], ecx
lea ebx, [ecx + 0x30]
cmp ebx, 0x40
jl 0x40e8e1
xor ebp, ebp
mov dword [esp + 0x10], ebp
lea ecx, [ebp + 0x40]
mov ebx, esi
sar ecx, 4
shl ecx, 2
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov cl, byte [ebp + 0x43d5ec]
mov ebp, dword [esp + 0x20]
not ebx
or ebx, eax
xor ebx, ebp
mov ebp, dword [esp + 0x24]
mov ecx, dword [ebp + ecx*4]
add ecx, ebx
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d6ec]
mov ebx, dword [esp + 0x18]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d68c]
mov ecx, 0x20
sub ecx, ebx
mov dword [esp + 0x18], ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x18]
shl ebp, cl
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], esi
mov dword [esp + 0x18], ecx
or ebx, ebp
mov ebp, dword [esp + 0x24]
add ebx, ecx
mov ecx, eax
shr ecx, 0x16
shl eax, 0xa
or ecx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x10]
mov esi, ecx
xor ecx, ecx
mov cl, byte [ebx + 0x43d63c]
mov ebx, dword [esp + 0x1c]
xor ebx, edx
mov ecx, dword [ebp + ecx*4]
xor ebx, edi
add ecx, ebx
mov ebx, dword [esp + 0x14]
mov ebp, dword [ebx + 0x43d710]
mov ebx, dword [esp + 0x30]
add ecx, ebp
lea ebp, [ecx + ebx]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov bl, byte [ecx + 0x43d6dc]
mov ecx, 0x20
mov dword [esp + 0x14], ebx
sub ecx, ebx
mov ebx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x14]
shl ebp, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
or ebx, ebp
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x2c], ebp
mov ebp, edx
shr ebp, 0x16
shl edx, 0xa
or ebp, edx
add ebx, ecx
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x10]
inc ebp
mov edx, edi
mov edi, ebx
mov dword [esp + 0x10], ebp
lea ebx, [ebp + 0x40]
cmp ebx, 0x50
jl 0x40ea03
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x3c]
add eax, ebx
mov ebx, dword [esp + 0x38]
add eax, ebx
mov ebx, dword [esp + 0x2c]
add ebx, esi
mov esi, dword [esp + 0x40]
add ebx, esi
mov esi, dword [esp + 0x28]
add ecx, esi
mov esi, dword [esp + 0x44]
add ecx, ebp
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x18]
add edi, ecx
mov ecx, dword [esp + 0x20]
add edi, ebx
add edx, ecx
mov ecx, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [esp + 0x48]
add edx, esi
add ecx, 0x40
dec eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x34], edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x48], eax
jne 0x40e565
mov edx, dword [esp + 0x4c]
push edx
call dword [sym.imp.MSVCRT.dll_free]
mov ecx, dword [esp + 0xe0]
add esp, 4
xor eax, eax
mov byte [eax + ecx], bl
shr ebx, 8
inc eax
cmp eax, 4
jl 0x40eb96
mov esi, 4
mov edx, dword [esp + 0x38]
mov byte [eax + ecx], dl
shr edx, 8
inc eax
dec esi
mov dword [esp + 0x38], edx
jne 0x40eba7
mov esi, 4
mov edx, dword [esp + 0x40]
mov byte [eax + ecx], dl
shr edx, 8
inc eax
dec esi
mov dword [esp + 0x40], edx
jne 0x40ebbe
mov esi, 4
mov edx, dword [esp + 0x3c]
mov byte [eax + ecx], dl
shr edx, 8
inc eax
dec esi
mov dword [esp + 0x3c], edx
jne 0x40ebd5
pop edi
add eax, ecx
mov edx, 4
pop esi
mov ecx, dword [esp + 0x2c]
mov byte [eax], cl
shr ecx, 8
inc eax
dec edx
mov dword [esp + 0x2c], ecx
jne 0x40ebf0
pop ebp
mov eax, 1
pop ebx
add esp, 0xc0
ret