Function at 0x505084
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 0x5059bc
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [0x52e180], 0
je 0x5050d5
xor eax, eax
call fcn.004e7564
mov byte [ebp - 0x21], 0
mov eax, dword [0x526da0]
mov eax, dword [eax]
shr eax, 0x10
cmp eax, 0x600
mov eax, dword [0x5269f4]
setae byte [eax]
xor edx, edx
push ebp
push 0x5058fd
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [0x52e190], 0
je 0x505113
mov dl, 1
mov eax, dword [0x52e190]
call fcn.004b7ae4
cmp byte [0x52e17e], 0
je 0x505180
xor eax, eax
push ebp
push 0x505153
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x52e184], 0
jne 0x50513f
mov eax, 0x5059d8
call fcn.004b85cc
jmp 0x505149
mov eax, dword [0x52e184]
call fcn.004b87b0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x505180
mov eax, 0x505a40
call fcn.004b880c
lea eax, [ebp - 0x2c]
mov ecx, dword [0x52e168]
mov edx, 0x505ab8
call fcn.00406914
mov eax, dword [ebp - 0x2c]
call fcn.004b880c
lea eax, [ebp - 0x30]
mov ecx, dword [0x52e16c]
mov edx, 0x505af8
call fcn.00406914
mov eax, dword [ebp - 0x30]
call fcn.004b880c
lea eax, [ebp - 0x38]
call fcn.00486c7c
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x34]
mov edx, 0x505b24
call fcn.00406914
mov eax, dword [ebp - 0x34]
call fcn.004b880c
call fcn.004e762c
xor eax, eax
call fcn.005049b0
mov dword [0x52e174], eax
mov dl, 1
mov eax, dword [0x503cd8]
call fcn.004bb6c8
mov dword [0x5269a4], eax
mov ecx, dword [0x52e16c]
mov edx, dword [0x52e174]
mov eax, dword [0x5269a4]
call fcn.004be2e8
lea ecx, [ebp - 0x3c]
mov eax, dword [0x5269a4]
mov edx, dword [eax + 0x18]
mov al, 0xb7
call fcn.0048a0b4
mov edx, dword [ebp - 0x3c]
mov eax, 0x52e178
call fcn.00406448
mov eax, dword [0x5269a4]
test byte [eax + 0x1d], 0x20
je 0x50527b
mov eax, dword [0x526ad4]
cmp byte [eax], 0
jne 0x50527b
push 1
push 1
mov eax, dword [0x52e178]
call fcn.004064d4
push eax
mov eax, dword [0x526e7c]
mov eax, dword [eax + 0x2fc]
call fcn.004064d4
mov ecx, 0x30
pop edx
call fcn.004e7f14
call fcn.00419320
mov eax, dword [0x5269a4]
test byte [eax + 0x1d], 1
je 0x5052be
call fcn.00487d2c
test al, al
jne 0x5052be
push 1
push 1
mov eax, dword [0x52e178]
call fcn.004064d4
push eax
mov eax, dword [0x526e7c]
mov eax, dword [eax + 0x1dc]
call fcn.004064d4
mov ecx, 0x30
pop edx
call fcn.004e7f14
call fcn.00419320
mov eax, dword [0x52e174]
xor edx, edx
mov dword [0x52e174], edx
call fcn.00404098
mov al, 2
call fcn.005049b0
mov dword [0x52e174], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov ecx, 0x85050900
mov dx, 0x20
mov eax, dword [0x5269a4]
call fcn.004bbb94
test al, al
jne 0x505303
mov eax, 0x505b64
call fcn.0048b544
cmp dword [0x52e190], 0
je 0x50531e
lea eax, [ebp - 4]
mov edx, dword [0x526d4c]
mov edx, dword [edx]
call fcn.0040532c
jmp 0x505329
lea edx, [ebp - 4]
mov eax, dword [ebp - 0x20]
call fcn.00505024
mov eax, dword [0x5269a4]
cmp byte [eax + 0x10], 0
je 0x505351
mov eax, dword [0x526ad4]
cmp byte [eax], 0
jne 0x505348
mov eax, 0x505bfc
call fcn.0048b544
mov al, 1
call fcn.004e8404
jmp 0x505358
xor eax, eax
call fcn.004e8404
call fcn.004e571c
cmp dword [ebp - 4], 0
je 0x505460
call fcn.004e50f8
call fcn.004e5a54
mov eax, dword [0x526a04]
mov edx, dword [0x52e168]
call fcn.00406448
mov eax, dword [0x526de0]
mov edx, dword [0x5269a4]
mov edx, dword [edx + 0x14]
call fcn.00406448
movzx eax, byte [0x52e17f]
or al, byte [0x52e180]
mov edx, dword [0x526b64]
mov byte [edx], al
mov eax, dword [0x526fd8]
mov edx, dword [ebp - 0x18]
call fcn.00406448
mov eax, dword [0x526c8c]
mov edx, dword [ebp - 0x14]
call fcn.00406448
mov eax, dword [0x526af0]
mov edx, dword [ebp - 0x10]
call fcn.00406448
mov eax, dword [0x526b90]
mov edx, dword [ebp - 0xc]
call fcn.00406448
mov eax, dword [ebp - 8]
test eax, eax
je 0x5053e9
sub eax, 4
mov eax, dword [eax]
mov edx, eax
add edx, edx
mov eax, dword [ebp - 8]
call fcn.00504f6c
mov dl, 1
mov eax, dword [0x5007a4]
call fcn.00500fbc
mov edx, dword [0x526bb4]
mov dword [edx], eax
mov eax, 0x4e7004
mov edx, dword [0x526bb4]
mov edx, dword [edx]
mov dword [edx + 0xc], eax
mov eax, 0x4e721c
mov edx, dword [0x526bb4]
mov edx, dword [edx]
mov dword [edx + 0x10], eax
mov eax, 0x4e7228
mov edx, dword [0x526bb4]
mov edx, dword [edx]
mov dword [edx + 0x14], eax
mov eax, 0x4e7234
mov edx, dword [0x526bb4]
mov edx, dword [edx]
mov dword [edx + 0x18], eax
mov ecx, dword [0x526c50]
mov ecx, dword [ecx]
mov eax, dword [0x526bb4]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
call fcn.005010b4
xor edx, edx
push ebp
push 0x5058a9
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x5057dc
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x526bb4]
cmp dword [eax], 0
je 0x5054ef
xor edx, edx
push ebp
push 0x5054c3
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 [0x526bb4]
mov eax, dword [eax]
mov edx, 0x505c90
call fcn.00501270
pop dword fs:[0]
add esp, 8
jmp 0x5054dc
test al, al
jne 0x5054ef
mov eax, 0x505d20
call fcn.004b880c
call fcn.00419320
cmp byte [0x52e17f], 0
jne 0x505529
cmp byte [0x52e180], 0
jne 0x505529
push 0x124
push 1
push 6
mov eax, dword [0x5269a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x52e178]
mov al, 0x27
call fcn.005040bc
cmp eax, 6
je 0x505529
call fcn.00419320
xor edx, edx
xor eax, eax
call fcn.00504824
jmp 0x505557
push 0x31
push 1
push 2
mov eax, dword [0x5269a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x52e178]
mov al, 0xbd
call fcn.005040bc
dec eax
je 0x505557
call fcn.00419320
mov eax, dword [0x5269a4]
call fcn.004bbbe8
test al, al
jne 0x505534
jmp 0x50557a
push 0xa
call sub.kernel32.dll_Sleep_1
mov eax, dword [0x526e6c]
mov eax, dword [eax]
call fcn.00483ea8
mov eax, dword [0x527058]
cmp byte [eax], 0
jne 0x505567
mov eax, dword [0x5269f4]
mov byte [eax], 0
lea ecx, [ebp - 0x48]
mov eax, dword [0x5269a4]
mov edx, dword [eax + 0x18]
mov al, 0xa7
call fcn.0048a0b4
mov edx, dword [ebp - 0x48]
mov eax, dword [0x526e6c]
mov eax, dword [eax]
mov eax, dword [eax + 0x170]
call fcn.00488580
call fcn.00503f00
xor edx, edx
mov al, 1
call fcn.00504824
call sub.kernel32.dll_GetTickCount_1
mov dword [ebp - 0x28], eax
mov eax, dword [0x5269a4]
mov edx, dword [ebp - 0x28]
mov dword [eax + 0x24], edx
mov ecx, 0x504340
mov dl, 1
mov eax, dword [0x5269a4]
call fcn.004bc9b8
mov byte [ebp - 0x22], al
movzx eax, byte [ebp - 0x22]
mov edx, dword [0x526d94]
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, 0x505d88
call fcn.004b8a90
mov eax, dword [0x5269a4]
cmp byte [eax + 0x1c], 0
jne 0x505625
mov eax, dword [0x5269a4]
test byte [eax + 0x1d], 8
jne 0x505625
xor eax, eax
jmp 0x505627
mov al, 1
mov byte [ebp - 0x23], al
mov eax, dword [0x526bb4]
cmp dword [eax], 0
je 0x5056c5
mov eax, dword [0x526bb4]
mov eax, dword [eax]
mov edx, 0x505db4
call fcn.00501160
test al, al
je 0x5056c5
cmp byte [ebp - 0x23], 0
jne 0x5056bb
xor eax, eax
push ebp
push 0x5056a0
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 [0x526bb4]
mov eax, dword [eax]
mov edx, 0x505db4
call fcn.00501270
test al, al
je 0x505696
mov byte [ebp - 0x23], 1
mov eax, 0x505dd8
call fcn.004b880c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5056c5
mov eax, 0x505eb8
call fcn.004b880c
movzx eax, byte [ebp - 0x23]
mov edx, dword [0x526d94]
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, 0x505f70
call fcn.004b8a90
cmp byte [0x52e180], 0
jne 0x505720
mov eax, dword [0x526e6c]
mov eax, dword [eax]
call fcn.00483ea8
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebp - 0x28]
cmp eax, 0x3e8
jae 0x505720
push 0xff
push 0xa
push 0
push 0
push 0
call sub.user32.dll_MsgWaitForMultipleObjects
jmp 0x5056f1
mov eax, dword [0x526b04]
mov eax, dword [eax]
mov edx, dword [0x526b04]
xor ecx, ecx
mov dword [edx], ecx
call fcn.00404098
mov dl, 1
mov al, 2
call fcn.00504824
cmp byte [ebp - 0x23], 0
jne 0x505780
cmp byte [0x52e17f], 0
jne 0x5057c9
cmp byte [0x52e180], 0
jne 0x5057c9
push 0x10040
push 1
push 1
mov eax, dword [0x5269a4]
mov edx, dword [eax + 0x18]
movzx eax, byte [ebp - 0x22]
movzx eax, byte [eax + 0x5269b0]
mov ecx, dword [0x52e178]
call fcn.005040bc
jmp 0x5057c9
cmp byte [0x52e181], 0
jne 0x5057b9
cmp byte [0x52e180], 0
jne 0x5057b5
push 0x10024
push 1
push 6
mov eax, dword [0x5269a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x52e178]
mov al, 0xbb
call fcn.005040bc
cmp eax, 6
jne 0x5057b9
mov byte [ebp - 0x21], 1
cmp byte [ebp - 0x21], 0
jne 0x5057c9
mov eax, 0x505fb4
call fcn.004b880c
mov dl, 1
mov al, 3
call fcn.00504824
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5057f0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5058b3
xor edx, edx
push ebp
push 0x50582b
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x526b04]
mov eax, dword [eax]
mov edx, dword [0x526b04]
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 0x50583a
mov eax, dword [0x526bb4]
cmp dword [eax], 0
je 0x505896
xor eax, eax
push ebp
push 0x50587d
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 [0x526bb4]
mov eax, dword [eax]
mov edx, 0x506010
call fcn.005011bc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x505896
mov eax, dword [0x526e6c]
mov eax, dword [eax]
mov eax, dword [eax + 0x170]
call fcn.00488610
ret