Function at 0x439060
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
push edi
mov al, byte [ebp + 8]
mov edi, dword [ebp]
mov dword [esp + 0x18], edi
test al, al
jne 0x43931c
mov esi, dword [esp + 0x44]
test esi, esi
je 0x43908b
movzx ecx, word [esi + 8]
jmp 0x43908d
xor ecx, ecx
mov al, byte [ebp + 9]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x14], ecx
cmp al, 8
jae 0x43920d
movzx eax, al
sub eax, 1
je 0x4391aa
sub eax, 1
je 0x439148
sub eax, 2
jne 0x439134
and ecx, 0xf
mov ebx, 4
mov eax, ecx
shl ecx, 4
add ecx, eax
lea eax, [edi - 1]
mov esi, eax
mov dword [esp + 0x14], ecx
and eax, 1
shr esi, 1
shl eax, 2
lea ecx, [edx - 1]
add esi, edx
add ecx, edi
sub ebx, eax
test edi, edi
je 0x439130
mov ebp, ecx
nop dword [eax]
mov dl, byte [esi]
lea ebp, [ebp - 1]
mov cl, bl
shr dl, cl
mov ecx, 4
mov al, dl
shl dl, 4
and al, 0xf
xor al, dl
cmp ebx, 4
mov byte [ebp + 1], al
lea eax, [esi - 1]
cmovne eax, esi
mov esi, eax
xor eax, eax
cmp ebx, 4
cmovne eax, ecx
mov ebx, eax
sub edi, 1
jne 0x4390f0
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
lea ebx, [ebp + 0xb]
mov byte [ebp + 9], 8
mov byte [ebx], 8
mov al, 8
mov dword [ebp + 4], edi
jmp 0x439210
lea eax, [edi - 1]
and ecx, 3
mov esi, eax
imul ecx, ecx, 0x55
and eax, 3
shr esi, 2
mov ebx, 3
lea ebp, [edx - 1]
sub ebx, eax
add esi, edx
add ebp, edi
add ebx, ebx
mov dword [esp + 0x14], ecx
test edi, edi
je 0x439204
mov dl, byte [esi]
mov cl, bl
shr dl, cl
and dl, 3
mov al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
mov byte [ebp], al
cmp ebx, 6
jne 0x43919c
xor ebx, ebx
dec esi
jmp 0x43919f
add ebx, 2
dec ebp
sub edi, 1
jne 0x439175
jmp 0x439124
lea eax, [edi - 1]
and ecx, 1
mov esi, eax
imul ecx, ecx, 0xff
shr esi, 3
lea ebx, [edx - 1]
add esi, edx
and eax, 7
mov edx, 7
add ebx, edi
sub edx, eax
mov dword [esp + 0x14], ecx
test edi, edi
je 0x43912c
mov ebp, edi
nop word [eax + eax]
mov al, byte [esi]
mov cl, dl
shr al, cl
and al, 1
neg al
sbb al, al
mov byte [ebx], al
cmp edx, 7
jne 0x4391f8
xor edx, edx
dec esi
jmp 0x4391f9
inc edx
dec ebx
sub ebp, 1
jne 0x4391e0
jmp 0x439128
mov ebp, dword [esp + 0x3c]
jmp 0x439130
lea ebx, [ebp + 0xb]
test esi, esi
je 0x4394ec
cmp al, 8
jne 0x439277
mov esi, dword [esp + 0x40]
dec edx
mov eax, dword [esp + 0x14]
dec esi
movzx eax, al
add edx, edi
mov dword [esp + 0x20], eax
lea esi, [esi + edi*2]
test edi, edi
je 0x439308
mov ebp, edi
nop dword [eax]
movzx eax, byte [edx]
lea esi, [esi - 2]
sub eax, dword [esp + 0x20]
lea edx, [edx - 1]
neg eax
sbb al, al
mov byte [esi + 2], al
mov al, byte [edx + 1]
mov byte [esi + 1], al
sub ebp, 1
jne 0x439240
mov ebp, dword [esp + 0x3c]
mov al, byte [ebp + 9]
add al, al
mov byte [ebp + 8], 4
mov byte [ebp + 0xa], 2
mov byte [ebx], al
jmp 0x4394c8
cmp al, 0x10
jne 0x439308
mov eax, dword [esp + 0x14]
dec edx
mov ecx, eax
movzx esi, al
mov eax, dword [ebp + 4]
add edx, eax
shr ecx, 8
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x24], esi
lea ecx, [ecx + eax*2]
dec ecx
test edi, edi
je 0x439308
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x14], edi
nop dword [eax]
lea eax, [edx - 1]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
movzx eax, byte [eax]
cmp eax, ebp
jne 0x4392cd
movzx eax, byte [edx]
cmp eax, esi
jne 0x4392cd
xor al, al
jmp 0x4392cf
or al, 0xff
mov edi, dword [esp + 0x20]
dec ecx
mov esi, ecx
or ebx, 0xffffffff
mov byte [edi], al
mov byte [ecx], al
lea ecx, [ebx + esi]
mov al, byte [edx]
mov edx, dword [esp + 0x1c]
mov byte [ebx + esi], al
mov esi, dword [esp + 0x24]
mov al, byte [edx]
dec edx
mov byte [ecx - 1], al
sub ecx, 2
sub dword [esp + 0x14], 1
jne 0x4392b0
mov ebp, dword [esp + 0x3c]
mov edi, dword [esp + 0x18]
lea ebx, [ebp + 0xb]
mov al, byte [ebp + 9]
add al, al
mov byte [ebp + 8], 4
mov byte [ebp + 0xa], 2
mov byte [ebx], al
jmp 0x4394c8
cmp al, 2
jne 0x4394ec
mov eax, dword [esp + 0x44]
test eax, eax
je 0x4394ec
mov cl, byte [ebp + 9]
cmp cl, 8
jne 0x4393c9
mov cl, byte [eax + 4]
mov bl, byte [eax + 2]
mov bh, byte [eax + 6]
mov eax, dword [ebp + 4]
mov byte [esp + 0x3c], cl
mov ecx, dword [esp + 0x40]
mov byte [esp + 0x12], bl
mov byte [esp + 0x13], bh
lea edx, [ecx - 1]
lea ecx, [ecx + edi*4]
add edx, eax
dec ecx
test edi, edi
je 0x4394b7
mov ah, byte [esp + 0x3c]
mov dword [esp + 0x18], edi
cmp byte [edx - 2], bl
jne 0x439386
cmp byte [edx - 1], ah
lea esi, [edx - 1]
jne 0x439386
cmp byte [edx], bh
jne 0x439386
xor al, al
jmp 0x43938b
or al, 0xff
lea esi, [edx - 1]
mov byte [ecx], al
mov ebx, ecx
mov al, byte [edx]
mov edx, esi
mov dword [esp + 0x3c], 0xffffffff
mov ecx, dword [esp + 0x3c]
mov byte [ecx + ebx], al
add ecx, ebx
mov al, byte [edx]
mov bl, byte [esp + 0x12]
mov bh, byte [esp + 0x13]
mov byte [ecx - 1], al
mov al, byte [edx - 1]
sub edx, 2
mov byte [ecx - 2], al
sub ecx, 3
sub dword [esp + 0x18], 1
jne 0x439371
jmp 0x4394b7
cmp cl, 0x10
jne 0x4394b7
movzx ecx, word [eax + 2]
mov ebx, ecx
mov dword [esp + 0x24], ecx
movzx ecx, word [eax + 4]
movzx eax, word [eax + 6]
mov dword [esp + 0x1c], ecx
shr ecx, 8
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x2c], eax
shr eax, 8
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 4]
lea edx, [ecx - 1]
lea ecx, [ecx + edi*8]
shr ebx, 8
add edx, eax
mov dword [esp + 0x34], ebx
dec ecx
test edi, edi
je 0x4394b7
mov dword [esp + 0x14], edi
nop dword [eax]
mov dword [esp + 0x30], ecx
cmp byte [edx - 5], bl
jne 0x43945c
mov eax, dword [esp + 0x24]
cmp byte [edx - 4], al
jne 0x43945c
mov eax, dword [esp + 0x20]
cmp byte [edx - 3], al
jne 0x43945c
mov eax, dword [esp + 0x1c]
cmp byte [edx - 2], al
jne 0x43945c
mov eax, dword [esp + 0x28]
lea esi, [edx - 1]
cmp byte [esi], al
jne 0x43945c
mov eax, dword [esp + 0x2c]
cmp byte [edx], al
jne 0x43945c
dec ecx
xor al, al
jmp 0x439462
dec ecx
lea esi, [edx - 1]
or al, 0xff
mov edi, dword [esp + 0x30]
mov ebx, ecx
mov dword [esp + 0x3c], 0xffffffff
mov byte [edi], al
mov byte [ecx], al
mov al, byte [edx]
mov edx, esi
mov ecx, dword [esp + 0x3c]
mov byte [ecx + ebx], al
add ecx, ebx
mov al, byte [edx]
mov ebx, dword [esp + 0x34]
mov byte [ecx - 1], al
mov al, byte [edx - 1]
mov byte [ecx - 2], al
mov al, byte [edx - 2]
mov byte [ecx - 3], al
mov al, byte [edx - 3]
mov byte [ecx - 4], al
mov al, byte [edx - 4]
sub edx, 5
mov byte [ecx - 5], al
sub ecx, 6
sub dword [esp + 0x14], 1
jne 0x439420
mov edi, dword [esp + 0x18]
mov al, byte [ebp + 9]
shl al, 2
mov byte [ebp + 8], 6
mov byte [ebp + 0xa], 4
mov byte [ebp + 0xb], al
movzx ecx, al
cmp al, 8
jb 0x4394e0
shr ecx, 3
imul ecx, edi
pop edi
pop esi
mov dword [ebp + 4], ecx
pop ebp
pop ebx
add esp, 0x28
ret
imul ecx, edi
add ecx, 7
shr ecx, 3
mov dword [ebp + 4], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret