Function at 0x406578
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffedc
mov eax, 0x4c6cf8
push ebx
push esi
push edi
call fcn.0049fef4
mov edx, dword [0x4c3b5c]
mov ecx, dword [0x4c3b67]
mov dword [ebp - 0x78], edx
mov edx, dword [0x4c3b60]
mov dword [ebp - 0x74], edx
lea edi, [ebp - 0xec]
mov dx, word [0x4c3b64]
mov esi, 0x4c3b6b
mov word [ebp - 0x70], dx
mov dl, byte [0x4c3b66]
mov byte [ebp - 0x6e], dl
mov dword [ebp - 0x7c], ecx
mov ecx, 0x1b
lea eax, [ebp - 0x78]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push eax
call fcn.0049fbf4
pop ecx
mov esi, eax
xor eax, eax
lea edx, [ebp - 0x78]
cmp esi, eax
jle 0x4065f2
mov cl, 0xc8
sub cl, al
inc eax
xor byte [edx], cl
inc edx
cmp esi, eax
jg 0x4065e6
lea eax, [ebp - 0x7c]
push eax
call fcn.0049fbf4
pop ecx
mov esi, eax
xor eax, eax
lea edx, [ebp - 0x7c]
cmp esi, eax
jle 0x406613
mov cl, 0xc8
sub cl, al
inc eax
xor byte [edx], cl
inc edx
cmp esi, eax
jg 0x406607
lea eax, [ebp - 0xec]
push eax
call fcn.0049fbf4
pop ecx
mov esi, eax
xor eax, eax
lea edx, [ebp - 0xec]
cmp esi, eax
jle 0x40663a
mov cl, 0xc8
sub cl, al
inc eax
xor byte [edx], cl
inc edx
cmp esi, eax
jg 0x40662e
xor eax, eax
lea edx, [ebp - 0x78]
mov dword [ebp - 0xf0], eax
lea eax, [ebp - 8]
mov word [ebp - 0x5c], 0x14
call fcn.004adb50
mov edx, eax
inc dword [ebp - 0x50]
lea eax, [ebp - 4]
call fcn.004aea8c
inc dword [ebp - 0x50]
dec dword [ebp - 0x50]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004adc4c
mov word [ebp - 0x5c], 8
lea ecx, [ebp - 0xf0]
mov edx, dword [0x4c3b58]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
push eax
push edx
mov ecx, dword [edx]
call dword [ecx + 0xc]
test eax, eax
jne 0x406a77
xor eax, eax
lea edx, [ebp - 0x7c]
mov dword [ebp - 0xf4], eax
lea eax, [ebp - 0x14]
mov word [ebp - 0x5c], 0x2c
call fcn.004adb50
mov edx, eax
inc dword [ebp - 0x50]
lea eax, [ebp - 0xc]
call fcn.004aea8c
inc dword [ebp - 0x50]
dec dword [ebp - 0x50]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004adc4c
mov word [ebp - 0x5c], 0x20
mov word [ebp - 0x5c], 0x38
lea edx, [ebp - 0xec]
lea eax, [ebp - 0x18]
call fcn.004adb50
mov edx, eax
inc dword [ebp - 0x50]
lea eax, [ebp - 0x10]
call fcn.004aea8c
inc dword [ebp - 0x50]
dec dword [ebp - 0x50]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004adc4c
mov word [ebp - 0x5c], 0x20
lea ecx, [ebp - 0xf4]
push ecx
push 0
push 0x10
mov eax, dword [ebp - 0x10]
push eax
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 0xf0]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x50]
test eax, eax
jne 0x406a3c
xor edx, edx
mov dword [ebp - 0xf8], edx
mov dword [ebp - 0xfc], 1
mov ecx, dword [ebp - 0xf4]
push ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
test eax, eax
jne 0x406a27
jmp 0x4069fc
xor edx, edx
lea ecx, [ebp - 0x104]
mov dword [ebp - 0x104], edx
mov word [ebp - 0x5c], 0x20
push ecx
push 0
push 0x70
push 0
mov eax, dword [ebp - 0xf8]
push eax
mov edx, dword [eax]
call dword [edx + 0x1c]
test eax, eax
jne 0x4069e7
lea ecx, [ebp - 0x108]
push ecx
push 1
mov eax, dword [ebp - 0x104]
push eax
call sub.OLEAUT32.DLL_SafeArrayGetLBound
lea edx, [ebp - 0x10c]
push edx
push 1
mov ecx, dword [ebp - 0x104]
push ecx
call sub.OLEAUT32.DLL_SafeArrayGetUBound
mov esi, dword [ebp - 0x108]
cmp esi, dword [ebp - 0x10c]
jg 0x4069e7
mov dword [ebp - 0x110], esi
xor eax, eax
mov word [ebp - 0x5c], 0x20
mov dword [ebp - 0x114], eax
lea edx, [ebp - 0x124]
push edx
call sub.OLEAUT32.DLL_VariantInit
lea ecx, [ebp - 0x114]
lea eax, [ebp - 0x110]
push ecx
push eax
mov edx, dword [ebp - 0x104]
push edx
call sub.OLEAUT32.DLL_SafeArrayGetElement
mov ecx, dword [ebp - 0x114]
push ecx
call sub.OLEAUT32.DLL_SysAllocString
mov ebx, eax
push 0
push 0
lea eax, [ebp - 0x124]
push eax
push 0
push ebx
mov edx, dword [ebp - 0xf8]
push edx
mov ecx, dword [edx]
call dword [ecx + 0x10]
mov edi, eax
push ebx
call sub.OLEAUT32.DLL_SysFreeString
test edi, edi
jne 0x4069c2
mov word [ebp - 0x5c], 0x44
xor eax, eax
lea edx, [ebp - 0x124]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
inc dword [ebp - 0x50]
mov word [ebp - 0x5c], 0x50
mov word [ebp - 0x5c], 0x5c
call fcn.004ae4d0
inc dword [ebp - 0x50]
mov word [ebp - 0x5c], 0x50
lea eax, [ebp - 0x2c]
call fcn.004ae5b8
test al, al
je 0x40695d
lea eax, [ebp - 0x2c]
mov edx, 1
call fcn.004ae5c4
mov ebx, eax
jmp 0x406946
mov word [ebp - 0x5c], 0x74
lea eax, [ebp - 0x3c]
call fcn.004ae49c
mov ecx, eax
inc dword [ebp - 0x50]
lea eax, [ebp - 0x2c]
mov edx, ebx
call fcn.004ae5dc
mov word [ebp - 0x5c], 0x68
cmp dword [ebp - 0x1c], 0
je 0x4068fb
mov word [ebp - 0x5c], 0x80
mov edx, 0x4c551b
lea eax, [ebp - 0x40]
call fcn.004adb50
inc dword [ebp - 0x50]
lea edx, [ebp - 0x40]
lea eax, [ebp - 0x1c]
call fcn.004adc90
dec dword [ebp - 0x50]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.004adc4c
mov word [ebp - 0x5c], 0x8c
xor ecx, ecx
lea edx, [ebp - 0x44]
mov dword [ebp - 0x44], ecx
lea eax, [ebp - 0x3c]
inc dword [ebp - 0x50]
call fcn.0049dfcc
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x1c]
call fcn.004adc90
dec dword [ebp - 0x50]
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.004adc4c
dec dword [ebp - 0x50]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.004ae520
mov word [ebp - 0x5c], 0x50
inc ebx
lea eax, [ebp - 0x2c]
mov edx, 1
call fcn.004ae5d0
cmp ebx, eax
jle 0x4068a1
jmp 0x406991
mov word [ebp - 0x5c], 0x98
xor ecx, ecx
lea edx, [ebp - 0x48]
mov dword [ebp - 0x48], ecx
lea eax, [ebp - 0x2c]
inc dword [ebp - 0x50]
call fcn.0049dfcc
lea edx, [ebp - 0x48]
lea eax, [ebp - 0x1c]
call fcn.004adc7c
dec dword [ebp - 0x50]
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.004adc4c
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
call dword [ecx + 0x34]
dec dword [ebp - 0x50]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004ae520
dec dword [ebp - 0x50]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004adc4c
mov word [ebp - 0x5c], 0x20
lea ecx, [ebp - 0x124]
push ecx
call sub.OLEAUT32.DLL_VariantClear
mov eax, dword [ebp - 0x114]
push eax
call sub.OLEAUT32.DLL_SysFreeString
inc esi
cmp esi, dword [ebp - 0x10c]
jle 0x4067da
cmp dword [ebp - 0x104], 0
je 0x4069fc
mov edx, dword [ebp - 0x104]
push edx
call sub.OLEAUT32.DLL_SafeArrayDestroy
lea ecx, [ebp - 0x100]
lea eax, [ebp - 0xf8]
push ecx
push eax
mov edx, dword [ebp - 0xfc]
push edx
push 0xffffffffffffffff
mov ecx, dword [ebp - 0xf4]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
je 0x40676f
cmp dword [ebp - 0xf8], 0
je 0x406a3c
mov edx, dword [ebp - 0xf8]
push edx
mov ecx, dword [edx]
call dword [ecx + 8]
cmp dword [ebp - 0xf4], 0
je 0x406a51
mov eax, dword [ebp - 0xf4]
push eax
mov edx, dword [eax]
call dword [edx + 8]
dec dword [ebp - 0x50]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004aeb00
dec dword [ebp - 0x50]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004aeb00
mov word [ebp - 0x5c], 8
cmp dword [ebp - 0xf0], 0
je 0x406a8c
mov ecx, dword [ebp - 0xf0]
push ecx
mov eax, dword [ecx]
call dword [eax + 8]
dec dword [ebp - 0x50]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004aeb00
mov ecx, dword [ebp - 0x6c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret