Function at 0x404a58
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
cmp byte [0x46b0a0], 0xe9
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
je 0x404a74
xor eax, eax
jmp 0x404dbc
xor ecx, ecx
xor edx, edx
mov cl, byte [0x46b0a2]
mov dl, byte [0x46b0a1]
shl ecx, 8
lea eax, [ebp - 0x48]
add edx, ecx
mov dword [ebp - 0xc], eax
mov dword [0x46b1c4], edx
add dword [0x46b1c4], 3
xor ebx, ebx
mov edx, dword [ebp - 0xc]
mov ecx, dword [0x46b1c4]
mov dword [edx], ecx
push 0
mov eax, dword [0x46b1c4]
push eax
push esi
call fcn.0042e350
add esp, 0xc
push esi
push 0xa
push 1
lea edx, [ebp - 0x20]
push edx
call fcn.0042e2b0
movsx eax, bx
mov di, 0xfffe
add esp, 0x10
mov word [ebp - 2], 0
cmp eax, 8
ja case.0x404ae1.0
jmp dword [eax*4 + 0x404ae8]
push 0
push 0x16
lea edx, [ebp - 0x20]
push edx
call fcn.00404a14
add esp, 0xc
mov edi, eax
cmp ax, 0xffff
jne 0x404b43
push 0
push 0xe
lea edx, [ebp - 0x20]
push edx
call fcn.00404a14
add esp, 0xc
mov edi, eax
cmp ax, 0xffff
jne 0x404b43
xor eax, eax
jmp 0x404dbc
inc word [ebp - 2]
jmp case.0x404ae1.0
push 0
push 0x1f
lea edx, [ebp - 0x20]
push edx
call fcn.00404a14
add esp, 0xc
mov edi, eax
cmp di, 0xffff
sete cl
and ecx, 1
test cl, cl
je 0x404b73
xor eax, eax
jmp 0x404dbc
inc word [ebp - 2]
jmp case.0x404ae1.0
push 1
push 0xb8
lea edx, [ebp - 0x20]
push edx
call fcn.00404a14
add esp, 0xc
mov edi, eax
cmp di, 0xffff
sete cl
and ecx, 1
test cl, cl
je 0x404ba6
xor eax, eax
jmp 0x404dbc
movsx eax, di
lea edx, [ebp - 0x1f]
add eax, edx
mov cx, word [eax]
mov word [ebp - 4], cx
mov word [ebp - 2], 3
jmp case.0x404ae1.0
push 1
push 0xb8
lea eax, [ebp - 0x20]
push eax
call fcn.00404a14
add esp, 0xc
mov edi, eax
cmp di, 0xffff
sete dl
and edx, 1
test dl, dl
je 0x404bea
xor eax, eax
jmp 0x404dbc
movsx eax, di
lea edx, [ebp - 0x1f]
add eax, edx
mov cx, word [eax]
mov word [ebp - 6], cx
mov word [ebp - 2], 3
jmp case.0x404ae1.0
push 0
push 0x81
lea eax, [ebp - 0x20]
push eax
call fcn.00404a14
add esp, 0xc
mov edi, eax
cmp di, 0xffff
sete dl
and edx, 1
test dl, dl
je 0x404c2b
xor eax, eax
jmp 0x404dbc
movsx eax, di
lea edx, [ebp - 0x1e]
add eax, edx
mov cx, word [eax]
mov word [ebp - 8], cx
mov word [ebp - 2], 4
jmp case.0x404ae1.0
push 0
push 0x81
lea eax, [ebp - 0x20]
push eax
call fcn.00404a14
add esp, 0xc
mov edi, eax
cmp di, 0xffff
sete dl
and edx, 1
test dl, dl
je 0x404c6c
xor eax, eax
jmp 0x404dbc
mov word [ebp - 2], 4
mov dx, word [ebp - 2]
lea ecx, [ebp - 0x20]
push edx
push edi
push ecx
mov eax, dword [0x46b1c4]
push eax
call fcn.004049ac
add esp, 0x10
mov dword [0x46b1c4], eax
cmp dword [0x46b1c4], 0xffffffff
sete dl
and edx, 1
test dl, dl
je 0x404ca7
xor eax, eax
jmp 0x404dbc
inc ebx
add dword [ebp - 0xc], 4
cmp bx, 0xa
jl 0x404a9e
push 1
push esi
push 0xe
call fcn.00401410
add esp, 0xc
dec eax
je 0x404ccd
xor eax, eax
jmp 0x404dbc
movzx eax, word [ebp - 4]
add eax, 0xffffff00
push 0
push eax
push esi
mov dword [0x46b1c4], eax
call fcn.0042e350
add esp, 0xc
push 0xc8
call fcn.0042b7bc
pop ecx
mov edi, eax
push esi
push 0xc8
push 1
push edi
call fcn.0042e2b0
add esp, 0x10
xor ebx, ebx
movsx eax, bx
add eax, edi
mov dx, word [ebp - 6]
xor word [eax], dx
mov cx, word [ebp - 8]
add word [ebp - 6], cx
inc ebx
cmp bx, 0xc8
jl 0x404d07
push 0
push 0
push esi
call fcn.0042e350
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 0x10], 0x46b0a0
lea eax, [edi + 0x10]
mov dl, byte [eax]
mov ecx, dword [ebp - 0x10]
mov byte [ecx], dl
inc ebx
inc dword [ebp - 0x10]
inc eax
cmp bx, 3
jl 0x404d3c
push esi
push 3
push 1
push 0x46b0a0
call fcn.0042e540
add esp, 0x10
lea eax, [ebp - 0x48]
mov dword [ebp - 0x14], eax
xor ebx, ebx
push 0
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx]
push ecx
push esi
call fcn.0042e350
movsx eax, bx
mov edx, eax
add esp, 0xc
add edx, edx
push esi
push 0xa
push 1
lea edx, [edx + edx*4]
add edx, edi
add edx, 0x40
push edx
call fcn.0042e540
add esp, 0x10
inc ebx
add dword [ebp - 0x14], 4
cmp bx, 0xa
jl 0x404d68
push edi
call fcn.0042b7cc
pop ecx
push esi
call fcn.00418690
pop ecx
inc eax
jne 0x404db7
or eax, 0xffffffff
jmp 0x404dbc
mov eax, 0xe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret