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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov ebx, edx
mov esi, eax
mov eax, dword [0x68fdf8]
cmp dword [eax], 0
je 0x506ad8
mov eax, dword [0x68f8bc]
mov eax, dword [eax]
mov dword [eax + 4], ebx
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
cmp byte [eax + 0x37], 0
je 0x5063c5
cmp byte [ebx + 0x17], 0x1e
jne 0x5061a0
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0xc]
call fcn.005b5e80
movzx edi, al
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebx + 0xc]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x50612d
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
sub eax, dword [ebx + 0x10]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x50612d
cmp byte [ebx + 0x4d], 0
jne 0x50612d
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x5060c5
mov eax, esi
call fcn.0050d890
test al, al
je 0x5060c5
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
movzx eax, byte [eax + 0x14]
cmp edi, eax
je 0x5060c5
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
push eax
push edi
push 0
push 0
push 0
push 0
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov dx, 1
call fcn.005a09f8
jmp 0x506ad8
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x506ad8
mov eax, esi
call fcn.0050d890
test al, al
je 0x506ad8
mov eax, dword [0x68f8d4]
xor edx, edx
mov dword [eax], edx
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x68f830]
sub eax, dword [edx]
cmp eax, 0x7d0
jbe 0x506ad8
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x68f830]
mov dword [edx], eax
push 0
push 0
push 0
push 0
mov ecx, dword [ebx + 4]
mov edx, 0x7d
mov eax, esi
call fcn.0050a8f8
jmp 0x506ad8
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebx + 0xc]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jg 0x50616b
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
sub eax, dword [ebx + 0x10]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jg 0x50616b
cmp byte [ebx + 0x4d], 0
jne 0x50616b
mov eax, dword [0x690450]
mov byte [eax], 0
jmp 0x506173
mov eax, dword [0x690450]
mov byte [eax], 1
push esp
lea eax, [esp + 8]
push eax
mov ecx, edi
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
call fcn.005b5fe0
mov eax, dword [0x68fee0]
mov edx, dword [esp]
mov dword [eax], edx
mov eax, dword [0x68fdd4]
mov edx, dword [esp + 4]
mov dword [eax], edx
jmp 0x506ad8
mov eax, dword [0x68fafc]
cmp byte [eax + 0xbf3], 0x21
jne 0x506ad8
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0xc]
call fcn.005b5e80
movzx edi, al
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebx + 0xc]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x506282
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
sub eax, dword [ebx + 0x10]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x506282
cmp byte [ebx + 0x4d], 0
jne 0x506282
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x506270
mov eax, esi
call fcn.0050d890
test al, al
je 0x506270
mov eax, esi
call fcn.0050d93c
test al, al
je 0x506270
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
push eax
push edi
push 0
push 0
push 0
push 0
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov dx, 0xb
call fcn.005a09f8
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690438]
mov dword [edx], eax
mov eax, dword [0x68fa90]
mov dword [eax], 0xffffffff
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690060]
mov dword [edx], eax
jmp 0x506ad8
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0xc]
call fcn.005b5d04
test al, al
je 0x506352
cmp byte [ebx + 0x4d], 0
jne 0x506352
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0xc]
call fcn.005b5cd8
cmp eax, 2
jg 0x506352
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x506340
mov eax, esi
call fcn.0050d890
test al, al
je 0x506340
mov eax, esi
call fcn.0050d93c
test al, al
je 0x506340
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
push eax
push edi
push 0
push 0
push 0
push 0
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov dx, 0xb
call fcn.005a09f8
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690438]
mov dword [edx], eax
mov eax, dword [0x68fa90]
mov dword [eax], 0xffffffff
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690060]
mov dword [edx], eax
jmp 0x506ad8
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebx + 0xc]
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
jg 0x506390
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
sub eax, dword [ebx + 0x10]
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
jg 0x506390
cmp byte [ebx + 0x4d], 0
jne 0x506390
mov eax, dword [0x690450]
mov byte [eax], 0
jmp 0x506398
mov eax, dword [0x690450]
mov byte [eax], 1
push esp
lea eax, [esp + 8]
push eax
mov ecx, edi
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
call fcn.005b5fe0
mov eax, dword [0x68fee0]
mov edx, dword [esp]
mov dword [eax], edx
mov eax, dword [0x68fdd4]
mov edx, dword [esp + 4]
mov dword [eax], edx
jmp 0x506ad8
mov ebp, 7
mov eax, dword [0x68fafc]
cmp byte [eax + 0xfb], 6
jne 0x5063dd
mov ebp, 8
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0xc]
call fcn.005b5e80
movzx edi, al
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebx + 0xc]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x506819
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
sub eax, dword [ebx + 0x10]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x506819
cmp byte [ebx + 0x4d], 0
jne 0x506819
cmp byte [ebx + 0x17], 0x1e
jne 0x506506
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x50649e
mov eax, esi
call fcn.0050d890
test al, al
je 0x50649e
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
movzx eax, byte [eax + 0x14]
cmp edi, eax
je 0x50649e
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
push eax
push edi
push 0
push 0
push 0
push 0
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov dx, 1
call fcn.005a09f8
jmp 0x506807
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x506807
mov eax, esi
call fcn.0050d890
test al, al
je 0x506807
mov eax, dword [0x68f8d4]
xor edx, edx
mov dword [eax], edx
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x68f830]
sub eax, dword [edx]
cmp eax, 0x7d0
jbe 0x506807
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x68f830]
mov dword [edx], eax
push 0
push 0
push 0
push 0
mov ecx, dword [ebx + 4]
mov edx, 0x7d
mov eax, esi
call fcn.0050a8f8
jmp 0x506807
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x506807
mov eax, esi
call fcn.0050d890
test al, al
je 0x506807
mov eax, esi
call fcn.0050d93c
test al, al
je 0x506807
mov eax, dword [0x68ffcc]
cmp byte [eax], 0
je 0x50657d
mov eax, dword [0x68ffcc]
mov byte [eax], 0
mov ebp, 0x11
mov eax, dword [0x68fac4]
mov byte [eax + 0x9d45], 0
mov ax, 0x6e
call fcn.0058ab0c
mov eax, dword [0x68fa90]
cmp dword [eax], 0x6e
jne 0x5067c3
mov eax, dword [0x68fa90]
mov dword [eax], 0xffffffff
jmp 0x5067c3
mov eax, dword [0x68fbc8]
cmp byte [eax], 0
je 0x5065c7
mov eax, dword [0x68fbc8]
mov byte [eax], 0
mov ebp, 0x13
mov eax, dword [0x68fac4]
mov byte [eax + 0xa021], 0
mov ax, 0x70
call fcn.0058ab0c
mov eax, dword [0x68fa90]
cmp dword [eax], 0x70
jne 0x5067c3
mov eax, dword [0x68fa90]
mov dword [eax], 0xffffffff
jmp 0x5067c3
mov eax, dword [0x68f6fc]
cmp byte [eax], 0
je 0x506611
mov eax, dword [0x68f6fc]
mov byte [eax], 0
mov ebp, 0x14
mov eax, dword [0x68fac4]
mov byte [eax + 0xa18f], 0
mov ax, 0x71
call fcn.0058ab0c
mov eax, dword [0x68fa90]
cmp dword [eax], 0x71
jne 0x5067c3
mov eax, dword [0x68fa90]
mov dword [eax], 0xffffffff
jmp 0x5067c3
mov eax, dword [0x68fc54]
cmp byte [eax], 0
je 0x506642
mov eax, dword [0x68fc54]
mov byte [eax], 0
mov ebp, 0x15
mov eax, dword [0x68fac4]
mov byte [eax + 0xae6d], 0
mov ax, 0x7a
call fcn.0058ab0c
jmp 0x5067c3
mov eax, dword [0x6901c4]
cmp byte [eax], 0
je 0x506673
mov eax, dword [0x6901c4]
mov byte [eax], 0
mov ebp, 0x87
mov eax, dword [0x68fac4]
mov byte [eax + 0x3d7b], 0
mov ax, 0x2b
call fcn.0058ab0c
jmp 0x5067c3
mov eax, dword [0x68f9c4]
cmp byte [eax], 0
je 0x5066a4
mov eax, dword [0x68f9c4]
mov byte [eax], 0
mov ebp, 0x16
mov eax, dword [0x68fac4]
mov byte [eax + 0x5011], 0
mov ax, 0x38
call fcn.0058ab0c
jmp 0x5067c3
mov eax, dword [0x69009c]
cmp byte [eax], 0
je 0x5066e6
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
cmp word [eax + 0x89], 7
jb 0x5066e6
mov eax, dword [0x69009c]
mov byte [eax], 0
mov ebp, 0xd
mov eax, dword [0x68fac4]
mov byte [eax + 0x252d], 0
mov ax, 0x1a
call fcn.0058ab0c
jmp 0x5067c3
mov eax, dword [0x68fe60]
cmp byte [eax], 0
je 0x506702
mov eax, dword [0x68fe60]
mov byte [eax], 0
mov ebp, 0xa
jmp 0x5067c3
mov eax, dword [0x68fd7c]
cmp byte [eax], 0
je 0x50672f
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
cmp word [eax + 0x89], 0xa
jb 0x50672f
mov eax, dword [0x68fd7c]
mov byte [eax], 0
mov ebp, 0x10
jmp 0x5067c3
mov eax, dword [0x68fe08]
cmp byte [eax], 0
je 0x50674a
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
cmp word [eax + 0x89], 3
jae 0x506773
mov eax, dword [0x68f954]
cmp byte [eax + 0x27], 0
je 0x50677a
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
cmp word [eax + 0x89], 3
jb 0x50677a
mov edx, edi
mov eax, esi
call fcn.00505b50
test al, al
je 0x50677a
mov ebp, 0xc
jmp 0x5067c3
mov eax, dword [0x6901f0]
cmp byte [eax], 0
je 0x50679c
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
cmp word [eax + 0x89], 6
jb 0x50679c
mov ebp, 0xe
jmp 0x5067c3
mov eax, dword [0x68f954]
cmp byte [eax + 0x26], 0
jne 0x5067be
mov eax, dword [0x68fcc4]
cmp byte [eax], 0
je 0x5067c3
mov edx, edi
mov eax, esi
call fcn.00505abc
test al, al
je 0x5067c3
mov ebp, 0xb
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
push eax
push edi
push 0
push 0
push 0
push 0
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, ebp
call fcn.005a09f8
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690438]
mov dword [edx], eax
mov eax, dword [0x68fa90]
mov dword [eax], 0xffffffff
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690060]
mov dword [edx], eax
jmp 0x506ad8
xor ebp, ebp
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0xc]
call fcn.005b5d04
test al, al
je 0x506a66
cmp byte [ebx + 0x4d], 0
jne 0x506a66
cmp byte [ebx + 0x17], 0x1e
je 0x506a66
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebx + 0xc]
call fcn.005b5cd8
mov dword [esp + 8], eax
mov eax, esi
call fcn.0050d8f4
test al, al
je 0x506a4a
mov eax, esi
call fcn.0050d890
test al, al
je 0x506a4a
mov eax, esi
call fcn.0050d93c
test al, al
je 0x506a4a
cmp dword [esp + 8], 4
jg 0x5068ea
mov eax, dword [0x6901c4]
cmp byte [eax], 0
je 0x5068ea
mov eax, dword [0x68f998]
cmp byte [eax], 0
je 0x5068ea
mov eax, dword [0x6901c4]
mov byte [eax], 0
mov ebp, 0x87
mov eax, dword [0x68fac4]
mov byte [eax + 0x3d7b], 0
mov ax, 0x2b
call fcn.0058ab0c
jmp 0x5069fe
cmp dword [esp + 8], 4
jg 0x506922
mov eax, dword [0x68f9c4]
cmp byte [eax], 0
je 0x506922
mov eax, dword [0x68f9c4]
mov byte [eax], 0
mov ebp, 0x16
mov eax, dword [0x68fac4]
mov byte [eax + 0x5011], 0
mov ax, 0x38
call fcn.0058ab0c
jmp 0x5069fe
cmp dword [esp + 8], 3
jg 0x506973
mov eax, dword [0x68fbc8]
cmp byte [eax], 0
je 0x506973
mov eax, dword [0x68fbc8]
mov byte [eax], 0
mov ebp, 0x13
mov eax, dword [0x68fac4]
mov byte [eax + 0xa021], 0
mov ax, 0x70
call fcn.0058ab0c
mov eax, dword [0x68fa90]
cmp dword [eax], 0x70
jne 0x5069fe
mov eax, dword [0x68fa90]
mov dword [eax], 0xffffffff
jmp 0x5069fe
cmp dword [esp + 8], 2
jg 0x5069a8
mov eax, dword [0x6901c4]
cmp byte [eax], 0
je 0x5069a8
mov eax, dword [0x6901c4]
mov byte [eax], 0
mov ebp, 0x87
mov eax, dword [0x68fac4]
mov byte [eax + 0x3d7b], 0
mov ax, 0x2b
call fcn.0058ab0c
jmp 0x5069fe
cmp dword [esp + 8], 2
jg 0x5069dd
mov eax, dword [0x68fc54]
cmp byte [eax], 0
je 0x5069dd
mov eax, dword [0x68fc54]
mov byte [eax], 0
mov ebp, 0x15
mov eax, dword [0x68fac4]
mov byte [eax + 0xae6d], 0
mov ax, 0x7a
call fcn.0058ab0c
jmp 0x5069fe
cmp dword [esp + 8], 2
jg 0x5069fe
mov eax, dword [0x68fcc4]
cmp byte [eax], 0
je 0x5069fe
mov eax, dword [0x68f954]
cmp byte [eax + 0x37], 0
je 0x5069fe
mov ebp, 0xb
test ebp, ebp
je 0x506a66
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
push eax
push edi
push 0
push 0
push 0
push 0
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov edx, ebp
call fcn.005a09f8
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690438]
mov dword [edx], eax
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x690060]
mov dword [edx], eax
jmp 0x506a66
cmp dword [esp + 8], 2
jg 0x506a66
mov eax, dword [0x68fcc4]
cmp byte [eax], 0
je 0x506a66
mov eax, dword [0x68f954]
cmp byte [eax + 0x37], 0
jne 0x506ad8
test ebp, ebp
jne 0x506ad8
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebx + 0xc]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jg 0x506aa8
mov eax, dword [0x68fdf8]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
sub eax, dword [ebx + 0x10]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jg 0x506aa8
cmp byte [ebx + 0x4d], 0
jne 0x506aa8
mov eax, dword [0x690450]
mov byte [eax], 0
jmp 0x506ab0
mov eax, dword [0x690450]
mov byte [eax], 1
push esp
lea eax, [esp + 8]
push eax
mov ecx, edi
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
call fcn.005b5fe0
mov eax, dword [0x68fee0]
mov edx, dword [esp]
mov dword [eax], edx
mov eax, dword [0x68fdd4]
mov edx, dword [esp + 4]
mov dword [eax], edx
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret