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

Disassembly:
sub esp, 0x5c
mov al, byte [0x4e8fee]
or al, byte [0x4e8f97]
push ebp
mov ebp, dword [0x4e8fdc]
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], ebp
mov byte [esp + 9], al
jne 0x412180
xor dl, dl
xor cl, cl
pop ebp
add esp, 0x5c
jmp fcn.00412e30
push ebx
push esi
mov esi, dword [0x4ea7a8]
push edi
test esi, esi
jne 0x4122c6
push 0x1400
call fcn.0049bd9a
push 0x2800
mov dword [0x4ea7a8], eax
call fcn.0049bd9a
push 0x20000
mov dword [0x4ea7ac], eax
call fcn.0049bd9a
push 0x40000
mov dword [0x4ea79c], eax
call fcn.0049bd9a
mov dword [0x4ea7a0], eax
mov eax, dword [0x4e8fe0]
add eax, eax
push eax
call fcn.0049f50d
mov ebx, eax
add esp, 0x14
mov dword [0x4ea7a4], ebx
test ebx, ebx
je 0x4122ba
push 0x1400
push esi
mov esi, dword [0x4ea7a8]
push esi
call fcn.0049dd00
mov edi, dword [0x4ea7ac]
push 0x2800
push 0
push edi
call fcn.0049dd00
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], 0x4e4c14
mov dword [esi + 0x190], 0x4e4c18
mov dword [esi + 0xb40], 0x4e4c1c
jmp 0x4122d2
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x5c
jmp fcn.00413570
mov edi, dword [0x4ea7ac]
mov ebx, dword [0x4ea7a4]
lea eax, [esi + 9]
mov ecx, 0x100
mov edx, 0x7fff
nop
and byte [eax + 3], 8
lea eax, [eax + 0x14]
mov word [eax - 0x17], dx
mov word [eax - 0x14], 0
mov byte [eax - 0x12], 0
mov byte [eax - 0xa], 0
sub ecx, 1
jne 0x4122e0
lea eax, [edi + 9]
mov ecx, 0x200
nop word [eax + eax]
and byte [eax + 3], 8
lea eax, [eax + 0x14]
mov word [eax - 0x17], dx
mov word [eax - 0x14], 0
mov byte [eax - 0x12], 0
mov byte [eax - 0xa], 0
sub ecx, 1
jne 0x412310
mov ecx, 0x4e4854
mov esi, 0x1fe
nop dword [eax + eax]
movzx edx, word [ecx]
lea eax, [edx - 1]
cmp ax, si
ja 0x412355
mov eax, edx
lea eax, [eax + eax*4]
mov byte [edi + eax*4 + 0x13], 1
add ecx, 8
cmp ecx, 0x4e48bc
jl 0x412340
mov edi, dword [0x4ea79c]
mov eax, 0x7fff7fff
mov ecx, 0x8000
rep stosd dword es:[edi], eax
mov edi, dword [0x4ea7a0]
mov ecx, 0x10000
rep stosd dword es:[edi], eax
xor eax, eax
cmp dword [0x4e8fe0], eax
jle 0x41239d
mov ecx, 0x7fff
nop
mov word [ebx + eax*2], cx
inc eax
cmp eax, dword [0x4e8fe0]
jl 0x412390
movzx eax, word [0x4e8fec]
xor ecx, ecx
mov edx, 0xc
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0049bd9a
mov dword [esp + 0x48], eax
add esp, 4
xor eax, eax
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x24], eax
jle 0x412c62
mov ecx, dword [esp + 0x44]
mov ebx, dword [0x4ea7a8]
add ecx, 6
mov edi, dword [0x4ea7ac]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x48], 0x1ff
nop dword [eax]
mov esi, dword [ebp + eax*4]
mov al, byte [esi + 0x12]
test al, al
je 0x4126bd
cmp al, 4
jae 0x4126bd
cmp byte [0x4e8e0d], 0
je 0x412457
cmp word [esi + 6], 0
lea ecx, [esi + 6]
mov dword [esp + 0x3c], ecx
jne 0x4126b9
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4126b9
nop dword [eax]
cmp byte [eax + 0x21], 0
jne 0x412452
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x412440
jmp 0x4126b9
mov eax, dword [esi + 0x20]
jmp 0x412495
cmp word [esi + 6], 0
lea eax, [esi + 6]
mov dword [esp + 0x3c], eax
je 0x41248a
cmp byte [esi + 0x19], 0
je 0x4126bd
mov cl, byte [esi + 0x10]
test cl, cl
jne 0x4124a7
cmp word [esi + 8], 0
lea edx, [esi + 8]
mov dword [esp + 0x40], edx
je 0x4126b9
jmp 0x4124b0
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4126bd
cmp byte [eax + 0x20], 0
jne 0x41246f
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x412495
jmp 0x4126b9
lea eax, [esi + 8]
mov edx, eax
mov dword [esp + 0x40], eax
movzx eax, word [edx]
mov ebp, eax
cmp ax, word [esp + 0x48]
ja 0x4126b5
test cl, cl
jne 0x4124d3
lea eax, [eax + eax*4]
lea ebp, [edi + eax*4]
mov byte [ebp + 0x13], 1
jmp 0x4125b7
movzx ecx, cl
lea eax, [ecx + ecx*4]
lea ebp, [ebx + eax*4]
sub ecx, 0x10
je 0x412579
sub ecx, 1
je 0x412539
sub ecx, 1
jne 0x4125b7
mov byte [ebx + 0xcda], 1
mov byte [ebx + 0xcee], 1
mov byte [edi + 0x46a], 1
mov byte [edi + 0x186a], 1
cmp byte [esi + 0x16], cl
je 0x4125b7
mov byte [ebx + 0xcdb], 1
mov byte [ebx + 0xcef], 1
mov byte [edi + 0x46b], 1
mov byte [edi + 0x186b], 1
jmp 0x4125b7
mov byte [ebx + 0xcb2], 1
mov byte [ebx + 0xcc6], 1
mov byte [edi + 0x24e], 1
mov byte [edi + 0x164e], 1
cmp byte [esi + 0x16], 0
je 0x4125b7
mov byte [ebx + 0xcb3], 1
mov byte [ebx + 0xcc7], 1
mov byte [edi + 0x24f], 1
mov byte [edi + 0x164f], 1
jmp 0x4125b7
mov byte [ebx + 0xc8a], 1
mov byte [ebx + 0xc9e], 1
mov byte [edi + 0x352], 1
mov byte [edi + 0x1842], 1
cmp byte [esi + 0x16], 0
je 0x4125b7
mov byte [ebx + 0xc8b], 1
mov byte [ebx + 0xc9f], 1
mov byte [edi + 0x353], 1
mov byte [edi + 0x1843], 1
mov byte [ebp + 0xa], 1
cmp byte [esi + 0x16], 0
movzx eax, word [esi + 4]
mov dword [esp + 0x38], eax
je 0x4125d6
or eax, 0x8000
mov byte [ebp + 0xb], 1
mov dword [esp + 0x38], eax
mov cl, byte [esi + 0x11]
test cl, cl
jne 0x4125e8
cmp word [esi + 0xa], 0
jne 0x4125e8
xor al, al
jmp 0x4125ea
mov al, 1
cmp byte [ebp + 8], 0
je 0x41262b
cmp byte [esi + 0xf], 0
jne 0x41262b
test al, al
jne 0x41262f
test byte [esi + 0x13], 2
jne 0x412614
mov dx, word [edx]
mov cl, byte [esi + 0x10]
push 0
call fcn.00411f50
mov edx, dword [esp + 0x44]
add esp, 4
mov eax, dword [esp + 0x3c]
movzx eax, word [eax]
mov ecx, eax
test ax, ax
je 0x41278c
jmp 0x412793
test al, al
je 0x412614
test cl, cl
je 0x41266d
movzx eax, cl
lea eax, [eax + eax*4]
cmp byte [ebx + eax*4 + 8], 0
je 0x41264e
push 1
xor edx, edx
call fcn.00411f50
add esp, 4
jmp 0x4126a5
movzx eax, cl
lea eax, [eax + eax*4]
mov byte [ebx + eax*4 + 9], 1
test byte [esi + 0x13], 1
je 0x4126a5
movzx eax, byte [esi + 0x11]
lea eax, [eax + eax*4]
or byte [ebx + eax*4 + 0xc], 0x10
jmp 0x4126a5
movzx eax, word [esi + 0xa]
mov ecx, eax
lea eax, [eax + eax*4]
cmp byte [edi + eax*4 + 8], 0
mov eax, ecx
lea eax, [eax + eax*4]
mov byte [edi + eax*4 + 9], 1
jne 0x4126a5
test byte [esi + 0x13], 1
je 0x412699
movzx eax, word [esi + 0xa]
lea eax, [eax + eax*4]
or byte [edi + eax*4 + 0xc], 0x10
movzx eax, word [esi + 0xa]
lea eax, [eax + eax*4]
mov byte [edi + 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 + 0x30]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, ecx
jl 0x412400
test esi, esi
je 0x412c62
mov ebx, dword [esp + 0x44]
push 0x411e00
push 0xc
push esi
push ebx
call fcn.004a9650
add esp, 0x10
test esi, esi
jle 0x412c62
mov eax, dword [0x4ea7a0]
mov ebp, ebx
mov edx, dword [0x4ea7ac]
mov esi, 0x7ff9
mov dword [esp + 0x5c], eax
add eax, 0x270
mov dword [esp + 0x4c], eax
mov eax, dword [0x4ea79c]
mov dword [esp + 0x54], eax
mov dword [esp + 0x48], ebp
mov dword [esp + 0x68], edx
lea ecx, [eax + 0x14a]
mov dword [esp + 0x50], ecx
mov ecx, 0xfffffeb6
sub ecx, eax
mov eax, dword [0x4ea7a4]
mov dword [esp + 0x58], ecx
mov ecx, dword [0x4ea7a8]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x34], eax
nop
movzx ebx, word [ebp + 0xa]
mov ax, bx
and ebx, 0x7fff
shr ax, 0xf
mov word [esp + 0x16], ax
movzx eax, bx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x60], eax
cmp bx, si
ja 0x412840
mov al, byte [ebp + 6]
test al, al
je 0x4127d5
movzx eax, al
lea eax, [eax + eax*4]
lea esi, [ecx + eax*4]
jmp 0x4127df
mov eax, dword [esp + 0x38]
movzx eax, ax
mov ecx, dword [esp + 0x34]
mov ebp, dword [esp + 0x30]
mov word [ecx + 4], ax
mov al, byte [esi + 0x10]
mov byte [ecx], al
mov ax, word [edx]
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 esi, dword [esp + 0x28]
mov byte [ecx - 1], al
inc esi
add ecx, 0xc
mov dword [esp + 0x28], esi
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x24]
jmp 0x4126c1
movzx eax, word [ebp + 8]
lea eax, [eax + eax*4]
lea esi, [edx + eax*4]
movzx eax, word [esi + 6]
add esi, 6
mov edi, 0x7fff
mov ecx, eax
mov edx, eax
cmp ax, di
je 0x41282f
mov ebx, dword [esp + 0x30]
mov edi, ecx
mov ebp, 0x7fff
nop
movzx ecx, di
mov eax, dword [ebx + ecx*4]
cmp byte [eax + 0x11], 0
jne 0x412815
cmp word [eax + 0xa], 0
mov edx, ecx
je 0x412827
movzx ecx, word [eax + 0xc]
lea esi, [eax + 0xc]
mov eax, ecx
mov edi, ecx
mov edx, eax
cmp cx, bp
jne 0x412800
mov ebp, dword [esp + 0x48]
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x30]
movzx eax, bx
mov eax, dword [ecx + eax*4]
mov word [eax + 0xc], dx
mov word [esi], bx
mov bl, byte [ebp + 4]
mov eax, dword [ebp]
mov edi, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], eax
mov byte [esp + 0x13], bl
test bl, bl
je 0x412891
mov al, bl
and al, 0xc0
movzx ecx, al
neg ecx
mov eax, dword [esp + 0x38]
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test bl, 0xc
cmove edx, ecx
mov esi, edx
or esi, 4
test bl, 0x30
cmove esi, edx
mov ecx, esi
or ecx, 2
test bl, 3
cmove ecx, esi
or edi, ecx
mov dword [esp + 0x40], edi
cmp byte [ebp + 5], 0
je 0x41289b
xor dl, dl
jmp 0x4128e3
mov ebx, eax
mov ecx, eax
and bl, 8
neg bl
sbb bl, bl
and bl, 0xc0
mov al, bl
or al, 0xc
test cl, 1
movzx edx, al
movzx eax, bl
cmove edx, eax
mov al, dl
or al, 3
test byte [esp + 0x38], 2
movzx ebx, al
movzx eax, dl
cmove ebx, eax
mov al, bl
or al, 0x30
test byte [esp + 0x38], 4
movzx edx, al
movzx eax, bl
cmove edx, eax
or dl, byte [esp + 0x13]
not dl
mov eax, dword [esp + 0x4c]
lea ebx, [ebp + 0xa]
mov edi, dword [esp + 0x50]
movzx esi, dl
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x24], esi
mov dword [esp + 0x38], edi
nop dword [eax]
test eax, esi
jne 0x412c14
and al, 0xc0
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test byte [esp + 0x1c], 0xc
cmove edx, ecx
mov ecx, dword [esp + 0x1c]
mov esi, edx
mov al, cl
or esi, 4
test cl, 0x30
cmove esi, edx
mov ecx, esi
or ecx, 2
test al, 3
cmove ecx, esi
and ecx, dword [esp + 0x40]
cmp dword [esp + 0x40], ecx
jne case.0x412b4a.19
mov al, byte [ebp + 4]
mov byte [esp + 0x13], al
test al, al
je 0x412986
movzx ecx, al
mov eax, ecx
and eax, dword [esp + 0x1c]
cmp ecx, eax
jne case.0x412b4a.19
mov al, byte [ebp + 6]
mov byte [esp + 0x14], al
test al, al
je 0x41299e
mov ecx, dword [esp + 0x54]
movzx eax, al
add eax, dword [esp + 0x20]
jmp 0x4129ac
movzx eax, word [ebp + 8]
add eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
add eax, edi
lea esi, [ecx + eax*2]
mov ecx, 0x7fff
movzx eax, word [esi]
mov dword [esp + 0x2c], esi
mov edx, eax
cmp ax, cx
je 0x412b1e
mov ax, word [0x4e8fec]
mov ecx, edx
and ecx, 0x7fff
cmp word [esp + 0x3c], ax
jae case.0x412b4a.19
cmp cx, ax
jae case.0x412b4a.19
mov ax, dx
shr ax, 0xf
cmp byte [esp + 0x16], 0
je 0x412a9a
test al, al
jne 0x412b1e
mov eax, dword [0x4e8fdc]
mov edi, ecx
mov ecx, dword [eax + edi*4]
mov eax, 0xff
cmp byte [ecx + 0x15], 0
jne 0x412a1b
movzx eax, byte [ecx + 0xf]
test dword [esp + 0x24], eax
jne 0x412a8e
mov al, byte [ecx + 0xe]
not al
test byte [esp + 0x13], al
jne 0x412a8e
mov eax, dword [ecx]
mov esi, dword [ebp]
not eax
test esi, eax
je 0x412a73
mov bl, byte [ecx + 0xf]
mov al, bl
and al, 0xc0
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test bl, 0xc
cmove edx, ecx
mov ecx, edx
or ecx, 4
test bl, 0x30
cmove ecx, edx
mov eax, ecx
or eax, 2
test bl, 3
cmove eax, ecx
not eax
test esi, eax
jne 0x412a8a
mov ecx, dword [esp + 0x34]
lea ebx, [ebp + 0xa]
mov ax, word [ebx]
mov word [ecx + edi*2], ax
mov edi, dword [esp + 0x38]
jmp case.0x412b4a.19
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x38]
lea ebx, [ebp + 0xa]
jmp 0x412b1e
test al, al
je 0x412aa7
mov eax, dword [esp + 0x60]
movzx esi, ax
jmp 0x412ad9
mov eax, dword [esp + 0x3c]
mov edi, 0x7fff
movzx edx, ax
mov eax, dword [esp + 0x34]
cmp word [eax + edx*2], di
mov edi, dword [esp + 0x38]
jne 0x412b1e
mov eax, ecx
mov esi, edx
mov ecx, dword [esp + 0x34]
movzx eax, word [ecx + eax*2]
mov ecx, 0x7fff
mov edx, eax
cmp ax, cx
je 0x412b1a
mov eax, dword [0x4e8fdc]
mov ecx, edx
and ecx, 0x7fff
mov ecx, dword [eax + ecx*4]
cmp byte [ecx + 0x15], 0
jne 0x412afc
mov al, byte [ecx + 0xf]
or al, byte [esp + 0x48]
not al
test al, al
jne 0x412b1a
mov eax, dword [esp + 0x40]
not eax
test dword [ecx], eax
jne 0x412b1a
movzx eax, byte [esp + 0x13]
not eax
test byte [ecx + 0xe], al
jne 0x412b1a
mov eax, dword [esp + 0x34]
mov word [eax + esi*2], dx
mov esi, dword [esp + 0x2c]
cmp byte [esp + 0x14], 0
mov eax, ebx
mov ax, word [eax]
mov word [esi], ax
je case.0x412b4a.19
movzx eax, byte [ebp + 6]
add eax, 0xfffffff0
cmp eax, 0x95
ja case.0x412b4a.19
movzx eax, byte [eax + 0x412cf0]
jmp dword [eax*4 + 0x412cd4]
movzx eax, word [ebx]
mov ecx, dword [esp + 0x18]
mov word [edi - 2], ax
movzx eax, word [ebx]
mov word [ecx - 0x200], ax
cmp byte [ebp + 6], 0xa4
je case.0x412b4a.19
movzx eax, word [ebx]
mov word [edi], ax
movzx eax, word [ebx]
mov word [ecx], ax
jmp case.0x412b4a.19
movzx eax, word [ebx]
mov ecx, dword [esp + 0x18]
mov word [edi], ax
movzx eax, word [ebx]
mov word [ecx], ax
jmp case.0x412b4a.19
movzx eax, word [ebx]
mov ecx, dword [esp + 0x18]
mov word [edi - 0xa], ax
movzx eax, word [ebx]
mov word [ecx - 0x21c], ax
cmp byte [ebp + 6], 0xa0
je case.0x412b4a.19
movzx eax, word [ebx]
mov word [edi - 8], ax
movzx eax, word [ebx]
mov word [ecx - 4], ax
jmp case.0x412b4a.19
movzx eax, word [ebx]
mov ecx, dword [esp + 0x18]
mov word [edi - 8], ax
movzx eax, word [ebx]
mov word [ecx - 4], ax
jmp case.0x412b4a.19
movzx eax, word [ebx]
mov ecx, dword [esp + 0x18]
mov word [edi - 6], ax
movzx eax, word [ebx]
mov word [ecx - 0x236], ax
cmp byte [ebp + 6], 0xa2
je case.0x412b4a.19
jmp 0x412bf6
mov ecx, dword [esp + 0x18]
movzx eax, word [ebx]
mov word [edi - 4], ax
movzx eax, word [ebx]
mov word [ecx - 0x36], ax
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add ecx, 0x100
inc eax
add edi, 0x200
mov dword [esp + 0x1c], eax
add edx, 0x400
mov dword [esp + 0x20], ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x18], edx
cmp ecx, 0xff00
jle 0x412920
mov ecx, dword [esp + 0x64]
add ebp, 0xc
sub dword [esp + 0x28], 1
mov esi, 0x7ff9
mov edx, dword [esp + 0x68]
mov dword [esp + 0x48], ebp
jne 0x412750
push dword [esp + 0x44]
call fcn.0049bda3
mov esi, dword [0x4ea7a8]
add esp, 4
cmp byte [esi + 0x14a], 0
je 0x412c8e
push 0xa1
mov dl, 0xa0
mov cl, 0x10
call fcn.00412d90
add esp, 4
cmp byte [esi + 0x15e], 0
je 0x412ca8
push 0xa3
mov dl, 0xa2
mov cl, 0x11
call fcn.00412d90
add esp, 4
cmp byte [esi + 0x172], 0
je 0x412cc2
push 0xa5
mov dl, 0xa4
mov cl, 0x12
call fcn.00412d90
add esp, 4
mov cl, byte [esp + 0x15]
xor dl, dl
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x5c
jmp fcn.00412e30