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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
mov ecx, 7
lea eax, [ebp - 0x20]
mov edx, dword [0x4010ac]
call fcn.004071ec
xor eax, eax
push ebp
push 0x505d48
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [0x530180], 0
je 0x505461
xor eax, eax
call fcn.004e78f0
mov byte [ebp - 0x21], 0
mov eax, dword [0x528da0]
mov eax, dword [eax]
shr eax, 0x10
cmp eax, 0x600
mov eax, dword [0x5289f4]
setae byte [eax]
xor edx, edx
push ebp
push 0x505c89
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [0x530190], 0
je 0x50549f
mov dl, 1
mov eax, dword [0x530190]
call fcn.004b7e70
cmp byte [0x53017e], 0
je 0x50550c
xor eax, eax
push ebp
push 0x5054df
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x530184], 0
jne 0x5054cb
mov eax, 0x505d64
call fcn.004b8958
jmp 0x5054d5
mov eax, dword [0x530184]
call fcn.004b8b3c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x50550c
mov eax, 0x505dcc
call fcn.004b8b98
lea eax, [ebp - 0x2c]
mov ecx, dword [0x530168]
mov edx, 0x505e44
call fcn.00406914
mov eax, dword [ebp - 0x2c]
call fcn.004b8b98
lea eax, [ebp - 0x30]
mov ecx, dword [0x53016c]
mov edx, 0x505e84
call fcn.00406914
mov eax, dword [ebp - 0x30]
call fcn.004b8b98
lea eax, [ebp - 0x38]
call fcn.00487008
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x34]
mov edx, 0x505eb0
call fcn.00406914
mov eax, dword [ebp - 0x34]
call fcn.004b8b98
call fcn.004e79b8
xor eax, eax
call fcn.00504d3c
mov dword [0x530174], eax
mov dl, 1
mov eax, dword [0x504064]
call fcn.004bba54
mov dword [0x5289a4], eax
mov ecx, dword [0x53016c]
mov edx, dword [0x530174]
mov eax, dword [0x5289a4]
call fcn.004be674
lea ecx, [ebp - 0x3c]
mov eax, dword [0x5289a4]
mov edx, dword [eax + 0x18]
mov al, 0xb7
call fcn.0048a440
mov edx, dword [ebp - 0x3c]
mov eax, 0x530178
call fcn.00406448
mov eax, dword [0x5289a4]
test byte [eax + 0x1d], 0x20
je 0x505607
mov eax, dword [0x528ad4]
cmp byte [eax], 0
jne 0x505607
push 1
push 1
mov eax, dword [0x530178]
call fcn.004064d4
push eax
mov eax, dword [0x528e7c]
mov eax, dword [eax + 0x2fc]
call fcn.004064d4
mov ecx, 0x30
pop edx
call fcn.004e82a0
call fcn.004196ac
mov eax, dword [0x5289a4]
test byte [eax + 0x1d], 1
je 0x50564a
call fcn.004880b8
test al, al
jne 0x50564a
push 1
push 1
mov eax, dword [0x530178]
call fcn.004064d4
push eax
mov eax, dword [0x528e7c]
mov eax, dword [eax + 0x1dc]
call fcn.004064d4
mov ecx, 0x30
pop edx
call fcn.004e82a0
call fcn.004196ac
mov eax, dword [0x530174]
xor edx, edx
mov dword [0x530174], edx
call fcn.00404098
mov al, 2
call fcn.00504d3c
mov dword [0x530174], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov ecx, 0x85050900
mov dx, 0x20
mov eax, dword [0x5289a4]
call fcn.004bbf20
test al, al
jne 0x50568f
mov eax, 0x505ef0
call fcn.0048b8d0
cmp dword [0x530190], 0
je 0x5056aa
lea eax, [ebp - 4]
mov edx, dword [0x528d4c]
mov edx, dword [edx]
call fcn.0040532c
jmp 0x5056b5
lea edx, [ebp - 4]
mov eax, dword [ebp - 0x20]
call fcn.005053b0
mov eax, dword [0x5289a4]
cmp byte [eax + 0x10], 0
je 0x5056dd
mov eax, dword [0x528ad4]
cmp byte [eax], 0
jne 0x5056d4
mov eax, 0x505f88
call fcn.0048b8d0
mov al, 1
call fcn.004e8790
jmp 0x5056e4
xor eax, eax
call fcn.004e8790
call fcn.004e5aa8
cmp dword [ebp - 4], 0
je 0x5057ec
call fcn.004e5484
call fcn.004e5de0
mov eax, dword [0x528a04]
mov edx, dword [0x530168]
call fcn.00406448
mov eax, dword [0x528de0]
mov edx, dword [0x5289a4]
mov edx, dword [edx + 0x14]
call fcn.00406448
movzx eax, byte [0x53017f]
or al, byte [0x530180]
mov edx, dword [0x528b64]
mov byte [edx], al
mov eax, dword [0x528fd8]
mov edx, dword [ebp - 0x18]
call fcn.00406448
mov eax, dword [0x528c8c]
mov edx, dword [ebp - 0x14]
call fcn.00406448
mov eax, dword [0x528af0]
mov edx, dword [ebp - 0x10]
call fcn.00406448
mov eax, dword [0x528b90]
mov edx, dword [ebp - 0xc]
call fcn.00406448
mov eax, dword [ebp - 8]
test eax, eax
je 0x505775
sub eax, 4
mov eax, dword [eax]
mov edx, eax
add edx, edx
mov eax, dword [ebp - 8]
call fcn.005052f8
mov dl, 1
mov eax, dword [0x500b30]
call fcn.00501348
mov edx, dword [0x528bb4]
mov dword [edx], eax
mov eax, 0x4e7390
mov edx, dword [0x528bb4]
mov edx, dword [edx]
mov dword [edx + 0xc], eax
mov eax, 0x4e75a8
mov edx, dword [0x528bb4]
mov edx, dword [edx]
mov dword [edx + 0x10], eax
mov eax, 0x4e75b4
mov edx, dword [0x528bb4]
mov edx, dword [edx]
mov dword [edx + 0x14], eax
mov eax, 0x4e75c0
mov edx, dword [0x528bb4]
mov edx, dword [edx]
mov dword [edx + 0x18], eax
mov ecx, dword [0x528c50]
mov ecx, dword [ecx]
mov eax, dword [0x528bb4]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
call fcn.00501440
xor edx, edx
push ebp
push 0x505c35
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x505b68
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x528bb4]
cmp dword [eax], 0
je 0x50587b
xor edx, edx
push ebp
push 0x50584f
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
push 0
push 1
xor eax, eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea ecx, [ebp - 0x44]
mov eax, dword [0x528bb4]
mov eax, dword [eax]
mov edx, 0x50601c
call fcn.005015fc
pop dword fs:[0]
add esp, 8
jmp 0x505868
test al, al
jne 0x50587b
mov eax, 0x5060ac
call fcn.004b8b98
call fcn.004196ac
cmp byte [0x53017f], 0
jne 0x5058b5
cmp byte [0x530180], 0
jne 0x5058b5
push 0x124
push 1
push 6
mov eax, dword [0x5289a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x530178]
mov al, 0x27
call fcn.00504448
cmp eax, 6
je 0x5058b5
call fcn.004196ac
xor edx, edx
xor eax, eax
call fcn.00504bb0
jmp 0x5058e3
push 0x31
push 1
push 2
mov eax, dword [0x5289a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x530178]
mov al, 0xbd
call fcn.00504448
dec eax
je 0x5058e3
call fcn.004196ac
mov eax, dword [0x5289a4]
call fcn.004bbf74
test al, al
jne 0x5058c0
jmp 0x505906
push 0xa
call sub.kernel32.dll_Sleep_1
mov eax, dword [0x528e6c]
mov eax, dword [eax]
call fcn.00484234
mov eax, dword [0x529058]
cmp byte [eax], 0
jne 0x5058f3
mov eax, dword [0x5289f4]
mov byte [eax], 0
lea ecx, [ebp - 0x48]
mov eax, dword [0x5289a4]
mov edx, dword [eax + 0x18]
mov al, 0xa7
call fcn.0048a440
mov edx, dword [ebp - 0x48]
mov eax, dword [0x528e6c]
mov eax, dword [eax]
mov eax, dword [eax + 0x170]
call fcn.0048890c
call fcn.0050428c
xor edx, edx
mov al, 1
call fcn.00504bb0
call sub.kernel32.dll_GetTickCount_1
mov dword [ebp - 0x28], eax
mov eax, dword [0x5289a4]
mov edx, dword [ebp - 0x28]
mov dword [eax + 0x24], edx
mov ecx, 0x5046cc
mov dl, 1
mov eax, dword [0x5289a4]
call fcn.004bcd44
mov byte [ebp - 0x22], al
movzx eax, byte [ebp - 0x22]
mov edx, dword [0x528d94]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea edx, [ebp - 0x44]
xor ecx, ecx
mov eax, 0x506114
call fcn.004b8e1c
mov eax, dword [0x5289a4]
cmp byte [eax + 0x1c], 0
jne 0x5059b1
mov eax, dword [0x5289a4]
test byte [eax + 0x1d], 8
jne 0x5059b1
xor eax, eax
jmp 0x5059b3
mov al, 1
mov byte [ebp - 0x23], al
mov eax, dword [0x528bb4]
cmp dword [eax], 0
je 0x505a51
mov eax, dword [0x528bb4]
mov eax, dword [eax]
mov edx, 0x506140
call fcn.005014ec
test al, al
je 0x505a51
cmp byte [ebp - 0x23], 0
jne 0x505a47
xor eax, eax
push ebp
push 0x505a2c
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
push 0
xor eax, eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea ecx, [ebp - 0x44]
mov eax, dword [0x528bb4]
mov eax, dword [eax]
mov edx, 0x506140
call fcn.005015fc
test al, al
je 0x505a22
mov byte [ebp - 0x23], 1
mov eax, 0x506164
call fcn.004b8b98
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x505a51
mov eax, 0x506244
call fcn.004b8b98
movzx eax, byte [ebp - 0x23]
mov edx, dword [0x528d94]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea edx, [ebp - 0x44]
xor ecx, ecx
mov eax, 0x5062fc
call fcn.004b8e1c
cmp byte [0x530180], 0
jne 0x505aac
mov eax, dword [0x528e6c]
mov eax, dword [eax]
call fcn.00484234
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebp - 0x28]
cmp eax, 0x3e8
jae 0x505aac
push 0xff
push 0xa
push 0
push 0
push 0
call sub.user32.dll_MsgWaitForMultipleObjects
jmp 0x505a7d
mov eax, dword [0x528b04]
mov eax, dword [eax]
mov edx, dword [0x528b04]
xor ecx, ecx
mov dword [edx], ecx
call fcn.00404098
mov dl, 1
mov al, 2
call fcn.00504bb0
cmp byte [ebp - 0x23], 0
jne 0x505b0c
cmp byte [0x53017f], 0
jne 0x505b55
cmp byte [0x530180], 0
jne 0x505b55
push 0x10040
push 1
push 1
mov eax, dword [0x5289a4]
mov edx, dword [eax + 0x18]
movzx eax, byte [ebp - 0x22]
movzx eax, byte [eax + 0x5289b0]
mov ecx, dword [0x530178]
call fcn.00504448
jmp 0x505b55
cmp byte [0x530181], 0
jne 0x505b45
cmp byte [0x530180], 0
jne 0x505b41
push 0x10024
push 1
push 6
mov eax, dword [0x5289a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x530178]
mov al, 0xbb
call fcn.00504448
cmp eax, 6
jne 0x505b45
mov byte [ebp - 0x21], 1
cmp byte [ebp - 0x21], 0
jne 0x505b55
mov eax, 0x506340
call fcn.004b8b98
mov dl, 1
mov al, 3
call fcn.00504bb0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x505b7c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x505c3f
xor edx, edx
push ebp
push 0x505bb7
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x528b04]
mov eax, dword [eax]
mov edx, dword [0x528b04]
xor ecx, ecx
mov dword [edx], ecx
call fcn.00404098
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x505bc6
mov eax, dword [0x528bb4]
cmp dword [eax], 0
je 0x505c22
xor eax, eax
push ebp
push 0x505c09
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
xor eax, eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea ecx, [ebp - 0x44]
mov eax, dword [0x528bb4]
mov eax, dword [eax]
mov edx, 0x50639c
call fcn.00501548
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x505c22
mov eax, dword [0x528e6c]
mov eax, dword [eax]
mov eax, dword [eax + 0x170]
call fcn.0048899c
ret