Function at 0x4126cd
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
sub esp, 0x300
lea ebp, [esp - 4]
mov eax, dword [0x4a4b60]
xor eax, ebp
mov dword [ebp + 0x300], eax
push 0x64
mov eax, 0x47e5c9
call fcn.00462bd7
mov edi, dword [ebp + 0x30c]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalLock]
push edi
mov dword [ebp - 0x70], edi
call esi
mov ebx, eax
mov dword [ebp - 0x44], ebx
test ebx, ebx
jne 0x412713
xor eax, eax
jmp 0x4133a4
movzx eax, word [ebx + 0xe]
xor ecx, ecx
inc ecx
cmp dword [ebp + 0x31c], 0
mov dword [ebp - 0x48], eax
jne 0x41272c
mov dword [ebp + 0x31c], ecx
cmp eax, ecx
je 0x412748
cmp eax, 4
je 0x412748
cmp eax, 8
je 0x412748
cmp eax, 0x18
je 0x412748
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x41270c
mov eax, dword [ebx + 4]
push 8
push dword [ebp + 0x314]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx + 8]
push dword [ebp + 0x310]
mov dword [ebp - 0x68], eax
call fcn.00407058
add esp, 0xc
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x41273f
push eax
call esi
mov dword [ebp - 0x40], eax
test eax, eax
je 0x41273f
mov eax, dword [ebp + 0x310]
imul eax, eax, 3
cmp dword [ebp + 0x31c], 1
mov esi, 0xc0
lea edi, [esi + 0x20]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x58], 2
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x64], 5
mov dword [ebp - 0x38], eax
jne 0x4127ea
and dword [ebp - 0x4c], 0
mov dword [ebp - 0x50], vtable.CPalette.0
and dword [ebp - 4], 0
lea eax, [ebp - 0x50]
push eax
call fcn.004113b5
push 0
push dword [ebp - 0x4c]
push dword [ebp - 0x40]
call fcn.004067ee
or dword [ebp - 4], 0xffffffff
add esp, 0x10
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x50], vtable.CPalette.0
call fcn.00402e97
cmp dword [ebp + 0x31c], 2
mov edx, 0x100
jne 0x412884
xor ecx, ecx
mov eax, ecx
and eax, esi
imul eax, eax, 0xff
add eax, 0x60
xor edx, edx
mov ebx, esi
div ebx
xor edx, edx
mov ebx, edi
mov byte [ebp + ecx], al
mov eax, ecx
and eax, 0x38
imul eax, eax, 0x3fc
add eax, 0x70
div ebx
xor edx, edx
mov ebx, esi
mov byte [ebp + ecx + 0x100], al
mov eax, ecx
and eax, 6
imul eax, eax, 0x1fe0
add eax, 0x60
div ebx
inc ecx
mov edx, 0x100
mov byte [ebp + ecx + 0x1ff], al
cmp ecx, edx
jb 0x4127fe
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
add eax, ecx
xor ecx, ecx
inc eax
mov bl, byte [ebp + ecx]
mov byte [eax + 1], bl
mov bl, byte [ebp + ecx + 0x100]
mov byte [eax], bl
mov bl, byte [ebp + ecx + 0x200]
mov byte [eax - 1], bl
inc ecx
add eax, 4
cmp ecx, edx
jb 0x41285f
mov ebx, dword [ebp - 0x44]
push 3
pop eax
cmp dword [ebp + 0x31c], eax
jne 0x41292c
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x64], 6
xor ecx, ecx
mov eax, ecx
and eax, edi
imul eax, eax, 0xff
add eax, 0x70
xor edx, edx
mov ebx, edi
div ebx
xor edx, edx
mov byte [ebp + ecx], al
mov eax, ecx
and eax, 0x1c
imul eax, eax, 0x7f8
add eax, 0x70
div ebx
xor edx, edx
mov ebx, esi
mov byte [ebp + ecx + 0x100], al
mov eax, ecx
and eax, 3
imul eax, eax, 0x3fc0
add eax, 0x60
div ebx
inc ecx
mov edx, 0x100
mov byte [ebp + ecx + 0x1ff], al
cmp ecx, edx
jb 0x4128a8
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
add eax, ecx
xor esi, esi
inc eax
mov cl, byte [ebp + esi]
mov byte [eax + 1], cl
mov cl, byte [ebp + esi + 0x100]
mov byte [eax], cl
mov cl, byte [ebp + esi + 0x200]
mov byte [eax - 1], cl
inc esi
add eax, 4
cmp esi, edx
jb 0x412907
mov ebx, dword [ebp - 0x44]
cmp dword [ebp + 0x31c], 4
jne 0x4129cf
mov eax, 0x80
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x64], 2
xor ecx, ecx
mov ebx, ecx
and ebx, eax
imul ebx, ebx, 0xff
add ebx, 0x40
shr ebx, 7
mov byte [ebp + ecx], bl
mov ebx, ecx
and ebx, 0x40
imul ebx, ebx, 0x1fe
add ebx, 0x40
shr ebx, 7
mov byte [ebp + ecx + 0x100], bl
mov ebx, ecx
and ebx, 0x20
imul ebx, ebx, 0x3fc
add ebx, 0x40
shr ebx, 7
mov byte [ebp + ecx + 0x200], bl
inc ecx
cmp ecx, edx
jb 0x412957
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
add eax, ecx
xor esi, esi
inc eax
mov cl, byte [ebp + esi]
mov byte [eax + 1], cl
mov cl, byte [ebp + esi + 0x100]
mov byte [eax], cl
mov cl, byte [ebp + esi + 0x200]
mov byte [eax - 1], cl
inc esi
add eax, 4
cmp esi, edx
jb 0x4129aa
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebx]
add eax, ebx
cmp dword [ebp + 0x31c], 1
mov dword [ebp - 0x3c], eax
je 0x412a38
call fcn.0040ae8e
mov esi, dword [ebp - 0x38]
shl esi, 2
push esi
call fcn.00462114
push esi
mov dword [ebp - 0x30], eax
call fcn.00462114
cmp dword [ebp - 0x30], 0
pop ecx
pop ecx
mov dword [ebp - 0x34], eax
je 0x41270c
test eax, eax
je 0x41270c
mov ebx, dword [ebp - 0x14]
cmp dword [ebp + 0x31c], 2
jl 0x413376
mov eax, dword [ebp - 0x44]
cmp dword [eax + 0x10], 3
jne 0x412dc6
mov ecx, dword [eax]
lea esi, [eax + ecx + 0xc]
jmp 0x412dce
and dword [ebp - 0x24], 0
cmp dword [ebp + 0x314], 0
jle 0x413376
mov ebx, dword [ebp - 0x14]
push dword [ebp + 0x314]
mov esi, dword [ebp - 0x68]
push esi
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_MulDiv]
cmp eax, esi
jl 0x412a66
lea eax, [esi - 1]
mov ecx, dword [ebp - 0x44]
cmp dword [ecx + 0x10], 3
jne 0x412a77
mov edx, dword [ecx]
lea edx, [ecx + edx + 0xc]
jmp 0x412a7f
mov edx, dword [ecx + 0x20]
lea edx, [ecx + edx*4]
add edx, dword [ecx]
movzx esi, word [ecx + 0xe]
imul esi, dword [ecx + 4]
add esi, 0x1f
shr esi, 3
and esi, 0x1ffffffc
imul esi, eax
mov eax, dword [ebp - 0x40]
add esi, edx
cmp dword [eax + 0x10], 3
jne 0x412aa9
mov ecx, dword [eax]
lea ecx, [ecx + eax + 0xc]
jmp 0x412ab3
mov ecx, dword [eax + 0x20]
mov edx, dword [eax]
lea ecx, [edx + ecx*4]
add ecx, eax
movzx edi, word [eax + 0xe]
imul edi, dword [eax + 4]
and dword [ebp - 0x30], 0
add edi, 0x1f
shr edi, 3
and edi, 0x1ffffffc
imul edi, dword [ebp - 0x24]
add edi, ecx
cmp dword [ebp + 0x310], 0
jle 0x412daf
mov eax, dword [ebp - 0x24]
and eax, reloc.OLEAUT32.dll_VariantInit
jns 0x412aed
dec eax
or eax, 0xfffffff8
inc eax
mov dword [ebp - 0x34], 1
sub dword [ebp - 0x34], edi
mov dword [ebp - 0x38], eax
push dword [ebp + 0x310]
mov ebx, dword [sym.imp.KERNEL32.dll_MulDiv]
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
call ebx
cmp eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
jl 0x412b1d
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x28], eax
push dword [ebp + 0x310]
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
add eax, edi
add ecx, eax
push ecx
call ebx
cmp eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
jl 0x412b42
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x28]
cmp eax, ecx
jne 0x412b4d
inc ecx
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x48]
xor ebx, ebx
sub ecx, eax
dec edx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
je 0x412c5c
sub edx, 3
je 0x412bfe
sub edx, 4
je 0x412bc9
sub edx, 0x10
jne 0x412cdb
cmp eax, dword [ebp - 0x20]
jge 0x412bae
imul eax, eax, 3
lea eax, [eax + esi + 1]
mov dword [ebp - 0x20], ecx
movzx ecx, byte [eax + 1]
add ebx, ecx
movzx ecx, byte [eax]
add dword [ebp - 0x10], ecx
movzx ecx, byte [eax - 1]
add dword [ebp - 0x14], ecx
add eax, 3
dec dword [ebp - 0x20]
jne 0x412b90
mov ecx, dword [ebp - 0x28]
mov eax, ebx
cdq
idiv ecx
mov ebx, eax
mov eax, dword [ebp - 0x10]
cdq
idiv ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
cdq
idiv ecx
jmp 0x412cd8
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jge 0x412bae
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax + esi]
mov ecx, dword [ebp - 0x3c]
lea eax, [ecx + eax*4]
movzx ecx, byte [eax + 2]
add ebx, ecx
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
add dword [ebp - 0x14], eax
add dword [ebp - 0x10], ecx
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jl 0x412bd1
jmp 0x412bab
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jge 0x412bae
mov eax, dword [ebp - 0x1c]
mov ecx, eax
and ecx, 0x80000001
jns 0x412c18
dec ecx
or ecx, 0xfffffffe
inc ecx
cdq
jne 0x412c27
sub eax, edx
sar eax, 1
mov al, byte [eax + esi]
shr al, 4
jmp 0x412c30
sub eax, edx
sar eax, 1
mov al, byte [eax + esi]
and al, 0xf
mov ecx, dword [ebp - 0x3c]
movzx eax, al
lea eax, [ecx + eax*4]
movzx ecx, byte [eax + 2]
add ebx, ecx
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
add dword [ebp - 0x14], eax
add dword [ebp - 0x10], ecx
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jl 0x412c06
jmp 0x412bab
mov dword [ebp - 0x1c], eax
jmp 0x412cba
mov eax, dword [ebp - 0x1c]
mov edx, eax
and edx, reloc.OLEAUT32.dll_VariantInit
jns 0x412c73
dec edx
or edx, 0xfffffff8
inc edx
push 7
pop ecx
sub ecx, edx
cdq
and edx, 7
mov byte [ebp - 0x15], 1
shl byte [ebp - 0x15], cl
mov cl, byte [ebp - 0x15]
add eax, edx
sar eax, 3
and cl, byte [eax + esi]
mov byte [ebp - 0x15], cl
je 0x412c97
mov byte [ebp - 0x15], 1
movzx eax, byte [ebp - 0x15]
mov ecx, dword [ebp - 0x3c]
lea eax, [ecx + eax*4]
movzx ecx, byte [eax + 2]
add ebx, ecx
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
add dword [ebp - 0x14], eax
add dword [ebp - 0x10], ecx
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jl 0x412c61
mov eax, ebx
cdq
idiv dword [ebp - 0x28]
mov ebx, eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x320], 0
je 0x412d24
mov ecx, 0x100
mov eax, ecx
sub eax, ebx
cdq
sub eax, edx
sar eax, 1
add ebx, eax
cmp ebx, ecx
jle 0x412cfa
mov ebx, ecx
mov eax, ecx
sub eax, dword [ebp - 0x10]
cdq
sub eax, edx
sar eax, 1
add dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], ecx
jle 0x412d0f
mov dword [ebp - 0x10], ecx
mov eax, ecx
sub eax, dword [ebp - 0x14]
cdq
sub eax, edx
sar eax, 1
add dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], ecx
jle 0x412d24
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x30]
and eax, reloc.OLEAUT32.dll_VariantInit
jns 0x412d33
dec eax
or eax, 0xfffffff8
inc eax
mov ecx, dword [ebp - 0x38]
mov al, byte [ecx + eax*8 + 0x49e4c8]
mov ecx, dword [ebp - 0x14]
cmp byte [ecx + 0x49e3b8], al
movzx ecx, cl
seta dl
add dl, byte [ecx + 0x49e2b8]
mov ecx, dword [ebp - 0x10]
cmp byte [ecx + 0x49e3b8], al
mov byte [ebp - 0x15], al
seta al
movzx ecx, cl
add al, byte [ecx + 0x49e2b8]
movzx edx, dl
mov cl, byte [edx + 0x49e4c0]
movzx eax, al
add cl, byte [eax + 0x49e4b8]
mov al, byte [ebp - 0x15]
cmp byte [ebx + 0x49e3b8], al
seta al
add cl, al
add cl, byte [ebx + 0x49e2b8]
movzx eax, cl
mov cl, byte [eax + 0x49e528]
mov eax, dword [ebp - 0x30]
mov byte [eax + edi], cl
inc eax
cmp eax, dword [ebp + 0x310]
mov dword [ebp - 0x30], eax
jl 0x412afa
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp + 0x314]
jl 0x412a4c
jmp 0x412a13
mov ecx, dword [eax + 0x20]
lea esi, [eax + ecx*4]
add esi, dword [eax]
and dword [ebp - 0x28], 0
cmp dword [ebp + 0x310], 0
mov edi, dword [ebp - 0x34]
jle 0x412efd
push dword [ebp + 0x310]
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_MulDiv]
cmp eax, dword [ebp - 0x2c]
jl 0x412dfd
mov eax, dword [ebp - 0x2c]
dec eax
mov ecx, dword [ebp - 0x48]
dec ecx
je 0x412e4b
sub ecx, 3
je 0x412e1f
sub ecx, 4
je 0x412e19
sub ecx, 0x10
jne 0x412e8d
imul eax, eax, 3
add eax, esi
jmp 0x412e7c
movzx eax, byte [eax + esi]
jmp 0x412e76
mov ecx, eax
and ecx, 0x80000001
jns 0x412e2e
dec ecx
or ecx, 0xfffffffe
inc ecx
cdq
jne 0x412e3d
sub eax, edx
sar eax, 1
mov al, byte [eax + esi]
shr al, 4
jmp 0x412e46
sub eax, edx
sar eax, 1
mov al, byte [eax + esi]
and al, 0xf
movzx eax, al
jmp 0x412e76
mov edx, eax
and edx, reloc.OLEAUT32.dll_VariantInit
jns 0x412e5a
dec edx
or edx, 0xfffffff8
inc edx
push 7
pop ecx
sub ecx, edx
cdq
mov bl, 1
and edx, 7
shl bl, cl
add eax, edx
sar eax, 3
and bl, byte [eax + esi]
je 0x412e73
mov bl, 1
movzx eax, bl
mov ecx, dword [ebp - 0x3c]
lea eax, [ecx + eax*4]
movzx ecx, byte [eax + 1]
movzx ebx, byte [eax + 2]
movzx eax, byte [eax]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 0x320], 0
je 0x412ed6
mov ecx, 0x100
mov eax, ecx
sub eax, ebx
cdq
sub eax, edx
sar eax, 1
add ebx, eax
cmp ebx, ecx
jle 0x412eac
mov ebx, ecx
mov eax, ecx
sub eax, dword [ebp - 0x10]
cdq
sub eax, edx
sar eax, 1
add dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], ecx
jle 0x412ec1
mov dword [ebp - 0x10], ecx
mov eax, ecx
sub eax, dword [ebp - 0x14]
cdq
sub eax, edx
sar eax, 1
add dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], ecx
jle 0x412ed6
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x10]
mov dword [edi], ebx
add edi, 4
mov dword [edi], eax
mov eax, dword [ebp - 0x14]
add edi, 4
mov dword [edi], eax
add edi, 4
inc dword [ebp - 0x28]
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x310]
jl 0x412de2
and dword [ebp - 0x28], 0
cmp dword [ebp + 0x314], 0
jle 0x413376
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x314]
dec eax
mov dword [ebp - 0x30], ecx
cmp dword [ebp - 0x28], eax
je 0x4131a5
push dword [ebp + 0x314]
mov esi, dword [ebp - 0x68]
mov eax, dword [ebp - 0x28]
push esi
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
cmp eax, esi
jl 0x412f49
lea eax, [esi - 1]
mov ecx, dword [ebp - 0x44]
cmp dword [ecx + 0x10], 3
jne 0x412f5a
mov edx, dword [ecx]
lea edx, [ecx + edx + 0xc]
jmp 0x412f62
mov edx, dword [ecx + 0x20]
lea edx, [ecx + edx*4]
add edx, dword [ecx]
movzx esi, word [ecx + 0xe]
imul esi, dword [ecx + 4]
add esi, 0x1f
shr esi, 3
and esi, 0x1ffffffc
imul esi, eax
xor edi, edi
add esi, edx
cmp dword [ebp + 0x310], edi
jle 0x4131a5
push dword [ebp + 0x310]
push dword [ebp - 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov ebx, eax
cmp ebx, dword [ebp - 0x2c]
jl 0x412fa4
mov ebx, dword [ebp - 0x2c]
dec ebx
push dword [ebp + 0x310]
lea eax, [edi + 1]
push dword [ebp - 0x2c]
mov dword [ebp - 0x4c], eax
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
cmp eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
jl 0x412fc9
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x412fd3
lea eax, [ebx + 1]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x48]
xor ecx, ecx
sub edx, ebx
xor edi, edi
dec eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ecx
je 0x4130bf
sub eax, 3
je 0x413062
sub eax, 4
je 0x413038
sub eax, 0x10
jne 0x413139
cmp ebx, dword [ebp - 0x20]
jge 0x41302b
imul ebx, ebx, 3
lea ebx, [ebx + esi + 1]
mov dword [ebp - 0x24], edx
movzx eax, byte [ebx + 1]
add ecx, eax
movzx eax, byte [ebx]
add dword [ebp - 0x10], eax
movzx eax, byte [ebx - 1]
add edi, eax
add ebx, 3
dec dword [ebp - 0x24]
jne 0x413011
mov eax, ecx
cdq
idiv dword [ebp - 0x1c]
mov ecx, eax
jmp 0x413127
cmp ebx, dword [ebp - 0x20]
jge 0x41302b
movzx eax, byte [ebx + esi]
mov edx, dword [ebp - 0x3c]
lea eax, [edx + eax*4]
movzx edx, byte [eax + 2]
add ecx, edx
mov dword [ebp - 0x14], ecx
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
add dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x14]
add edi, eax
inc ebx
jmp 0x413038
cmp ebx, dword [ebp - 0x20]
mov eax, ebx
mov dword [ebp - 0x24], ebx
jge 0x41302b
mov edx, eax
and edx, 0x80000001
jns 0x41307b
dec edx
or edx, 0xfffffffe
inc edx
cdq
jne 0x41308b
sub eax, edx
sar eax, 1
movzx eax, byte [eax + esi]
shr eax, 4
jmp 0x413096
sub eax, edx
sar eax, 1
movzx eax, byte [eax + esi]
and eax, 0xf
mov edx, dword [ebp - 0x3c]
lea eax, [edx + eax*4]
movzx edx, byte [eax + 2]
add ecx, edx
movzx edx, byte [eax + 1]
movzx eax, byte [eax]
add dword [ebp - 0x10], edx
add edi, eax
mov eax, dword [ebp - 0x24]
inc eax
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jl 0x41306c
jmp 0x41302b
cmp ebx, dword [ebp - 0x20]
mov dword [ebp - 0x24], ebx
jge 0x41311b
mov eax, dword [ebp - 0x24]
mov edx, eax
and edx, reloc.OLEAUT32.dll_VariantInit
jns 0x4130d9
dec edx
or edx, 0xfffffff8
inc edx
push 7
pop ecx
sub ecx, edx
cdq
xor ebx, ebx
and edx, 7
add eax, edx
inc ebx
sar eax, 3
movzx eax, byte [eax + esi]
shl ebx, cl
and ebx, eax
je 0x4130f7
xor ebx, ebx
inc ebx
mov eax, dword [ebp - 0x3c]
lea eax, [eax + ebx*4]
movzx ecx, byte [eax + 2]
add dword [ebp - 0x14], ecx
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
add dword [ebp - 0x10], ecx
add edi, eax
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x20]
jl 0x4130c7
mov eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov ecx, eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
mov eax, edi
cdq
idiv dword [ebp - 0x1c]
mov edi, eax
cmp dword [ebp + 0x320], 0
je 0x41317e
mov ebx, 0x100
mov eax, ebx
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
add ecx, eax
cmp ecx, ebx
jle 0x413158
mov ecx, ebx
mov eax, ebx
sub eax, dword [ebp - 0x10]
cdq
sub eax, edx
sar eax, 1
add dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], ebx
jle 0x41316d
mov dword [ebp - 0x10], ebx
mov eax, ebx
sub eax, edi
cdq
sub eax, edx
sar eax, 1
add edi, eax
cmp edi, ebx
jle 0x41317e
mov edi, ebx
mov eax, dword [ebp - 0x38]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x10]
add eax, 4
mov dword [eax], ecx
add eax, 4
mov dword [eax], edi
mov edi, dword [ebp - 0x4c]
add eax, 4
cmp edi, dword [ebp + 0x310]
mov dword [ebp - 0x38], eax
jl 0x412f89
mov eax, dword [ebp - 0x40]
cmp dword [eax + 0x10], 3
jne 0x4131b6
mov ecx, dword [eax]
lea ecx, [ecx + eax + 0xc]
jmp 0x4131c0
mov ecx, dword [eax + 0x20]
mov edx, dword [eax]
lea ecx, [edx + ecx*4]
add ecx, eax
movzx esi, word [eax + 0xe]
imul esi, dword [eax + 4]
and dword [ebp - 0x14], 0
mov ebx, dword [ebp - 0x30]
add esi, 0x1f
shr esi, 3
and esi, 0x1ffffffc
imul esi, dword [ebp - 0x28]
add esi, ecx
cmp dword [ebp + 0x310], 0
jle 0x413364
mov edx, dword [ebp - 0x34]
add edx, 8
mov edi, dword [ebx]
add ebx, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebx]
add ebx, 4
mov ecx, 0xff
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
test edi, edi
jge 0x413219
and dword [ebp - 0x20], 0
cmp dword [ebp - 0x20], ecx
jle 0x413221
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x24], 0
jge 0x41322b
and dword [ebp - 0x24], 0
cmp dword [ebp - 0x24], ecx
jle 0x413233
mov dword [ebp - 0x24], ecx
test eax, eax
jge 0x41323c
xor eax, eax
mov dword [ebp - 0x1c], eax
cmp eax, ecx
jle 0x413245
mov eax, ecx
mov dword [ebp - 0x1c], eax
and eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x64]
mov edi, dword [ebp - 0x24]
and edi, dword [ebp - 0x60]
sar eax, cl
mov ecx, dword [ebp - 0x58]
sar edi, cl
mov ecx, dword [ebp - 0x20]
and ecx, dword [ebp - 0x54]
or eax, edi
or eax, ecx
movzx ecx, byte [ebp + eax]
mov edi, 0x100
sub edi, ecx
add dword [ebp - 0x20], edi
movzx ecx, byte [ebp + eax + 0x100]
mov edi, 0x100
sub edi, ecx
mov ecx, dword [ebp - 0x24]
mov byte [esi], al
movzx eax, byte [ebp + eax + 0x200]
add ecx, edi
mov edi, 0x100
sub edi, eax
add dword [ebp - 0x1c], edi
mov eax, dword [ebp + 0x310]
dec eax
cmp dword [ebp - 0x14], eax
je 0x4132c8
mov eax, dword [ebp - 0x20]
mov eax, dword [eax*4 + 0x4a69f0]
add dword [ebx], eax
mov eax, dword [ecx*4 + 0x4a69f0]
add dword [ebx + 4], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax*4 + 0x4a69f0]
add dword [ebx + 8], eax
mov eax, dword [ebp + 0x314]
dec eax
cmp dword [ebp - 0x28], eax
je 0x413351
mov eax, dword [ebp - 0x20]
shl eax, 2
mov edi, dword [eax + 0x4a71f0]
add dword [edx - 8], edi
shl ecx, 2
mov edi, dword [ecx + 0x4a71f0]
add dword [edx - 4], edi
mov edi, dword [ebp - 0x1c]
shl edi, 2
mov dword [ebp - 0x38], edi
mov edi, dword [edi + 0x4a71f0]
add dword [edx], edi
cmp dword [ebp - 0x14], 0
jle 0x413324
mov edi, dword [eax + 0x4a79f0]
add dword [edx - 0x14], edi
mov edi, dword [ecx + 0x4a79f0]
add dword [edx - 0x10], edi
mov edi, dword [ebp - 0x38]
mov edi, dword [edi + 0x4a79f0]
add dword [edx - 0xc], edi
mov edi, dword [ebp + 0x310]
dec edi
cmp dword [ebp - 0x14], edi
je 0x41334e
mov eax, dword [eax + 0x4a81f0]
add dword [edx + 4], eax
mov eax, dword [ecx + 0x4a81f0]
add dword [edx + 8], eax
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x4a81f0]
add dword [edx + 0xc], eax
add edx, 0xc
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
inc esi
cmp eax, dword [ebp + 0x310]
jl 0x4131f4
inc dword [ebp - 0x28]
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp + 0x314]
jl 0x412f0e
push dword [ebp - 0x70]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call esi
push dword [ebp - 0x6c]
call esi
cmp dword [ebp + 0x31c], 1
je 0x4133a1
push dword [ebp - 0x30]
call fcn.00461ccb
push dword [ebp - 0x34]
call fcn.00461ccb
pop ecx
pop ecx
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x300]
xor ecx, ebp
call fcn.00461b8a
add ebp, 0x304
leave
ret