Function at 0x404000
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
xor ebp, ebp
xor ebx, ebx
push edi
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 9
mov dword [esp + 0x20], 0x100
xor eax, eax
mov ecx, 0x5f1200
mov edx, 0x5ed200
nop
mov byte [ecx], al
mov esi, 0x100
mov word [edx], si
inc eax
inc ecx
add edx, 2
cmp ax, si
jb 0x404030
mov eax, 0x2000
movzx edx, ax
mov eax, edx
shl edx, 0x10
mov ecx, 0xf7f
mov edi, 0x5ed402
or eax, edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x14], 1
lea esp, [esp]
mov ecx, dword [0x5ed1f4]
mov edi, dword [0x5ed1ec]
cmp ecx, dword [0x5ed1f0]
jae 0x404093
mov al, byte [ecx + 0x5ed1f8]
inc ecx
mov dword [0x5ed1f4], ecx
jmp 0x4040de
cmp edi, 8
jae 0x4040a2
mov esi, edi
test esi, esi
jne 0x4040a7
xor al, al
jmp 0x4040de
mov esi, 8
mov eax, dword [0x5ed1dc]
push esi
push eax
sub edi, esi
push 0x5ed1f8
mov dword [0x5ed1ec], edi
mov dword [0x5ed1f4], 1
mov dword [0x5ed1f0], esi
call fcn.0040cb60
mov al, byte [0x5ed1f8]
add esp, 0xc
add dword [0x5ed1dc], esi
movzx eax, al
cmp eax, 0xffffffff
je 0x404106
mov ecx, ebp
shl eax, cl
add ebp, 8
mov dword [esp + 0x14], 0
or ebx, eax
cmp ebp, 0x18
jle 0x404070
mov edi, dword [0x5ed1ec]
mov eax, ebx
and eax, 0x1ff
shr ebx, 9
sub ebp, 9
cmp dword [esp + 0x14], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], ebx
jne 0x404150
not al
movzx ecx, al
mov eax, dword [ecx*4 + 0x5f5240]
xor eax, 0xffffff
mov dword [esp + 0x18], eax
jmp 0x404150
mov edi, dword [0x5ed1ec]
mov ebx, dword [esp + 0x10]
lea ebx, [ebx]
cmp dword [esp + 0x1c], ebp
jle 0x4041ff
cmp ebp, 0x18
mov dword [esp + 0x14], 1
jg 0x4041ff
jmp 0x404170
mov ecx, dword [0x5ed1f4]
cmp ecx, dword [0x5ed1f0]
jae 0x40418d
mov al, byte [ecx + 0x5ed1f8]
inc ecx
mov dword [0x5ed1f4], ecx
jmp 0x4041d3
cmp edi, 8
jae 0x40419c
mov esi, edi
test esi, esi
jne 0x4041a1
xor al, al
jmp 0x4041d3
mov esi, 8
mov edx, dword [0x5ed1dc]
push esi
push edx
push 0x5ed1f8
sub edi, esi
mov dword [0x5ed1f4], 1
mov dword [0x5ed1f0], esi
call fcn.0040cb60
mov al, byte [0x5ed1f8]
add esp, 0xc
add dword [0x5ed1dc], esi
movzx eax, al
cmp eax, 0xffffffff
je 0x4041f5
mov ecx, ebp
shl eax, cl
add ebp, 8
mov dword [esp + 0x14], 0
or ebx, eax
cmp ebp, 0x18
jle 0x404170
mov dword [0x5ed1ec], edi
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x1c]
movzx ebx, word [eax*2 + 0x416ca8]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov ecx, ebx
and ecx, eax
movzx edi, cx
mov ecx, edx
shr eax, cl
sub ebp, edx
cmp dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
jne 0x404320
mov eax, 0x100
cmp di, ax
jne 0x4043b2
cmp edx, ebp
jle 0x4042f7
cmp ebp, 0x18
mov dword [esp + 0x14], 1
jg 0x4042f7
jmp 0x404260
mov ecx, dword [0x5ed1f4]
cmp ecx, dword [0x5ed1f0]
jae 0x40427d
mov al, byte [ecx + 0x5ed1f8]
inc ecx
mov dword [0x5ed1f4], ecx
jmp 0x4042d3
mov eax, dword [0x5ed1ec]
cmp eax, 8
jae 0x404291
mov esi, eax
test esi, esi
jne 0x404296
xor al, al
jmp 0x4042d3
mov esi, 8
mov edi, dword [0x5ed1dc]
push esi
sub eax, esi
push edi
push 0x5ed1f8
mov dword [0x5ed1ec], eax
mov dword [0x5ed1f4], 1
mov dword [0x5ed1f0], esi
call fcn.0040cb60
mov al, byte [0x5ed1f8]
mov edx, dword [esp + 0x28]
add esp, 0xc
add edi, esi
mov dword [0x5ed1dc], edi
movzx eax, al
cmp eax, 0xffffffff
je 0x4042f7
mov ecx, ebp
shl eax, cl
add ebp, 8
mov dword [esp + 0x14], 0
or dword [esp + 0x10], eax
cmp ebp, 0x18
jle 0x404260
mov esi, dword [esp + 0x10]
and ebx, esi
mov ecx, edx
shr esi, cl
movzx eax, bx
sub ebp, edx
mov dword [esp + 0x10], esi
cmp ax, 1
jne 0x40432c
inc edx
mov dword [esp + 0x1c], edx
cmp dword [esp + 0x14], 0
je 0x404140
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
cmp ax, 2
jne 0x404315
mov ecx, 0x5ed402
mov edx, 0x1eff
lea esp, [esp]
mov ax, word [ecx]
mov esi, 0x1fff
and ax, si
movzx eax, ax
mov esi, 0x100
cmp ax, si
jbe 0x404372
mov esi, 0x2000
cmp ax, si
je 0x404372
movzx eax, ax
mov esi, 0x4000
or word [eax*2 + 0x5ed200], si
add ecx, 2
sub edx, 1
jne 0x404340
mov ecx, 0x5ed402
mov edx, 0x1eff
movzx eax, word [ecx]
test eax, 0x4000
je 0x404395
and eax, 0xbfff
jmp 0x40439a
mov eax, 0x2000
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x404384
mov dword [esp + 0x20], 0x100
jmp 0x404315
movzx edx, di
mov esi, 0x2000
mov eax, 0x5f51ff
movzx ecx, di
cmp word [edx*2 + 0x5ed200], si
jne 0x4043dd
movzx ecx, word [esp + 0x24]
mov esi, 1
mov eax, 0x5f51fe
jmp 0x4043e0
xor esi, esi
nop
movzx ecx, cx
mov dl, byte [ecx + 0x5f1200]
mov byte [eax], dl
mov cx, word [ecx*2 + 0x5ed200]
mov edx, 0x1fff
and cx, dx
movzx ecx, cx
mov edx, 0x100
dec eax
cmp cx, dx
jne 0x4043e0
mov edx, 0x5f51ff
sub edx, eax
inc eax
test esi, esi
je 0x40441d
mov cl, byte [eax]
mov byte [0x5f51ff], cl
lea esi, [edx + eax]
mov ecx, eax
cmp eax, esi
jae 0x404447
movzx ebx, byte [esp + 0x18]
movzx edx, byte [ecx]
xor edx, ebx
mov ebx, dword [esp + 0x18]
shr ebx, 8
xor ebx, dword [edx*4 + 0x5f5240]
inc ecx
mov dword [esp + 0x18], ebx
cmp ecx, esi
jb 0x404426
mov ecx, dword [esp + 0x20]
inc ecx
movzx ecx, cx
movzx edx, cx
mov esi, 0x2000
cmp word [edx*2 + 0x5ed200], si
je 0x404474
inc ecx
movzx edx, cx
mov esi, 0x2000
cmp word [edx*2 + 0x5ed200], si
jne 0x404461
mov al, byte [eax]
movzx edx, cx
movzx ecx, cx
mov byte [ecx + 0x5f1200], al
movzx eax, di
mov dword [esp + 0x20], edx
mov dx, word [esp + 0x24]
mov word [ecx*2 + 0x5ed200], dx
mov dword [esp + 0x24], eax
jmp 0x404140