Function at 0x404850
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x17f0
call fcn.004541d0
mov eax, dword [0x4874c8]
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 0x48fa9c
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 [0x4761dc]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4048b3
or esi, eax
jmp 0x404af8
push ebx
push 0x989680
call fcn.004544a0
mov ebx, eax
add esp, 4
cmp ebx, edi
mov dword [esp + 0x24], ebx
jne 0x4048e0
push str.BMPDecode_Error
call fcn.004087e0
add esp, 4
or esi, 0xffffffff
jmp 0x404af7
push ebp
push edi
push esi
call dword [0x47607c]
push edi
push edi
push edi
push esi
mov ebp, eax
call dword [0x476078]
push 0
lea ecx, [esp + 0x18]
push ecx
push ebp
mov ebp, dword [0x476074]
push ebx
push esi
call ebp
add dword [esp + 0x14], 1
push 2
push 0
push 0xffffffffffffffff
push esi
call dword [0x476078]
push 0
lea edx, [esp + 0x24]
push edx
push 1
lea eax, [esp + 0x1f]
push eax
push esi
call ebp
push esi
call dword [0x4761e0]
mov ecx, dword [str.EAGLS_SYSTEM]
mov edx, dword [0x477750]
mov eax, dword [0x477754]
push 0x73
mov dword [esp + 0x38], edx
mov dword [esp + 0x34], ecx
mov cl, byte [0x477758]
lea edx, [esp + 0x41]
push 0
push edx
mov dword [esp + 0x44], eax
mov byte [esp + 0x48], cl
call fcn.00454220
lea eax, [esp + 0x3c]
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404970
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 0x41d510
push 0x41d320
call fcn.0041d560
add esp, 0x18
xor esi, esi
lea ebx, [ebx]
call fcn.0041d580
cdq
idiv ebp
add esi, 1
mov dl, byte [esp + edx + 0x30]
xor byte [esp + esi + 0xaf], dl
cmp esi, 0x174b
jl 0x4049b0
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.00454220
add esp, 0x18
mov dword [esp + 0x20], esi
jmp 0x404a10
mov eax, dword [esp + 0x1c]
shr eax, 1
test eax, 0x100
mov dword [esp + 0x1c], eax
jne 0x404a31
movzx eax, byte [ebx + edi]
add edi, 1
or eax, 0xff00
mov dword [esp + 0x1c], eax
test byte [esp + 0x1c], 1
je 0x404a66
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 0x404adf
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 0x404adf
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 0x404aa0
mov ebx, dword [esp + 0x28]
cmp edi, dword [esp + 0x14]
jl 0x404a10
push ebx
call fcn.004543c3
mov esi, dword [esp + 0x1c]
add esp, 4
pop ebp
pop ebx
push 0x48fa9c
call fcn.00401060
mov ecx, dword [esp + 0x17f8]
add esp, 4
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.004541b4
add esp, 0x17f0
ret