Function at 0x40b240
Capabilities:
Check for time delay via gettickcount
Encode data using xor
Query or enumerate registry value

Disassembly:
sub esp, 0x39c
mov ecx, dword [esp + 0x3a0]
push esi
xor esi, esi
mov eax, dword [ecx*4 + 0x42ba10]
mov dword [esp + 8], esi
cmp eax, esi
jne 0x40b269
xor eax, eax
pop esi
add esp, 0x39c
ret
cmp dword [eax], esi
jne 0x40b277
xor eax, eax
pop esi
add esp, 0x39c
ret
test byte [eax + 6], 2
jne 0x40b287
xor eax, eax
pop esi
add esp, 0x39c
ret
mov eax, dword [ecx*4 + 0x42b9d0]
push ebx
push ebp
push edi
mov ebx, dword [eax + 0xc]
cmp ebx, esi
je 0x40b5b6
cmp byte [ebx], 0
je 0x40b5b6
mov edi, 0x4260dc
or ecx, 0xffffffff
xor eax, eax
mov dl, 0xbf
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
lea ebp, [esp + 0x140]
test ecx, ecx
jle 0x40b2dd
mov al, dl
shl al, 7
shr dl, 1
add dl, al
mov al, byte [esi + 0x4260dc]
xor al, dl
mov byte [ebp], al
inc ebp
inc esi
cmp esi, ecx
jl 0x40b2c3
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x140]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea ecx, [esp + 0x144]
push ecx
push 0x80000002
call esi
test eax, eax
je 0x40b349
lea edx, [esp + 0x10]
lea eax, [esp + 0x140]
push edx
push eax
push 0x80000001
call esi
test eax, eax
jne 0x40b5b6
mov ecx, 0x5a
xor eax, eax
lea edi, [esp + 0x140]
lea edx, [esp + 0x140]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
push 0
push str.UninstallString
push ecx
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0x168
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40b3ab
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x39c
ret
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x140]
mov bl, 1
cmp al, 0x22
lea ebp, [esp + 0x140]
mov byte [esp + 0x3c], 0
jne 0x40b420
lea ecx, [esp + 0x141]
push 0x22
push ecx
lea ebp, [esp + 0x149]
call fcn.0041aa90
add esp, 8
test eax, eax
je 0x40b418
mov byte [eax], 0
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
jne 0x40b401
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
je 0x40b3f8
cmp byte [eax], 0
je 0x40b418
lea edx, [esp + 0x3c]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40b40c
xor bl, bl
mov al, byte [esp + 0x3c]
test al, al
jne 0x40b488
push ebp
call fcn.004010a0
add esp, 4
test eax, eax
jne 0x40b488
push str..exe
push ebp
call fcn.0041af50
add esp, 8
test eax, eax
jne 0x40b451
push str..EXE
push ebp
call fcn.0041af50
add esp, 8
test eax, eax
je 0x40b488
mov cl, byte [eax + 4]
add eax, 4
cmp cl, 0x20
jne 0x40b488
mov byte [eax], 0
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
jne 0x40b471
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
je 0x40b468
cmp byte [eax], 0
je 0x40b488
lea edx, [esp + 0x3c]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40b47c
xor bl, bl
push ebp
call fcn.004010a0
add esp, 4
test eax, eax
je 0x40b5b6
test bl, bl
je 0x40b4ca
push 2
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov esi, eax
test esi, esi
je 0x40b4c6
push 5
push 0x6d
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x40b4bf
xor bl, bl
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test bl, bl
jne 0x40b4d1
mov eax, 0x426698
jmp 0x40b4e6
mov eax, dword [esp + 0x3b4]
test eax, eax
mov eax, 0x426694
jne 0x40b4e6
mov eax, str._X__S
mov cl, byte [esp + 0x3c]
test cl, cl
jne 0x40b500
lea edx, [esp + 0x3c]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40b4f4
jmp 0x40b558
lea edx, [esp + 0x2a8]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40b509
lea edi, [esp + 0x2a8]
or ecx, 0xffffffff
xor eax, eax
mov dx, word [0x426440]
repne scasb al, byte es:[edi]
lea eax, [esp + 0x3c]
push 0xfc
lea ecx, [esp + 0x2ac]
push eax
push ecx
mov word [edi - 1], dx
call fcn.0041ae20
add esp, 0xc
xor eax, eax
mov cl, byte [esp + eax + 0x2a8]
mov byte [esp + eax + 0x3c], cl
inc eax
test cl, cl
jne 0x40b548
lea edx, [esp + 0x3c]
push 1
push edx
push ebp
call fcn.00402be0
add esp, 0xc
test eax, eax
je 0x40b5b6
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x40b5ae
mov ebx, dword [sym.imp.USER32.dll_PeekMessageA]
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push 0
push eax
call ebx
push ebp
call fcn.0041afd0
add esp, 4
test eax, eax
je 0x40b5ae
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x40b587
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x39c
ret