Function at 0x407f9c
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx]
test ecx, ecx
mov dword [esp + 0x24], ecx
je 0x407fc4
sub dword [esp + 0x24], 1
lea ecx, [ebx + ebp]
cmp eax, ecx
jle 0x407eab
mov dword [esp + 0x38], ecx
mov ecx, ebx
sub ecx, ebp
jmp 0x407dab
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xfc
ret
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
add dword [esp + 0x38], ebp
add ebx, ebp
add edi, 1
add ecx, ebp
sub edx, ebx
cmp edx, ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x40], ecx
jbe 0x407dca
mov edx, ebp
mov ebp, dword [esp + 0x24]
mov ecx, eax
sub ecx, ebx
mov eax, 1
shl eax, cl
add ebp, 1
cmp eax, ebp
jbe 0x407e11
mov ebp, dword [esp + 0x14]
or edi, 0xffffffff
sub edi, dword [esp + 0x24]
add eax, edi
cmp ecx, edx
jae 0x407e0d
add ecx, 1
cmp ecx, edx
jae 0x407e0d
mov edi, dword [ebp + 4]
add ebp, 4
add eax, eax
cmp eax, edi
jbe 0x407e0d
add ecx, 1
sub eax, edi
cmp ecx, edx
jb 0x407df8
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x128]
mov eax, dword [eax]
mov edx, 1
shl edx, cl
mov dword [esp + 0x18], edx
add edx, eax
cmp edx, 0x5a0
ja 0x407d8f
test edi, edi
mov ebp, dword [esp + 0x124]
lea ebp, [ebp + eax*8]
mov eax, dword [esp + 0x128]
mov dword [esp + 0x44], ebp
mov dword [esp + edi*4 + 0xd0], ebp
mov dword [eax], edx
je 0x407e92
mov esi, dword [esp + 0x28]
mov dl, byte [esp + 0x10]
mov eax, esi
mov byte [esp + 0x30], cl
mov ecx, dword [esp + 0x40]
mov dword [esp + edi*4 + 0x8c], esi
shr eax, cl
mov ecx, dword [esp + edi*4 + 0xcc]
mov esi, ebp
sub esi, ecx
mov byte [esp + 0x31], dl
mov edx, dword [esp + 0x30]
sar esi, 3
sub esi, eax
mov dword [ecx + eax*8], edx
mov dword [ecx + eax*8 + 4], esi
jmp 0x407e9b
mov eax, dword [esp + 0x120]
mov dword [eax], ebp
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
cmp eax, ecx
jg 0x407da3
mov ecx, dword [esp + 0x12c]
mov ebp, dword [esp + 0x20]
mov dl, al
sub dl, bl
mov byte [esp + 0x31], dl
mov edx, dword [esp + 0x110]
lea ecx, [ecx + edx*4]
cmp ebp, ecx
jb 0x407ed3
mov byte [esp + 0x30], 0xc0
jmp 0x407f19
mov esi, dword [ebp]
mov ecx, dword [esp + 0x114]
cmp esi, ecx
jae 0x407ef1
cmp esi, 0x100
sbb dl, dl
and dl, 0xa0
add dl, 0x60
jmp 0x407f0e
sub esi, ecx
mov ecx, dword [esp + 0x11c]
add esi, esi
add esi, esi
mov dl, byte [esi + ecx]
mov ecx, dword [esp + 0x118]
mov esi, dword [esi + ecx]
add dl, 0x50
add ebp, 4
mov dword [esp + 0x20], ebp
mov byte [esp + 0x30], dl
mov ecx, eax
mov eax, dword [esp + 0x28]
sub ecx, ebx
mov edx, 1
shl edx, cl
mov ecx, ebx
shr eax, cl
cmp eax, dword [esp + 0x18]
jae 0x407f53
mov ecx, dword [esp + 0x44]
lea ecx, [ecx + eax*8]
mov ebp, dword [esp + 0x30]
mov dword [ecx], ebp
lea ebp, [edx*8]
mov dword [ecx + 4], esi
add eax, edx
add ecx, ebp
cmp eax, dword [esp + 0x18]
jb 0x407f39
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x28]
mov eax, 1
shl eax, cl
test edx, eax
je 0x407f6e
xor edx, eax
shr eax, 1
test edx, eax
jne 0x407f66
xor edx, eax
mov eax, 1
mov ecx, ebx
shl eax, cl
mov dword [esp + 0x28], edx
sub eax, 1
and eax, edx
cmp eax, dword [esp + edi*4 + 0x8c]
je 0x407fb1
jmp 0x407f93
sub ebx, dword [esp + 0x10]
mov eax, 1
mov ecx, ebx
shl eax, cl
sub edi, 1
sub eax, 1
and eax, edx
cmp eax, dword [esp + edi*4 + 0x8c]
jne 0x407f93
cmp dword [esp + 0x24], 0
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
jne 0x407d75
add dword [esp + 0x14], 4
add dword [esp + 0x3c], 1
add eax, 1
cmp eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
jle 0x407d63
xor esi, esi
cmp dword [esp + 0x48], esi
je 0x407bfb
invalid
cmp dword [esp + 0x2c], 1