Function at 0x405839
Capabilities:
Encode data using xor

Disassembly:
pop edi
pop esi
ret
mov eax, 0x4a5111
call fcn.004a4c68
sub esp, 0x54
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x20], 0x3d32
cmp dword [ebp - 0x20], 0x3e99
jle 0x40597b
mov dword [ebp - 0x1c], 0x508
cmp dword [ebp - 0x1c], 0x246b
jle 0x40591e
cmp esp, dword [edx - 0x2a]
push ecx
ja 0x405836
shl edx, cl
sub dword [edi], esp
xor esi, esi
mov dword [ebp - 0x14], esi
xor edi, edi
mov dword [ebp - 0x1c], edi
xor ebx, ebx
mov eax, edi
and eax, esi
mov dword [ebp - 0x24], eax
mov esi, eax
xor edi, edi
mov eax, esi
xor eax, edi
xor eax, ebx
cdq
push edx
push eax
mov ecx, 0xaa47f8
call fcn.00424b0a
inc edi
cmp edi, 0x4e02
jl 0x405935
inc ebx
cmp ebx, 0x2f2d
jl 0x405933
mov edi, dword [ebp - 0x1c]
inc edi
mov dword [ebp - 0x1c], edi
cmp edi, 0x23b8
mov esi, dword [ebp - 0x14]
jl 0x405928
inc esi
mov dword [ebp - 0x14], esi
cmp esi, 0x4e6
jl 0x405923
mov ebx, dword [ebp - 0x18]
and dword [ebp - 4], 0
cmp dword [ebp - 0x20], 0x3a71
jge 0x405997
mov edx, 0xa9bb0c
mov ecx, 0xaa47f8
call fcn.0042634a
or dword [ebp - 4], 0xffffffff
jmp 0x4059be
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x14], eax
xor edi, edi
mov ecx, eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x1c], edi
cmp edi, ecx
jae 0x405db3
cmp dword [ebx + 0x10], edi
ja 0x4059e5
push 0xa9b934
call fcn.00475ee8
cmp dword [ebx + 0x14], 8
jb 0x4059ef
mov eax, dword [ebx]
jmp 0x4059f1
mov eax, ebx
movzx edx, word [eax + edi*2]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x20], 0x2182
mov dword [ebp - 0x24], 0x597
cmp dword [ebp - 0x24], 0x1452
jle 0x405b03
mov esi, 0xb1206850
add byte [eax], al
cmp dword [ebp - 0x20], 0x22cb
jle 0x405c68
mov dword [ebp - 0x24], 0x55f
cmp dword [ebp - 0x24], 0x2600
add byte [ecx + 0x2600dc7d], al
add byte [eax], al
jle 0x405c0f
push ebx
pcmpgtw mm4, qword [edi]
movsd dword es:[edi], dword [esi]
adc dword [ebx + 0x1c81415d], ebp
jge 0x405b16
invalid
xor ebx, ebx
xor esi, esi
xor edi, edi
lea eax, [esi + ebx]
mov ecx, edi
shl eax, cl
cdq
push edx
push eax
lea ecx, [ebp - 0x48]
call fcn.0040542d
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x405c31
mov eax, dword [eax]
push eax
call fcn.00478bc8
pop ecx
push 0
push 1
lea ecx, [ebp - 0x48]
call fcn.004032b2
inc edi
cmp edi, 0x1ad2
jl 0x405c15
inc esi
cmp esi, 0x1c53
jl 0x405c13
inc ebx
cmp ebx, 0x2ec2
jl 0x405c11
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
lea eax, [edi + 0x7229]
movzx ecx, ax
mov eax, ecx
and eax, edx
add eax, eax
sub ecx, eax
add ecx, edx
movzx esi, cx
movzx eax, dx
add eax, edi
xor edx, edx
push 0x19
pop ecx
div ecx
mov ecx, edx
shl esi, cl
mov eax, dword [ebp - 0x14]
add eax, esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 2
mov dword [ebp - 0x2c], 0x2c3
cmp dword [ebp - 0x2c], 0x2554
jle 0x405d63
clc
pop ss
or eax, 0xbbbed35e
or byte [ecx], cl
iretd
cmp dword [ebp - 0x20], 0x2013
jge 0x405d7a
push 0xa9bb48
call fcn.00478bc8
pop ecx
mov eax, dword [ebp - 0x14]
or dword [ebp - 4], 0xffffffff
jmp 0x405daa
inc edi
mov ecx, dword [ebp - 0x30]
jmp 0x4059cb
mov dword [ebp - 0x30], 0x17e1
cmp dword [ebp - 0x30], 0x1b1d
jle 0x405e18
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0x20], 0x6b9f
xor edi, edi
mov eax, ebx
and eax, edi
cdq
push edx
push eax
lea ecx, [ebp - 0x60]
call fcn.0040542d
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x405de9
mov eax, dword [eax]
push eax
call fcn.00478bc8
pop ecx
push 0
push 1
lea ecx, [ebp - 0x60]
call fcn.004032b2
inc edi
cmp edi, 0x2f31
jl 0x405dd0
add ebx, esi
dec dword [ebp - 0x20]
jne 0x405dce
inc esi
cmp esi, 0x2b9f
jl 0x405dc5
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret