Function at 0x502240
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x57921b
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x5c3678]
xor eax, esp
mov dword [esp + 0xc0], eax
push ebx
push esi
push edi
mov eax, dword [0x5c3678]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], 0
cmp dword [ebx + 0x2f4], 7
jne 0x50271e
mov edi, 3
cmp dword [ebx + 0x204], edi
jne 0x50271e
cmp dword [ebx + 0x200], 0
sete al
test al, al
jne 0x50271e
mov eax, dword [ebx + 0x200]
test eax, eax
jne 0x5022ce
push 0x80004003
call fcn.0053c010
push 1
push 0xea6a
lea esi, [esp + 0x1c]
call fcn.0046fb00
mov esi, 2
lea ecx, [esp + 0x1c]
mov dword [esp + 0xe0], esi
call fcn.00483910
mov byte [esp + 0xe0], 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x50230b
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x1c]
test eax, eax
sete cl
test cl, cl
je 0x502328
mov dword [esp + 0xe0], 0xffffffff
jmp 0x502710
mov eax, dword [ebp + 8]
test eax, eax
jge 0x502444
cmp eax, 0xc0010003
je 0x50246a
push 0
cmp eax, 0xc0000001
je 0x502400
cmp eax, 0xc001000d
lea eax, [ebx - 0x148]
je 0x5023ac
mov ecx, str.IDS_ERROR_INVALID_SERVICE
lea esi, [esp + 0x48]
call fcn.004acda0
mov byte [esp + 0xe0], 7
cmp dword [eax + 0x18], 8
jb 0x50238f
mov eax, dword [eax + 4]
push eax
lea edi, [ebx - 0x19c]
call fcn.004f96b0
mov ecx, esi
call fcn.0040eb20
jmp 0x502701
add eax, 4
push eax
lea edi, [ebx - 0x19c]
call fcn.004f96b0
lea ecx, [esp + 0x44]
call fcn.0040eb20
jmp 0x502701
mov ecx, str.IDS_ERR_LICENSE_INVALID_LICENSE
lea esi, [esp + 0x64]
call fcn.004acda0
mov byte [esp + 0xe0], 6
cmp dword [eax + 0x18], 8
jb 0x5023e3
mov eax, dword [eax + 4]
push eax
lea edi, [ebx - 0x19c]
call fcn.004f96b0
mov ecx, esi
call fcn.0040eb20
jmp 0x502701
add eax, 4
push eax
lea edi, [ebx - 0x19c]
call fcn.004f96b0
lea ecx, [esp + 0x60]
call fcn.0040eb20
jmp 0x502701
lea eax, [ebx - 0x148]
mov ecx, str.IDS_ERROR_INVALIDE_ACTIVATION_CODE
lea esi, [esp + 0x2c]
call fcn.004acda0
mov byte [esp + 0xe0], 5
cmp dword [eax + 0x18], 8
jb 0x502427
mov eax, dword [eax + 4]
jmp 0x50242a
add eax, 4
push eax
lea edi, [ebx - 0x19c]
call fcn.004f96b0
lea ecx, [esp + 0x28]
call fcn.0040eb20
jmp 0x502701
cmp eax, 0xc0010003
je 0x50246a
test eax, eax
je 0x50245e
cmp eax, 0x10007
jne 0x502470
mov dword [ebx + 0x35c], edi
jmp 0x502470
mov dword [ebx + 0x35c], 1
jmp 0x502470
mov dword [ebx + 0x35c], esi
mov eax, dword [ebx + 0x200]
test eax, eax
jne 0x502484
push 0x80004003
call fcn.0053c010
push 1
push 0xea6a
lea esi, [esp + 0x20]
call fcn.0046fb00
push ecx
mov ecx, esp
mov byte [esp + 0xe4], 8
mov dword [esp + 0x28], esp
call fcn.00483910
lea esi, [esp + 0x24]
call fcn.004817d0
add esp, 4
lea esi, [ebx + 0x360]
mov edi, esi
mov byte [esp + 0xe0], 9
call fcn.00423c70
lea ecx, [esp + 0x20]
call fcn.00423d60
mov byte [esp + 0xe0], 4
mov eax, dword [esp + 0x18]
xor edi, edi
cmp eax, edi
je 0x5024ec
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push esi
call fcn.004955d0
lea ecx, [ebx - 0x19c]
push 1
call fcn.004f4930
mov eax, 0xf
mov dword [esp + 0xcc], eax
mov dword [esp + 0xc8], edi
mov byte [esp + 0xb8], 0
mov dword [esp + 0xb0], eax
mov dword [esp + 0xac], edi
mov byte [esp + 0x9c], 0
mov dword [esp + 0x94], eax
mov dword [esp + 0x90], edi
mov byte [esp + 0x80], 0
lea eax, [esp + 0xb4]
push eax
lea edx, [esp + 0x80]
lea ecx, [esp + 0x9c]
mov byte [esp + 0xe4], 0xc
call fcn.004d72e0
add esp, 4
cmp dword [esp + 0xac], edi
je 0x50260c
mov eax, dword [esp + 0x90]
xor ecx, ecx
cmp eax, edi
setne cl
mov byte [ebx + 0x2eb], 0
inc ecx
mov dword [ebx + 0x60], ecx
cmp eax, edi
jne 0x50259b
or eax, 0xffffffff
jmp 0x5025bc
cmp dword [esp + 0x94], 0x10
mov eax, dword [esp + 0x80]
jae 0x5025b3
lea eax, [esp + 0x80]
push eax
call fcn.00542983
add esp, 4
lea edx, [esp + 0x98]
push edx
lea esi, [esp + 0x2c]
mov dword [ebx + 0x318], eax
call fcn.00404bc0
add esp, 4
mov byte [esp + 0xe0], 0xd
cmp dword [eax + 0x18], 8
jb 0x5025e9
mov eax, dword [eax + 4]
jmp 0x5025ec
add eax, 4
lea edi, [ebx + 0x340]
mov edx, eax
call fcn.00423a40
lea ecx, [esp + 0x28]
mov byte [esp + 0xe0], 0xc
call fcn.0040eb20
xor edi, edi
push edi
lea edi, [ebx - 0x19c]
push edi
call fcn.004f93b0
mov eax, dword [ebx + 0x35c]
cmp eax, 1
je 0x502664
cmp eax, 2
je 0x502664
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [edi + 0x454]
test eax, eax
je 0x50265a
mov eax, dword [eax + 0x30]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x50265a
mov eax, dword [edi + 0x454]
mov ecx, dword [eax + 0x30]
add eax, 0x2c
push ecx
call dword [sym.imp.USER32.dll_DestroyWindow]
push 0
push edi
call fcn.004f4670
jmp 0x5026e0
lea esi, [esp + 0x14]
call fcn.004e6540
mov byte [esp + 0xe0], 0xe
mov edx, dword [esp + 0x14]
cmp dword [edx - 0xc], 0
je 0x5026d7
push 1
push 0x5cfb30
lea eax, [ebx + 0x360]
push eax
lea eax, [esp + 0x24]
push eax
push ebx
mov ecx, 0x5cfb2c
mov edx, esi
call fcn.0042f3e0
cmp dword [esp + 0x18], 1
je 0x5026d7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [edi + 0x454]
test eax, eax
je 0x5026d7
mov ecx, dword [eax + 0x30]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x5026d7
mov edi, dword [edi + 0x454]
mov edx, dword [edi + 0x30]
add edi, 0x2c
push edx
call dword [sym.imp.USER32.dll_DestroyWindow]
lea ecx, [esp + 0x14]
call fcn.00423d60
lea ecx, [esp + 0x7c]
call fcn.004231c0
lea ecx, [esp + 0x98]
call fcn.004231c0
lea ecx, [esp + 0xb4]
call fcn.004231c0
mov dword [esp + 0xe0], 0xffffffff
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x50274c
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x50274c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [ebx + 0x2b8]
test eax, eax
je 0x50274c
mov eax, dword [eax + 0x30]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x50274c
mov ecx, dword [ebx + 0x2b8]
mov edx, dword [ecx + 0x30]
push edx
call dword [sym.imp.USER32.dll_DestroyWindow]
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret 8