Function at 0x412945
Capabilities:
Encode data using xor

Disassembly:
call 0x412805
push ebp
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 4]
sub dword [esp + 4], 0x11805
and ebx, 0xfffff000
sub ebp, 0x401005
cmp dword [ebx + 0x4e], 0x73696854
jne 0x412837
mov eax, dword [ebx + 0x3c]
add eax, ebx
cmp word [eax], 0x4550
je 0x41283f
sub ebx, 0x100
jmp 0x412822
mov edx, dword [eax + 0x78]
add edx, ebx
mov esi, dword [edx + 0x20]
mov ecx, dword [edx + 0x18]
add esi, ebx
push ecx
lodsd eax, dword [esi]
add eax, ebx
cmp dword [eax - 1], 0x74654700
jne 0x412874
cmp dword [eax + 3], 0x636f7250
jne 0x412874
cmp dword [eax + 7], 0x72646441
jne 0x412874
cmp dword [eax + 0xb], 0x737365
je 0x412879
loop 0x41284d
pop ecx
pop ebp
ret
sub dword [esp], ecx
mov esi, dword [edx + 0x24]
pop ecx
add esi, ebx
movzx eax, word [esi + ecx*2]
mov edi, dword [edx + 0x1c]
add edi, ebx
mov esi, dword [edi + eax*4]
add esi, ebx
call 0x4128a1
inc ebx
insb byte es:[edi], dx
outsd dx, dword [esi]
jae 0x4128ff
dec eax
popal
outsb dx, byte [esi]
insb byte es:[edi], dx
add byte gs:[ebx - 1], dl
salc
mov dword [ebp + 0x402407], eax
call 0x4128bc
inc ebx
jb 0x412917
popal
je 0x41291a
inc ebp
jbe 0x41291d
outsb dx, byte [esi]
je 0x4128fc
add byte [ebx - 1], dl
salc
mov dword [ebp + 0x40240b], eax
call 0x4128d7
inc edi
je 0x41291a
popal
jae 0x412945
inc ebp
jb 0x412946
outsd dx, dword [esi]
jb 0x4128d7
push ebx
call esi
mov dword [ebp + 0x40240f], eax
call 0x41292a
test eax, eax
je 0x41290a
push eax
call dword [ebp + 0x40240f]
test eax, eax
jne 0x412904
lea eax, [ebp + 0x401155]
mov dl, byte [eax - 1]
call 0x412945
jmp 0x412955
invalid
add byte [eax], al
add bl, ch
push ecx
call dword [ebp + 0x402407]
pop ebp
ret
add byte [eax + eax], al
mov eax, esp
push 0
push eax
push 0xc
mov eax, esp
jmp edx
add byte [eax + 0x6a], dl
or al, 0x8b
invalid
push esi
push esp
pop edi
xor eax, dword [eax]
xor ecx, ecx
call fcn.0041290c
lea edx, [ebp + 0x401125]
push edx
push ecx
push ecx
push eax
call dword [ebp + 0x40240b]
add esp, 0x20
ret
mov dh, dl
mov ecx, 0x12b2
mov ecx, 0x12b2
add byte [eax], al
xor byte [eax], dl
inc eax
add dl, dh
loop 0x41294c
ret
cmc
dec ecx
loop 0x412925
push cs
les edi, [edx]
xor eax, dword [ebx - 0x137f9e8]
je 0x4129cd
lds ebx, [esi + 0x58]
cmp byte [eax], 0xae
jae 0x4129c8
xchg ebp, eax
in al, 0xee
xor ch, al
pop edi
pop ebp
call ebx
adc ch, ah
and dl, byte [0x30ee2dbb]
out 0x6f, al
sbb eax, ebp
add edx, dword [edi]
mov fs, word [eax - 0x6a]
xchg esi, eax
mov ebp, 0xe691109e
pop edx
rcr byte [ecx], 1
inc ebx
cmpsd dword [esi], dword es:[edi]
cmp dl, ah
or al, byte [ecx + 0x1e]
jae 0x412985
fcomp qword [edx]
inc esp
mov edx, 0x865b2d30
bound edi, qword [esi]
imul dword [ecx + 0x42dc5688]
mov al, 0xa7
and dword [ecx], eax
mov ah, 0x46
jl 0x41294a
push ecx
xchg byte [edx + ecx*8 + 0x2a], dl
mov dh, 0xd3
aaa
xchg ebx, eax
stosb byte es:[edi], al
inc esp
jp 0x412a32
cmpsb byte [esi], byte es:[edi]
rcl esi, cl
mov cl, al
dec ebx
aad 0x37
wait
cmp dword [edx], eax
push 0xbf5164ae
jg 0x412a02
mov ah, 0x28
sahf
xchg ebp, eax
add byte [bp - 0x54], ah
bound edx, qword [ebp - 0x25]
sub esi, eax
outsd dx, dword es:[esi]
mov bh, 0x77
sbb al, 0xf7
push es
inc eax
pop ebp
mov al, 0xa8
xor byte [ebp + 0x139dc3e4], bl
sub eax, 0x275ea86a
loope 0x412a40
retf 0x7525
retf
add al, 0xa2
inc eax
mov dh, 0x28
mov byte [0x92c58e72], al
cld
xor dword [esi - 0x4aa967ad], esi
sub ah, byte [ecx + 0x63977316]
cwde
push esi
mov ch, 0x2a
mov eax, dword [0x63977316]
retf 0xda24