Function at 0x404a40
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x17f0
call fcn.0045d1f0
mov eax, dword [0x492794]
xor eax, esp
mov dword [esp + 0x17ec], eax
mov eax, dword [esp + 0x17f8]
push esi
mov esi, dword [esp + 0x17f8]
push edi
xor edi, edi
push 0x49ad7c
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], edi
call fcn.00401040
add esp, 4
push edi
push 0x8000000
push 3
push edi
push edi
push 0x80000000
push esi
call dword [0x47f088]
mov esi, eax
cmp esi, 0xffffffff
jne 0x404aa3
or esi, eax
jmp 0x404ce8
push ebx
push 0xb71b00
call fcn.0045d4bf
mov ebx, eax
add esp, 4
cmp ebx, edi
mov dword [esp + 0x24], ebx
jne 0x404ad0
push str.BMPDecode_Error
call fcn.00408d80
add esp, 4
or esi, 0xffffffff
jmp 0x404ce7
push ebp
push edi
push esi
call dword [0x47f0b4]
push edi
push edi
push edi
push esi
mov ebp, eax
call dword [0x47f0b0]
push 0
lea ecx, [esp + 0x18]
push ecx
push ebp
mov ebp, dword [0x47f0ac]
push ebx
push esi
call ebp
add dword [esp + 0x14], 1
push 2
push 0
push 0xffffffffffffffff
push esi
call dword [0x47f0b0]
push 0
lea edx, [esp + 0x24]
push edx
push 1
lea eax, [esp + 0x1f]
push eax
push esi
call ebp
push esi
call dword [0x47f084]
mov ecx, dword [str.EAGLS_SYSTEM]
mov edx, dword [0x4807b8]
mov eax, dword [0x4807bc]
push 0x73
mov dword [esp + 0x38], edx
mov dword [esp + 0x34], ecx
mov cl, byte [0x4807c0]
lea edx, [esp + 0x41]
push 0
push edx
mov dword [esp + 0x44], eax
mov byte [esp + 0x48], cl
call fcn.0045d240
lea eax, [esp + 0x3c]
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404b60
sub eax, esi
push 0x174b
mov ebp, eax
lea eax, [esp + 0xb4]
push ebx
push eax
call fcn.004014b0
movzx ecx, byte [esp + 0x1f]
push ecx
push 0x41eab0
push 0x41e8c0
call fcn.0041eb00
add esp, 0x18
xor esi, esi
lea ebx, [ebx]
call fcn.0041eb20
cdq
idiv ebp
add esi, 1
mov dl, byte [esp + edx + 0x30]
xor byte [esp + esi + 0xaf], dl
cmp esi, 0x174b
jl 0x404ba0
push 0x174b
lea eax, [esp + 0xb4]
push eax
push ebx
call fcn.004014b0
sub dword [esp + 0x20], 1
mov esi, 0xfee
push esi
lea ecx, [esp + 0xc0]
push 0
push ecx
mov dword [esp + 0x34], edi
call fcn.0045d240
add esp, 0x18
mov dword [esp + 0x20], esi
jmp 0x404c00
mov eax, dword [esp + 0x1c]
shr eax, 1
test eax, 0x100
mov dword [esp + 0x1c], eax
jne 0x404c21
movzx eax, byte [ebx + edi]
add edi, 1
or eax, 0xff00
mov dword [esp + 0x1c], eax
test byte [esp + 0x1c], 1
je 0x404c56
movzx eax, byte [ebx + edi]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov byte [esp + esi + 0xb0], al
mov byte [edx + ecx], al
add ecx, 1
add esi, 1
add edi, 1
mov dword [esp + 0x18], ecx
and esi, 0xfff
jmp 0x404ccf
movzx ebp, byte [ebx + edi]
add edi, 1
mov dword [esp + 0x20], ebp
movzx eax, byte [ebx + edi]
mov ecx, eax
and ecx, 0xf0
shl ecx, 4
or ebp, ecx
and eax, 0xf
add edi, 1
add eax, 2
mov dword [esp + 0x20], ebp
mov dword [esp + 0x2c], eax
mov ecx, 0
js 0x404ccf
lea ebx, [ebx]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
lea edx, [ecx + ebp]
and edx, 0xfff
mov dl, byte [esp + edx + 0xb0]
mov byte [esp + esi + 0xb0], dl
add esi, 1
mov byte [ebx + eax], dl
add eax, 1
add ecx, 1
and esi, 0xfff
cmp ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
jle 0x404c90
mov ebx, dword [esp + 0x28]
cmp edi, dword [esp + 0x14]
jl 0x404c00
push ebx
call fcn.0045d3e2
mov esi, dword [esp + 0x1c]
add esp, 4
pop ebp
pop ebx
push 0x49ad7c
call fcn.00401060
mov ecx, dword [esp + 0x17f8]
add esp, 4
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.0045d1d4
add esp, 0x17f0
ret