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

Disassembly:
sub esp, 0x3c
mov eax, dword [0x4adb4c]
push ebx
mov dword [esp + 0x28], eax
mov al, byte [0x4adb5e]
or al, byte [0x4ad9f7]
push ebp
push esi
push edi
mov dword [esp + 0x1c], edx
mov byte [esp + 0x13], al
jne 0x408125
xor dl, dl
xor cl, cl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
jmp fcn.00408df0
mov esi, dword [0x4adb14]
test esi, esi
jne 0x408298
push 0x1400
call fcn.0048578d
add esp, 4
mov dword [0x4adb14], eax
test eax, eax
je 0x40828c
push 0x2800
call fcn.0048578d
add esp, 4
mov dword [0x4adb10], eax
test eax, eax
je 0x40828c
push 0x20000
call fcn.0048578d
add esp, 4
mov dword [0x4adb20], eax
test eax, eax
je 0x40828c
push 0x40000
call fcn.0048578d
mov ebp, eax
add esp, 4
mov dword [0x4adb1c], ebp
test ebp, ebp
je 0x40828c
mov ecx, dword [0x4adb50]
add ecx, ecx
push ecx
call fcn.00484535
mov ebx, eax
add esp, 4
mov dword [0x4adb18], ebx
test ebx, ebx
je 0x40828c
push 0x1400
push esi
mov esi, dword [0x4adb14]
push esi
call fcn.0048e820
mov edi, dword [0x4adb10]
push 0x2800
push 0
push edi
call fcn.0048e820
mov byte [esi + 0x15c], 3
add esp, 0x18
mov byte [esi + 0xcb0], 1
mov byte [esi + 0xcc4], 2
mov byte [esi + 0x170], 0xc
mov byte [esi + 0xcd8], 4
mov byte [esi + 0xcec], 8
mov byte [esi + 0x148], 0x30
mov byte [esi + 0xc88], 0x10
mov byte [esi + 0xc9c], 0x20
mov byte [esi + 0x724], 0x40
mov byte [esi + 0x738], 0x80
mov byte [edi + 0x24c], 1
mov byte [edi + 0x164c], 2
mov byte [edi + 0x468], 4
mov byte [edi + 0x1868], 8
mov byte [edi + 0x350], 0x10
mov byte [edi + 0x1840], 0x20
mov byte [edi + 0x1b24], 0x40
mov byte [edi + 0x1b38], 0x80
mov dword [esi + 0xb54], 0x4aa1e8
mov dword [esi + 0x190], 0x4aa1ec
mov dword [esi + 0xb40], 0x4aa258
jmp 0x4082aa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
jmp fcn.004094e0
mov edi, dword [0x4adb10]
mov ebp, dword [0x4adb1c]
mov ebx, dword [0x4adb18]
lea eax, [esi + 9]
mov ecx, 0x100
mov esi, 0x7fff
jmp 0x4082c0
and byte [eax + 3], 8
lea eax, [eax + 0x14]
mov word [eax - 0x17], si
mov word [eax - 0x14], 0
mov byte [eax - 0x12], 0
mov byte [eax - 0xa], 0
dec ecx
jne 0x4082c0
lea eax, [edi + 9]
mov ecx, 0x200
and byte [eax + 3], 8
lea eax, [eax + 0x14]
mov word [eax - 0x17], si
mov word [eax - 0x14], 0
mov byte [eax - 0x12], 0
mov byte [eax - 0xa], 0
dec ecx
jne 0x4082e4
mov ecx, 0x4aa1f4
mov edx, 0x1ff
lea ebx, [ebx]
movzx eax, word [ecx]
test ax, ax
je 0x408325
cmp ax, dx
ja 0x408325
lea eax, [eax + eax*4]
mov byte [edi + eax*4 + 0x13], 1
add ecx, 8
cmp ecx, 0x4aa25c
jl 0x408310
mov edi, dword [0x4adb20]
mov eax, 0x7fff7fff
mov ecx, 0x8000
rep stosd dword es:[edi], eax
mov ecx, 0x10000
mov edi, ebp
rep stosd dword es:[edi], eax
xor eax, eax
cmp dword [0x4adb50], eax
jle 0x408362
mov word [ebx + eax*2], si
inc eax
cmp eax, dword [0x4adb50]
jl 0x408355
mov eax, dword [0x4ab8fc]
xor ecx, ecx
mov edx, 0xc
movzx eax, word [eax]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048578d
mov dword [esp + 0x30], eax
xor ebp, ebp
add esp, 4
mov dword [esp + 0x24], ebp
mov dword [eax], 0
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [esp + 0x1c], eax
jle 0x408b03
mov ecx, dword [esp + 0x2c]
mov edi, dword [0x4adb14]
add ecx, 6
mov ebx, dword [0x4adb10]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
mov edi, edi
mov edx, dword [esp + 0x34]
mov esi, dword [edx + eax*4]
mov al, byte [esi + 0x12]
test al, al
je 0x408610
cmp al, 4
jae 0x408610
cmp byte [0x4ad2a3], 0
je 0x4083fe
mov ecx, esi
call fcn.00404d20
mov edi, dword [0x4adb14]
mov ebx, dword [0x4adb10]
test al, al
je 0x40860c
cmp word [esi + 6], 0
je 0x408455
cmp byte [esi + 0x19], 0
sete al
test al, al
jne 0x40860c
mov al, byte [esi + 0x10]
test al, al
jne 0x408426
cmp word [esi + 8], 0
je 0x40860c
cmp al, 0xff
ja 0x40860c
movzx ecx, word [esi + 8]
mov edx, 0x1ff
cmp cx, dx
ja 0x40860c
test al, al
jne 0x408472
mov eax, ecx
lea eax, [eax + eax*4]
lea ebp, [ebx + eax*4]
mov byte [ebp + 0x13], 1
jmp 0x40854f
mov eax, dword [esi + 0x20]
test eax, eax
je 0x40860c
cmp byte [eax + 0x1c], 0
jne 0x408414
mov eax, dword [eax + 8]
test eax, eax
jne 0x408460
jmp 0x40860c
movzx ecx, al
lea eax, [ecx + ecx*4]
lea ebp, [edi + eax*4]
sub ecx, 0x10
je 0x408511
dec ecx
je 0x4084d1
dec ecx
jne 0x40854f
mov byte [edi + 0xcda], 1
mov byte [edi + 0xcee], 1
mov byte [ebx + 0x46a], 1
mov byte [ebx + 0x186a], 1
cmp byte [esi + 0x16], cl
je 0x40854f
mov byte [edi + 0xcdb], 1
mov byte [edi + 0xcef], 1
mov byte [ebx + 0x46b], 1
mov byte [ebx + 0x186b], 1
jmp 0x40854f
mov byte [edi + 0xcb2], 1
mov byte [edi + 0xcc6], 1
mov byte [ebx + 0x24e], 1
mov byte [ebx + 0x164e], 1
cmp byte [esi + 0x16], 0
je 0x40854f
mov byte [edi + 0xcb3], 1
mov byte [edi + 0xcc7], 1
mov byte [ebx + 0x24f], 1
mov byte [ebx + 0x164f], 1
jmp 0x40854f
mov byte [edi + 0xc8a], 1
mov byte [edi + 0xc9e], 1
mov byte [ebx + 0x352], 1
mov byte [ebx + 0x1842], 1
cmp byte [esi + 0x16], 0
je 0x40854f
mov byte [edi + 0xc8b], 1
mov byte [edi + 0xc9f], 1
mov byte [ebx + 0x353], 1
mov byte [ebx + 0x1843], 1
mov byte [ebp + 0xa], 1
cmp byte [esi + 0x16], 0
movzx edx, word [esi + 4]
mov dword [esp + 0x28], edx
je 0x40856f
or edx, 0x8000
mov byte [ebp + 0xb], 1
mov dword [esp + 0x28], edx
mov cl, byte [esi + 0x11]
test cl, cl
jne 0x408581
cmp word [esi + 0xa], 0
jne 0x408581
xor al, al
jmp 0x408583
mov al, 1
cmp byte [ebp + 8], 0
je 0x4086f4
cmp byte [esi + 0xf], 0
jne 0x4086f4
test al, al
jne 0x4086fc
test byte [esi + 0x13], 2
jne 0x4085ba
mov dx, word [esi + 8]
mov cl, byte [esi + 0x10]
push 0
call fcn.00407fa0
mov edx, dword [esp + 0x2c]
add esp, 4
cmp byte [esi + 0xf], 0
jne 0x4085ca
test byte [esi + 0x13], 2
je 0x4085ca
or byte [ebp + 0xc], 1
movzx eax, word [esi + 6]
test ax, ax
jne 0x4085d6
movzx eax, dx
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
inc ebp
mov dword [esp + 0x24], ebp
mov word [ecx + 4], ax
mov al, byte [esi + 0x10]
mov byte [ecx], al
mov ax, word [esi + 8]
mov word [ecx + 2], ax
mov eax, dword [esi]
mov dword [ecx - 6], eax
mov al, byte [esi + 0xe]
mov byte [ecx - 2], al
mov al, byte [esi + 0x15]
mov byte [ecx - 1], al
add ecx, 0xc
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, ecx
jl 0x4083c0
test ebp, ebp
je 0x408b03
mov ebx, dword [esp + 0x2c]
push 0x407e50
push 0xc
push ebp
push ebx
call fcn.004857a0
add esp, 0x10
test ebp, ebp
jle 0x408b03
mov ecx, dword [0x4adb20]
lea edx, [ebx + 0xa]
mov esi, dword [0x4adb1c]
mov ebp, dword [0x4adb18]
add esi, 0x270
mov dword [esp + 0x48], esi
lea eax, [ecx + 0x14a]
mov dword [esp + 0x30], 8
mov dword [esp + 0x3c], eax
mov eax, 0xfffffeb6
sub eax, ecx
mov dword [esp + 0x38], 0xc0
mov dword [esp + 0x44], eax
lea ebx, [ebx]
movzx eax, word [edx]
mov ebx, dword [edx - 0xa]
mov ecx, eax
shr ecx, 0xf
and eax, 0x7fff
and ecx, 0xffffff01
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], ecx
mov edi, ebx
mov cl, byte [edx - 6]
mov dword [esp + 0x18], ebx
test cl, cl
je 0x4086e3
xor eax, eax
test cl, 0xc0
cmovne eax, dword [esp + 0x30]
test cl, 0xc
je 0x4086cd
or eax, 1
test cl, 0x30
je 0x4086d5
or eax, 4
test cl, 3
je 0x4086dd
or eax, 2
or edi, eax
mov dword [esp + 0x18], edi
cmp byte [edx - 5], 0
je 0x408827
xor cl, cl
jmp 0x40884d
test al, al
je 0x4085ba
test cl, cl
je 0x4087cd
movzx eax, cl
lea eax, [eax + eax*4]
cmp byte [edi + eax*4 + 8], 0
lea eax, [edi + eax*4]
je 0x4087b5
mov al, cl
sub al, 0x10
cmp al, 2
movzx eax, cl
ja 0x4087ab
sub eax, 0x10
je 0x408786
dec eax
je 0x40875e
dec eax
jne 0x40880e
mov byte [edi + 0x171], 2
mov byte [edi + 0xcd9], 2
mov byte [edi + 0xced], 2
mov byte [ebx + 0x469], 2
mov byte [ebx + 0x1869], 2
jmp 0x40880e
mov byte [edi + 0x15d], 2
mov byte [edi + 0xcb1], 2
mov byte [edi + 0xcc5], 2
mov byte [ebx + 0x24d], 2
mov byte [ebx + 0x164d], 2
jmp 0x40880e
mov byte [edi + 0x149], 2
mov byte [edi + 0xc89], 2
mov byte [edi + 0xc9d], 2
mov byte [ebx + 0x351], 2
mov byte [ebx + 0x1841], 2
jmp 0x40880e
lea eax, [eax + eax*4]
mov byte [edi + eax*4 + 9], 1
jmp 0x40880e
mov byte [eax + 9], 1
test byte [esi + 0x13], 1
je 0x40880e
movzx eax, byte [esi + 0x11]
lea eax, [eax + eax*4]
or byte [edi + eax*4 + 0xc], 1
jmp 0x40880e
movzx ecx, word [esi + 0xa]
mov eax, ecx
lea eax, [eax + eax*4]
cmp byte [ebx + eax*4 + 8], 0
lea eax, [ebx + eax*4]
je 0x4087ec
mov eax, ecx
lea eax, [eax + eax*4]
mov byte [ebx + eax*4 + 9], 1
jmp 0x40880e
mov byte [eax + 9], 1
test byte [esi + 0x13], 1
je 0x408802
movzx eax, word [esi + 0xa]
lea eax, [eax + eax*4]
or byte [ebx + eax*4 + 0xc], 1
movzx eax, word [esi + 0xa]
lea eax, [eax + eax*4]
mov byte [ebx + eax*4 + 0x13], 1
movzx eax, word [ebp + 6]
mov word [esi + 0xc], ax
movzx eax, word [esi + 4]
mov word [ebp + 6], ax
mov ebp, dword [esp + 0x24]
jmp 0x40860c
xor al, al
test bl, 8
movzx eax, al
cmovne eax, dword [esp + 0x38]
test bl, 1
je 0x40883b
or al, 0xc
test bl, 2
je 0x408842
or al, 3
test bl, 4
je 0x408849
or al, 0x30
or cl, al
not cl
movzx eax, cl
xor ebx, ebx
mov dword [esp + 0x14], esi
xor ecx, ecx
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], esi
lea esp, [esp]
test dword [esp + 0x40], ebx
jne 0x408ac8
xor eax, eax
test bl, 0xc0
cmovne eax, dword [esp + 0x30]
test bl, 0xc
je 0x40888c
or eax, 1
test bl, 0x30
je 0x408894
or eax, 4
test bl, 3
je 0x40889c
or eax, 2
and eax, edi
cmp edi, eax
jne 0x408ac4
mov al, byte [edx - 6]
test al, al
je 0x4088c0
movzx ecx, al
mov eax, ecx
and eax, ebx
cmp ecx, eax
mov ecx, dword [esp + 0x20]
jne 0x408ac4
mov al, byte [edx - 4]
test al, al
jne 0x40896c
movzx eax, word [edx - 2]
add eax, dword [esp + 0x44]
add eax, esi
mov esi, dword [0x4adb1c]
lea edi, [esi + eax*2]
mov eax, 0x7fff
movzx esi, word [edi]
cmp si, ax
jne 0x4088fa
mov ax, word [edx]
mov word [edi], ax
mov esi, dword [esp + 0x1c]
jmp 0x408ac0
mov eax, esi
shr eax, 0xf
and al, 1
cmp byte [esp + 0x34], 0
je 0x408923
test al, al
jne 0x408942
mov ax, word [edx]
and esi, 0x7fff
mov word [ebp + esi*2], ax
mov esi, dword [esp + 0x1c]
jmp 0x408ac0
test al, al
je 0x408942
mov eax, dword [esp + 0x28]
movzx eax, ax
mov word [ebp + eax*2], si
mov ax, word [edx]
mov esi, dword [esp + 0x1c]
mov word [edi], ax
jmp 0x408ac0
mov eax, dword [esp + 0x28]
and esi, 0x7fff
movzx ecx, ax
movzx eax, word [ebp + esi*2]
mov esi, dword [esp + 0x1c]
mov word [ebp + ecx*2], ax
movzx eax, word [edx]
mov ecx, dword [esp + 0x20]
mov word [edi], ax
jmp 0x408ac0
mov esi, dword [0x4adb20]
movzx eax, al
add eax, ecx
lea edi, [esi + eax*2]
mov eax, 0x7fff
movzx esi, word [edi]
cmp si, ax
jne 0x40898c
mov ax, word [edx]
jmp 0x4089c0
mov eax, esi
shr eax, 0xf
and al, 1
cmp byte [esp + 0x34], 0
je 0x4089e3
test al, al
je 0x40890c
mov eax, dword [esp + 0x28]
and esi, 0x7fff
movzx ecx, ax
movzx eax, word [ebp + esi*2]
mov word [ebp + ecx*2], ax
movzx eax, word [edx]
mov ecx, dword [esp + 0x20]
mov word [edi], ax
movzx eax, byte [edx - 4]
add eax, 0xfffffff0
cmp eax, 0x95
ja case.0x4089dc.19
movzx eax, byte [eax + 0x408c94]
jmp dword [eax*4 + 0x408c78]
test al, al
je 0x4089a2
mov eax, dword [esp + 0x28]
movzx eax, ax
mov word [ebp + eax*2], si
mov ax, word [edx]
jmp 0x4089c0
mov esi, dword [esp + 0x1c]
movzx eax, word [edx]
mov edi, dword [esp + 0x14]
mov word [esi - 2], ax
movzx eax, word [edx]
mov word [edi - 0x200], ax
cmp byte [edx - 4], 0xa4
je 0x408ac0
movzx eax, word [edx]
mov word [esi], ax
movzx eax, word [edx]
mov word [edi], ax
jmp 0x408ac0
mov esi, dword [esp + 0x1c]
movzx eax, word [edx]
mov edi, dword [esp + 0x14]
mov word [esi], ax
movzx eax, word [edx]
mov word [edi], ax
jmp 0x408ac0
mov esi, dword [esp + 0x1c]
movzx eax, word [edx]
mov edi, dword [esp + 0x14]
mov word [esi - 0xa], ax
movzx eax, word [edx]
mov word [edi - 0x21c], ax
cmp byte [edx - 4], 0xa0
je 0x408ac0
movzx eax, word [edx]
mov word [esi - 8], ax
movzx eax, word [edx]
mov word [edi - 4], ax
jmp 0x408ac0
mov esi, dword [esp + 0x1c]
movzx eax, word [edx]
mov edi, dword [esp + 0x14]
mov word [esi - 8], ax
movzx eax, word [edx]
mov word [edi - 4], ax
jmp 0x408ac0
mov esi, dword [esp + 0x1c]
movzx eax, word [edx]
mov edi, dword [esp + 0x14]
mov word [esi - 6], ax
movzx eax, word [edx]
mov word [edi - 0x236], ax
cmp byte [edx - 4], 0xa2
je 0x408ac0
jmp 0x408ab2
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
movzx eax, word [edx]
mov word [esi - 4], ax
movzx eax, word [edx]
mov word [edi - 0x36], ax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
add ecx, 0x100
add esi, 0x200
add eax, 0x400
mov dword [esp + 0x20], ecx
inc ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], eax
cmp ecx, 0xff00
jle 0x408870
mov esi, dword [esp + 0x48]
add edx, 0xc
dec dword [esp + 0x24]
jne 0x408690
push dword [esp + 0x2c]
call fcn.00485ba7
mov ecx, dword [0x4adb14]
add esp, 4
mov ebx, 0x7fff
cmp byte [ecx + 0x14a], 0
je 0x408b84
movzx edi, word [ecx + 0x146]
cmp di, bx
je 0x408b84
movzx edx, word [ecx + 0xc86]
lea eax, [ecx + 0xc86]
cmp dx, bx
je 0x408b58
mov esi, dword [0x4adb4c]
movzx eax, dx
mov eax, dword [esi + eax*4]
add eax, 0xc
movzx edx, word [eax]
cmp dx, bx
jne 0x408b47
mov word [eax], di
lea eax, [ecx + 0xc9a]
movzx edx, word [eax]
cmp dx, bx
je 0x408b81
mov esi, dword [0x4adb4c]
nop
movzx eax, dx
mov eax, dword [esi + eax*4]
add eax, 0xc
movzx edx, word [eax]
cmp dx, bx
jne 0x408b70
mov word [eax], di
cmp byte [ecx + 0x15e], 0
je 0x408bf4
movzx edi, word [ecx + 0x15a]
cmp di, bx
je 0x408bf4
movzx edx, word [ecx + 0xcae]
lea eax, [ecx + 0xcae]
cmp dx, bx
je 0x408bc2
mov esi, dword [0x4adb4c]
movzx eax, dx
mov eax, dword [esi + eax*4]
add eax, 0xc
movzx edx, word [eax]
cmp dx, bx
jne 0x408bb1
mov word [eax], di
lea eax, [ecx + 0xcc2]
movzx edx, word [eax]
cmp dx, bx
je 0x408bf1
mov esi, dword [0x4adb4c]
lea esp, [esp]
movzx eax, dx
mov eax, dword [esi + eax*4]
add eax, 0xc
movzx edx, word [eax]
cmp dx, bx
jne 0x408be0
mov word [eax], di
cmp byte [ecx + 0x172], 0
je 0x408c64
movzx edi, word [ecx + 0x16e]
cmp di, bx
je 0x408c64
movzx edx, word [ecx + 0xcd6]
lea eax, [ecx + 0xcd6]
cmp dx, bx
je 0x408c32
mov esi, dword [0x4adb4c]
movzx eax, dx
mov eax, dword [esi + eax*4]
add eax, 0xc
movzx edx, word [eax]
cmp dx, bx
jne 0x408c21
mov word [eax], di
lea eax, [ecx + 0xcea]
movzx ecx, word [eax]
cmp cx, bx
je 0x408c61
mov edx, dword [0x4adb4c]
lea esp, [esp]
movzx eax, cx
mov eax, dword [edx + eax*4]
add eax, 0xc
movzx ecx, word [eax]
cmp cx, bx
jne 0x408c50
mov word [eax], di
xor dl, dl
mov cl, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
jmp fcn.00408df0