Function at 0x4047a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x17f4
call fcn.0045c960
mov eax, dword [0x48eb38]
push ebx
push esi
push edi
xor esi, esi
push 0x496b9c
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 [0x4791ec]
mov edi, eax
cmp edi, 0xffffffff
je 0x404816
push 0x989680
call fcn.0045cc20
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x20], ebx
jne 0x40481e
push str.BMPDecode_Error
call fcn.00408840
add esp, 4
or esi, 0xffffffff
jmp 0x404a41
push 0
push edi
call dword [0x47907c]
push 0
push 0
push 0
push edi
mov dword [esp + 0x1c], eax
call dword [0x479078]
mov edx, dword [esp + 0xc]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push ebx
push edi
call dword [0x479074]
mov ecx, dword [esp + 0x14]
push 2
push 0
push 0xffffffffffffffff
inc ecx
push edi
mov dword [esp + 0x24], ecx
call dword [0x479078]
push 0
lea eax, [esp + 0x20]
push eax
push 1
lea ecx, [esp + 0x1f]
push ecx
push edi
call dword [0x479074]
push edi
call dword [0x4791f0]
mov edx, dword [str.EAGLS_SYSTEM]
mov eax, dword [0x47a708]
mov ecx, dword [0x47a70c]
mov dword [esp + 0x28], edx
mov dl, byte [0x47a710]
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 0x4048c0
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 0x41d870
push 0x41d670
call fcn.0041d8c0
add esp, 0x18
xor edi, edi
lea ebx, [ebx]
call fcn.0041d8e0
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 0x404900
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 0x40498d
movzx eax, byte [ebx + esi]
inc esi
or eax, 0xff00
mov dword [esp + 0xc], eax
test byte [esp + 0xc], 1
je 0x4049b6
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 0x404a2a
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 0x404a2a
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 0x4049f0
mov ebx, dword [esp + 0x20]
cmp esi, dword [esp + 0x14]
jl 0x404970
push ebx
call fcn.0045cb08
mov esi, dword [esp + 0x1c]
add esp, 4
push 0x496b9c
call fcn.00401060
mov ecx, dword [esp + 0x1800]
add esp, 4
mov eax, esi
call fcn.0045c945
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret