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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xe0]
add eax, 0x800
mov ecx, 0x8000
mov dword [ebp + 0xe4], eax
mov edi, dword [ebp + 0x210]
or eax, 0xffffffff
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0xe0]
mov edi, dword [ebp + 0x210]
mov esi, dword [ebp + 0x218]
mov edx, ecx
add edi, 0x800
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0xe0]
xor ecx, ecx
test eax, eax
jle 0x40d737
mov edx, dword [ebp + 0x218]
cmp byte [edx + ecx], 0xff
jne 0x40d727
inc ecx
cmp ecx, eax
jl 0x40d71c
cmp ecx, 0x10000
mov dword [esp + 0x14], 0x10000
jg 0x40d73b
mov dword [esp + 0x14], ecx
mov ebx, dword [ebp + 0x210]
mov edi, eax
mov eax, 0x1b4e81b5
mov dword [esp + 0x10], edi
mov word [ebx], 0xa55a
mov ecx, dword [ebp + 0xc8]
imul ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [ebx + 0xa], dl
mov cl, byte [ebp + 0xd0]
mov byte [ebx + 0xb], cl
mov edx, dword [ebp + 0x100]
shl edx, 5
mov ax, word [edx + 0x41b418]
push eax
call fcn.00401050
mov word [ebx + 0xc], ax
mov ecx, dword [ebp + 0x100]
shl ecx, 5
mov dx, word [ecx + 0x41b41a]
push edx
call fcn.00401050
mov word [ebx + 0xe], ax
mov byte [ebx + 0x10], 0
mov byte [ebx + 0x11], 0
mov byte [ebx + 0x12], 0
mov byte [ebx + 0x13], 0
mov eax, dword [ebp + 0xdc]
push eax
call fcn.00401030
mov dword [ebx + 0x14], eax
mov ecx, dword [ebp + 0xf8]
push ecx
call fcn.00401030
mov dword [ebx + 0x18], eax
mov al, byte [ebx + 0x10]
or al, 0x20
mov byte [ebx + 0x10], al
mov edx, dword [ebp + 0x14c]
push edx
call fcn.00401030
mov dword [ebx + 0x1c], eax
mov ecx, dword [ebp + 0x224]
lea eax, [ebx + 0x20]
add esp, 0x14
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp + 0x100]
shl edx, 5
mov eax, dword [edx + 0x41b410]
mov ecx, eax
and ecx, 0x3fc000
cmp ecx, 0xb4000
jb 0x40d831
test al, 8
jne 0x40d831
mov byte [ebx + 0x23], 0xff
mov al, byte [ebp + 0x27]
test al, al
je 0x40d857
mov al, byte [ebx + 0x10]
lea edi, [ebx + 0x300]
or al, 1
mov ecx, 0x40
mov byte [ebx + 0x10], al
mov esi, dword [ebp + 0x220]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x10]
mov al, byte [ebp + 0x1f]
test al, al
je 0x40d862
or byte [ebx + 0x10], 2
mov edx, dword [ebp + 0x224]
test byte [edx + 0x10], 1
jne 0x40d8cc
mov al, byte [ebx + 0x10]
or al, 4
mov byte [ebx + 0x10], al
mov ecx, dword [ebp + 0x224]
test byte [ecx + 0x10], 2
jne 0x40d88b
and eax, 0xff
or al, 8
jmp 0x40d892
and eax, 0xff
and al, 0xf7
mov byte [ebx + 0x10], al
mov edx, dword [ebp + 0x224]
test byte [edx + 0x10], 4
jne 0x40d8aa
and eax, 0xff
or al, 0x10
jmp 0x40d8b1
and eax, 0xff
and al, 0xef
mov byte [ebx + 0x10], al
mov eax, dword [ebp + 0x224]
mov cl, byte [eax + 0x11]
mov byte [ebx + 0x30], cl
mov edx, dword [ebp + 0x224]
mov al, byte [edx + 0x12]
mov byte [ebx + 0x31], al
mov eax, dword [ebp + 0xd4]
test eax, eax
je 0x40d8da
or byte [ebx + 0x10], 0x40
mov ecx, dword [ebp + 0x100]
shl ecx, 5
test byte [ecx + 0x41b410], 0x20
je 0x40d8f0
or byte [ebx + 0x10], 0x80
mov dl, byte [ebp + 0xf0]
mov byte [ebx + 0x32], dl
mov eax, dword [ebp + 0x100]
shl eax, 5
mov ecx, dword [eax + 0x41b410]
shr ecx, 0xe
mov byte [ebx + 0x33], cl
mov al, byte [ebp + 0x29]
test al, al
je 0x40d982
mov eax, dword [ebp + 0x78]
mov esi, dword [esp + 0x14]
cmp esi, eax
jl 0x40d926
mov esi, eax
mov dword [esp + 0x14], esi
mov edx, dword [ebp + 0x80]
add eax, edx
cmp edi, eax
jg 0x40d938
mov edi, eax
mov dword [esp + 0x10], edi
mov dl, byte [ebx + 0x11]
or dl, 1
mov byte [ebx + 0x11], dl
mov eax, dword [ebp + 0x78]
push eax
call fcn.00401030
mov dword [ebx + 0x34], eax
mov cl, byte [ebp + 0x80]
lea edx, [ebp + 0x38]
push 0x10
lea eax, [ebx + 0x40]
push edx
push eax
mov byte [ebx + 0x3c], cl
call section..text
lea ecx, [ebp + 0x58]
push 0x10
lea edx, [ebx + 0x60]
push ecx
push edx
call section..text
mov al, byte [ebp + 0x88]
add esp, 0x1c
mov byte [ebx + 0x3e], al
jmp 0x40d986
mov esi, dword [esp + 0x14]
mov al, byte [ebp + 0x2a]
test al, al
je 0x40d9f4
mov eax, dword [ebp + 0x7c]
cmp esi, eax
jl 0x40d99a
mov esi, eax
mov dword [esp + 0x14], esi
mov ecx, dword [ebp + 0x84]
add eax, ecx
cmp edi, eax
jg 0x40d9ac
mov edi, eax
mov dword [esp + 0x10], edi
mov cl, byte [ebx + 0x11]
or cl, 2
mov byte [ebx + 0x11], cl
mov edx, dword [ebp + 0x7c]
push edx
call fcn.00401030
lea ecx, [ebp + 0x48]
mov dword [ebx + 0x38], eax
mov al, byte [ebp + 0x84]
push 0x10
lea edx, [ebx + 0x50]
push ecx
push edx
mov byte [ebx + 0x3d], al
call section..text
lea eax, [ebp + 0x68]
push 0x10
lea ecx, [ebx + 0x70]
push eax
push ecx
call section..text
mov dl, byte [ebp + 0x8c]
add esp, 0x1c
mov byte [ebx + 0x3f], dl
mov al, byte [ebp + 0x21]
test al, al
je 0x40d9ff
or byte [ebx + 0x11], 4
mov al, byte [ebp + 0x22]
test al, al
jne 0x40da0a
or byte [ebx + 0x12], 4
mov al, byte [ebp + 0x28]
test al, al
jne 0x40da15
or byte [ebx + 0x11], 0x10
mov al, byte [ebp + 0x23]
test al, al
je 0x40da20
or byte [ebx + 0x12], 8
mov al, byte [ebp + 0x24]
test al, al
jne 0x40da2b
or byte [ebx + 0x12], 0x10
mov eax, dword [ebp + 0x100]
shl eax, 5
test byte [eax + 0x41b410], 4
je 0x40da41
or byte [ebx + 0x12], 0x20
mov cl, byte [ebp + 0xd8]
mov byte [ebx + 0x80], cl
mov al, byte [ebp + 0x30]
test al, al
je 0x40db4a
mov eax, dword [ebp + 0xb8]
cmp esi, eax
jl 0x40da66
mov dword [esp + 0x14], eax
mov edx, dword [ebp + 0xb4]
add eax, edx
cmp edi, eax
jg 0x40da76
mov dword [esp + 0x10], eax
mov al, byte [ebx + 0x11]
or al, 0x40
mov byte [ebx + 0x11], al
mov ecx, dword [ebp + 0xa0]
mov eax, 0x1b4e81b5
imul ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [ebx + 0xa3], dl
mov ecx, dword [ebp + 0xac]
cmp ecx, 0x20
jle 0x40daab
mov ecx, 0x20
mov byte [ebx + 0xa4], cl
mov esi, dword [ebp + 0x228]
and ecx, 0xff
lea edi, [ebx + 0xa5]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0xb4]
cmp eax, 0x800
jle 0x40dae3
mov eax, 0x800
push eax
mov word [ebx + 0xe5], ax
call fcn.00401050
mov word [ebx + 0xe5], ax
mov eax, dword [ebp + 0xb8]
push eax
call fcn.00401030
mov dword [ebx + 0xe7], eax
mov ecx, dword [ebp + 0xb0]
add esp, 8
cmp ecx, 0x1f
jle 0x40db1c
mov ecx, 0x1f
mov byte [ebx + 0xc5], cl
mov esi, dword [ebp + 0x22c]
and ecx, 0xff
lea edi, [ebx + 0xc6]
mov edx, ecx
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 [esp + 0x14]
mov edi, dword [esp + 0x10]
mov al, byte [ebp + 0xa7a]
test al, al
jne 0x40db76
mov al, byte [ebp + 0xa7b]
test al, al
jne 0x40db76
mov al, byte [ebp + 0xa7c]
test al, al
jne 0x40db76
mov al, byte [ebp + 0xa7d]
test al, al
je 0x40dcb4
mov cl, byte [ebx + 0x11]
or cl, 8
mov byte [ebx + 0x11], cl
mov al, byte [ebp + 0xa7e]
mov byte [ebx + 0xeb], al
mov cl, byte [ebp + 0xa7f]
mov byte [ebx + 0xec], cl
mov dl, byte [ebp + 0xa80]
mov byte [ebx + 0xed], dl
mov al, byte [ebp + 0xa81]
lea ecx, [ebp + 0xa82]
mov byte [ebx + 0xee], al
lea edx, [ebx + 0xef]
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp + 0xa92]
push edx
call fcn.00401030
mov dword [ebx + 0xff], eax
mov eax, dword [ebp + 0xa96]
push eax
call fcn.00401030
mov dword [ebx + 0x103], eax
mov ecx, dword [ebp + 0xa9a]
push ecx
call fcn.00401030
mov dword [ebx + 0x107], eax
mov edx, dword [ebp + 0xa9e]
push edx
call fcn.00401030
mov dword [ebx + 0x10b], eax
mov al, byte [ebp + 0xa7a]
add esp, 0x10
test al, al
je 0x40dc43
mov eax, dword [ebp + 0xa92]
cmp esi, eax
jl 0x40dc36
mov esi, eax
mov dword [esp + 0x14], esi
add eax, 7
cmp edi, eax
jg 0x40dc43
mov edi, eax
mov dword [esp + 0x10], edi
mov al, byte [ebp + 0xa7b]
test al, al
je 0x40dc6a
mov eax, dword [ebp + 0xa96]
cmp esi, eax
jl 0x40dc5d
mov esi, eax
mov dword [esp + 0x14], esi
add eax, 7
cmp edi, eax
jg 0x40dc6a
mov edi, eax
mov dword [esp + 0x10], edi
mov al, byte [ebp + 0xa7c]
test al, al
je 0x40dc91
mov eax, dword [ebp + 0xa9a]
cmp esi, eax
jl 0x40dc84
mov esi, eax
mov dword [esp + 0x14], esi
add eax, 7
cmp edi, eax
jg 0x40dc91
mov edi, eax
mov dword [esp + 0x10], edi
mov al, byte [ebp + 0xa7d]
test al, al
je 0x40dcb4
mov eax, dword [ebp + 0xa9e]
cmp esi, eax
jl 0x40dca9
mov dword [esp + 0x14], eax
add eax, 7
cmp edi, eax
jg 0x40dcb4
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x100]
shl eax, 5
mov ecx, dword [eax + 0x41b41c]
push ecx
call fcn.00401030
mov dword [ebx + 0x10f], eax
mov eax, dword [ebp + 0x100]
shl eax, 5
mov edx, dword [eax + 0x41b420]
mov edi, dword [eax + 0x41b41c]
add edx, edi
push edx
call fcn.00401030
mov dword [ebx + 0x113], eax
mov eax, dword [ebp + 0x150]
add esp, 8
cmp eax, 0x10
jle 0x40dd05
mov eax, 0x10
mov cl, 0xa
imul cl
mov byte [ebx + 0x117], al
mov al, byte [ebp + 0xaa2]
test al, al
je 0x40dd73
mov dl, byte [ebp + 0xaa4]
lea esi, [ebp + 0xaac]
mov byte [ebx + 0x118], dl
mov al, byte [ebp + 0xaa8]
mov byte [ebx + 0x119], al
mov ecx, dword [ebp + 0xaa4]
mov edx, ecx
lea edi, [ebx + 0x11a]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xaa8]
lea esi, [ebp + 0xbac]
mov eax, ecx
lea edi, [ebx + 0x15a]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40dd81
mov byte [ebx + 0x118], 0
mov byte [ebx + 0x119], 0
mov ecx, dword [ebp + 0x224]
test byte [ecx + 0xf], 2
je 0x40ddce
mov eax, dword [ebp + 0x100]
shl eax, 5
mov ecx, dword [eax + 0x41b410]
and ecx, 0x3fc000
cmp ecx, 0xb4000
jae 0x40ddbc
mov eax, dword [eax + 0x41b41c]
mov edx, dword [esp + 0x10]
cmp edx, eax
jg 0x40ddbc
mov dword [esp + 0x10], eax
cmp ecx, 0x64000
jb 0x40ddca
or byte [ebx + 0x11], 0x80
jmp 0x40ddce
or byte [ebx + 0x12], 1
mov al, byte [ebp + 0x31]
test al, al
je 0x40ddfd
mov eax, dword [ebp + 0x100]
shl eax, 5
test byte [eax + 0x41b410], 8
je 0x40ddf9
mov edx, dword [eax + 0x41b428]
sub edx, 0x800
mov dword [ebx + 0x113], edx
or byte [ebx + 0x12], 2
mov al, byte [ebp + 0x164]
mov esi, dword [esp + 0x10]
mov byte [ebx + 0x19a], al
mov cl, byte [ebp + 0x168]
mov byte [ebx + 0x19b], cl
mov dl, byte [ebp + 0x16c]
mov byte [ebx + 0x19c], dl
mov eax, dword [ebp + 0x218]
push 0
push esi
push eax
mov ecx, ebp
call fcn.004017e0
push eax
call fcn.00401050
mov word [ebx + 4], ax
mov ecx, dword [ebp + 0x100]
lea eax, [esi + 0x7f]
mov edi, dword [esp + 0x18]
cdq
and edx, 0x7f
push 3
add eax, edx
push 0x42d708
shl ecx, 5
mov esi, eax
and edi, 0xfffffe00
mov edx, dword [ecx + 0x41b414]
sar esi, 7
push edx
shl esi, 7
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0x10
test eax, eax
je 0x40de93
mov eax, dword [ebp + 0x100]
shl eax, 5
cmp word [eax + 0x41b418], 0xf55f
jne 0x40deb2
mov eax, dword [ebp + 0x100]
xor ecx, ecx
shl eax, 5
mov cl, byte [eax + 0x41b42c]
mov eax, dword [eax + 0x41b41c]
sub eax, ecx
cmp esi, eax
jl 0x40deb2
mov esi, eax
push esi
call fcn.00401030
push edi
mov dword [ebx + 6], eax
call fcn.00401030
add esp, 8
mov dword [ebx + 0x19d], eax
mov edx, dword [ebp + 0x210]
mov ecx, ebp
push 4
push 0x3fc
push edx
call fcn.004017e0
push eax
call fcn.00401050
add esp, 4
add esi, 0x800
mov word [ebx + 2], ax
mov ecx, ebp
push 0x1f5a
mov dword [ebp + 0xe4], esi
call fcn.00401690
push eax
push ebp
call fcn.004016d0
add esp, 8
mov ecx, ebp
push 0
push 0
call fcn.00401790
mov eax, dword [ebp + 0xe4]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x10], eax
mov byte [ebp + 0x650], 0xf4
jle 0x40e088
jmp 0x40df3a
mov eax, dword [esp + 0x10]
mov cl, byte [ebp + 0x1d]
test cl, cl
je 0x40df53
cmp eax, 0x38
jge 0x40df4c
mov byte [esp + 0x14], al
jmp 0x40df63
mov byte [esp + 0x14], 0x38
jmp 0x40df63
cmp eax, 0x80
mov byte [esp + 0x14], al
jl 0x40df63
mov byte [esp + 0x14], 0x80
test cl, cl
je 0x40df81
mov eax, dword [ebp + 0x210]
mov esi, dword [esp + 0x14]
add eax, ebx
mov ecx, ebp
push eax
push esi
push ebx
push 0x49
call fcn.0040fc60
jmp 0x40dfce
mov esi, dword [ebp + 0x210]
mov ecx, ebx
shr ecx, 0x10
xor edx, edx
mov byte [ebp + 0x651], cl
mov dl, bh
add esi, ebx
lea edi, [ebp + 0x654]
mov ecx, 0x20
mov byte [ebp + 0x652], dl
mov byte [ebp + 0x653], bl
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
mov ecx, ebp
mov eax, esi
and eax, 0xff
add eax, 4
push eax
lea eax, [ebp + 0x650]
push eax
call fcn.00401ca0
push 0x7d0
mov ecx, ebp
call fcn.004020d0
push 1
push 0
mov ecx, ebp
call fcn.00401e40
mov al, byte [ebp + 0x1b]
test al, al
je 0x40e0db
mov ecx, ebp
call fcn.004020f0
test al, al
jne 0x40e0e8
lea ecx, [ebp + 0x250]
push 1
push ecx
mov ecx, ebp
call fcn.00401e40
test al, al
je 0x40dfe5
mov al, byte [ebp + 0x1d]
test al, al
je 0x40e03d
mov ecx, dword [ebp + 0x1a0]
test ecx, ecx
jne 0x40e0f5
test al, al
je 0x40e03d
cmp byte [ebp + 0x250], 0x54
je 0x40e05e
test al, al
jne 0x40e0f5
mov dl, byte [ebp + 0x250]
mov al, byte [ebp + 0x650]
cmp dl, al
jne 0x40e0f5
cmp byte [ebp + 0x251], 0x54
jne 0x40e0f5
mov eax, dword [ebp + 0xe4]
mov ecx, ebp
push eax
push ebx
call fcn.00401790
mov ecx, dword [esp + 0x10]
mov eax, esi
and eax, 0xff
sub ecx, eax
add ebx, eax
test ecx, ecx
mov dword [esp + 0x10], ecx
jg 0x40df36
push 0
push 0
mov ecx, ebp
call fcn.00401790
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x1c], 0
sub eax, ebx
sub esp, 8
mov dword [esp + 0x20], eax
mov ecx, ebp
fild qword [esp + 0x20]
fmul dword [0x424044]
fstp qword [esp]
push 0x1f57
call fcn.00401690
push eax
push ebp
call fcn.004016d0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret