Function at 0x4040a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x17f4
call fcn.00457940
mov eax, dword [0x4811e8]
push ebx
push esi
push edi
xor esi, esi
push 0x48923c
mov dword [esp + 0x1800], eax
mov dword [esp + 0x1c], esi
call fcn.00401040
mov eax, dword [ebp + 8]
add esp, 4
push esi
push 0x8000000
push 3
push esi
push esi
push 0x80000000
push eax
call dword [0x4741ec]
mov edi, eax
cmp edi, 0xffffffff
je 0x404116
push 0x989680
call fcn.00457c00
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x20], ebx
jne 0x40411e
push str.BMPDecode_Error
call fcn.00408160
add esp, 4
or esi, 0xffffffff
jmp 0x404341
push 0
push edi
call dword [0x47407c]
push 0
push 0
push 0
push edi
mov dword [esp + 0x1c], eax
call dword [0x474078]
mov edx, dword [esp + 0xc]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push ebx
push edi
call dword [0x474074]
mov ecx, dword [esp + 0x14]
push 2
push 0
push 0xffffffffffffffff
inc ecx
push edi
mov dword [esp + 0x24], ecx
call dword [0x474078]
push 0
lea eax, [esp + 0x20]
push eax
push 1
lea ecx, [esp + 0x1f]
push ecx
push edi
call dword [0x474074]
push edi
call dword [0x4741f0]
mov edx, dword [str.EAGLS_SYSTEM]
mov eax, dword [0x4753d8]
mov ecx, dword [0x4753dc]
mov dword [esp + 0x28], edx
mov dl, byte [0x4753e0]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
xor eax, eax
mov byte [esp + 0x34], dl
mov ecx, 0x1c
lea edi, [esp + 0x35]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x28]
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4041c0
sub eax, edi
push 0x174b
mov dword [esp + 0x10], eax
lea eax, [esp + 0xac]
push ebx
push eax
call fcn.00401450
movzx ecx, byte [esp + 0x1f]
push ecx
push 0x41cf90
push 0x41cd90
call fcn.0041cfe0
add esp, 0x18
xor edi, edi
lea ebx, [ebx]
call fcn.0041d000
cdq
idiv dword [esp + 0xc]
mov al, byte [esp + edi + 0xa8]
mov dl, byte [esp + edx + 0x28]
xor al, dl
mov byte [esp + edi + 0xa8], al
inc edi
cmp edi, 0x174b
jl 0x404200
push 0x174b
lea eax, [esp + 0xac]
push eax
push ebx
call fcn.00401450
mov eax, dword [esp + 0x20]
add esp, 0xc
dec eax
mov dword [esp + 0x14], eax
mov ecx, 0x3fb
xor eax, eax
lea edi, [esp + 0xa8]
rep stosd dword es:[edi], eax
mov edx, 0xfee
stosw word es:[edi], ax
mov edi, dword [ebp + 0xc]
mov dword [esp + 0xc], 0
mov dword [esp + 0x1c], edx
lea esp, [esp]
mov eax, dword [esp + 0xc]
shr eax, 1
test ah, 1
mov dword [esp + 0xc], eax
jne 0x40428d
movzx eax, byte [ebx + esi]
inc esi
or eax, 0xff00
mov dword [esp + 0xc], eax
test byte [esp + 0xc], 1
je 0x4042b6
movzx eax, byte [ebx + esi]
mov ecx, dword [esp + 0x18]
inc esi
inc ecx
mov byte [ecx + edi - 1], al
mov byte [esp + edx + 0xa8], al
inc edx
mov dword [esp + 0x18], ecx
and edx, 0xfff
jmp 0x40432a
movzx ecx, byte [ebx + esi]
mov dword [esp + 0x1c], ecx
movzx eax, byte [ebx + esi + 1]
inc esi
mov edi, eax
and edi, 0xf0
shl edi, 4
or ecx, edi
mov edi, dword [ebp + 0xc]
and eax, 0xf
inc esi
add eax, 2
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
mov ecx, 0
js 0x40432a
lea ebx, [ebx]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
add eax, ecx
and eax, 0xfff
mov al, byte [esp + eax + 0xa8]
inc ebx
mov byte [ebx + edi - 1], al
mov byte [esp + edx + 0xa8], al
mov eax, dword [esp + 0x24]
inc ecx
inc edx
and edx, 0xfff
cmp ecx, eax
mov dword [esp + 0x18], ebx
jle 0x4042f0
mov ebx, dword [esp + 0x20]
cmp esi, dword [esp + 0x14]
jl 0x404270
push ebx
call fcn.00457ae8
mov esi, dword [esp + 0x1c]
add esp, 4
push 0x48923c
call fcn.00401060
mov ecx, dword [esp + 0x1800]
add esp, 4
mov eax, esi
call fcn.00457925
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret