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

Disassembly:
sub esp, 0x238
mov ecx, dword [0x414edc]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [esp + 0x14]
push edi
xor ebp, ebp
push eax
push ebp
push 0x1005
push ecx
mov byte [esp + 0x23], 0
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], 4
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
call esi
mov ebx, dword [esp + 0x268]
mov edi, dword [esp + 0x254]
test eax, eax
je 0x405376
mov eax, dword [esp + 0x38]
mov ecx, dword [eax]
test ecx, ecx
je 0x4050a9
cmp ecx, 5
je 0x4050a9
cmp dword [eax + 8], edi
jne 0x4050a9
mov edx, dword [esp + 0x260]
mov ecx, dword [eax + 0x42c]
cmp ecx, edx
jne 0x4050a9
mov ecx, dword [esp + 0x264]
mov edx, dword [eax + 0x430]
cmp edx, ecx
jne 0x4050a9
mov edx, dword [esp + 0x25c]
mov ecx, dword [eax + 0x21c]
cmp ecx, edx
jne 0x4050a7
cmp dword [eax + 0x640], ebx
jne 0x4050a7
mov ecx, dword [esp + 0x26c]
mov edx, dword [eax + 0x644]
cmp edx, ecx
jne 0x4050a7
mov edx, dword [esp + 0x258]
mov ecx, dword [eax + 0x10]
cmp ecx, edx
je 0x405359
mov ebp, eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x414edc]
inc eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
push 0
push 0x1005
push ecx
call esi
test eax, eax
jne 0x405035
test ebp, ebp
je 0x405376
cmp dword [ebp + 0x640], ebx
jne 0x4050f4
mov eax, dword [ebp + 0x644]
mov ecx, dword [esp + 0x26c]
cmp eax, ecx
je 0x405239
lea eax, [ebp + 0x435]
push 0x104
push eax
push ebx
push 0
push 1
call fcn.00404a70
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x158]
shl edx, 5
mov byte [ebp + 0x220], al
mov eax, dword [esp + 0x280]
push 0x104
add edx, 0x4114b4
push ecx
push edx
push eax
push 1
call fcn.004045b0
mov edi, 0x4117b0
or ecx, 0xffffffff
xor eax, eax
push 0x104
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [ebp + 0x435]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x170]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [ebp + 0x435]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp + 0x539]
mov ecx, edx
push eax
and ecx, 3
push ebx
push 0
rep movsb byte es:[edi], byte [esi]
push 0
call fcn.00404a70
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x2a8]
shl ecx, 5
lea eax, [esp + 0x180]
push 0x104
add ecx, 0x4114b4
push eax
push ecx
push edx
push 0
call fcn.004045b0
mov edi, 0x4117b0
or ecx, 0xffffffff
xor eax, eax
add esp, 0x50
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [ebp + 0x539]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x144]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [ebp + 0x539]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [0x414ee4]
mov eax, dword [0x415450]
and ecx, 0xff
sub eax, ecx
cmp eax, 4
je 0x405256
cmp eax, 2
jne 0x40525b
mov byte [esp + 0x13], 1
mov dl, byte [esp + 0x24c]
neg dl
sbb edx, edx
and edx, 0xfffffffb
add edx, 5
mov dword [ebp], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x26c]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x25c]
mov dword [ebp + 0x644], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0x21c], eax
mov eax, dword [esp + 0x258]
mov dword [ebp + 0x640], ebx
cmp eax, ecx
je 0x40531c
cmp eax, 0xffffffff
mov dword [ebp + 0x10], eax
je 0x4052e9
lea edx, [esp + 0x40]
push edx
push eax
call fcn.00401510
add esp, 8
test al, al
je 0x4052e9
lea eax, [esp + 0x40]
push 1
push eax
call fcn.00403f40
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4052e9
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.00403f40
add esp, 8
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x250]
mov edx, dword [esp + 0x14]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], edx
je 0x40531c
mov ecx, dword [0x415450]
test ecx, ecx
jne 0x40530b
mov byte [esp + 0x13], 1
mov edx, dword [ebp + 0x10]
lea ecx, [ebp + 0x14]
push ecx
push edx
push eax
call fcn.00404bc0
add esp, 0xc
mov eax, dword [esp + 0x1c]
push eax
push eax
mov eax, dword [0x414edc]
push 0x1015
push eax
call esi
mov al, byte [esp + 0x13]
test al, al
je 0x40534c
mov ecx, dword [0x414edc]
push 0x402cb0
push 0
push 0x1030
push ecx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret
mov edi, dword [eax]
xor edx, edx
cmp edi, 3
pop edi
setne dl
dec edx
pop esi
and edx, 2
pop ebp
mov dword [eax], edx
xor eax, eax
pop ebx
add esp, 0x238
ret
mov ebp, dword [esp + 0x258]
cmp ebp, 0xffffffff
je 0x4053bd
lea edx, [esp + 0x40]
push edx
push ebp
call fcn.00401510
add esp, 8
test al, al
je 0x4053bd
lea eax, [esp + 0x40]
push 1
push eax
call fcn.00403f40
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4053bd
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.00403f40
add esp, 8
mov dword [esp + 0x14], eax
push 0x64c
call fcn.004079b7
mov dl, byte [esp + 0x250]
add esp, 4
neg dl
sbb edx, edx
mov esi, eax
and edx, 0xfffffffe
add edx, 2
mov dword [esi], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x14]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x25c]
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0x250]
mov dword [esi + 0x21c], eax
lea eax, [esi + 0x14]
cmp ecx, 0xffffffff
mov dword [esi + 8], edi
mov dword [esi + 0x10], ebp
mov byte [eax], 0
je 0x40541f
push eax
push ebp
push ecx
call fcn.00404bc0
add esp, 0xc
mov eax, dword [esp + 0x260]
mov ecx, dword [esp + 0x264]
test edi, edi
setne dl
mov dword [esi + 0x640], ebx
mov byte [esi + 0x434], dl
mov edx, dword [esp + 0x26c]
mov dword [esi + 0x42c], eax
neg ebx
sbb ebx, ebx
mov dword [esi + 0x430], ecx
and ebx, edx
push esi
mov dword [esi + 0x644], ebx
mov edx, dword [0x414edc]
push edx
call fcn.00404ca0
mov eax, dword [0x414edc]
add esp, 8
push 0x402cb0
push 0
push 0x1030
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x238
ret