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

Disassembly:
push 0xffffffffffffffff
push 0x5535e6
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0xac], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x57f7c4]
xor eax, esp
push eax
lea eax, [esp + 0xc4]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xd4]
movzx eax, word [ebp]
add eax, 0xfffffaff
mov edi, ecx
cmp eax, 0x58
ja case.0x4784ed.1284
movzx eax, byte [eax + 0x4791bc]
jmp dword [eax*4 + 0x479180]
mov eax, edi
call fcn.0049af30
mov esi, 1
cmp dword [edi + 0x1444], esi
jne 0x478514
cmp dword [edi + 0x1448], esi
jne 0x479155
fld dword [ebp + 5]
sub esp, 8
fstp qword [esp]
call fcn.0051ca16
add esp, 8
test eax, eax
je 0x479155
fld dword [ebp + 5]
sub esp, 8
fstp qword [esp]
call fcn.0051ca32
add esp, 8
test eax, eax
jne 0x479155
fld dword [ebp + 9]
sub esp, 8
fstp qword [esp]
call fcn.0051ca16
add esp, 8
test eax, eax
je 0x479155
fld dword [ebp + 9]
sub esp, 8
fstp qword [esp]
call fcn.0051ca32
add esp, 8
test eax, eax
jne 0x479155
fld dword [ebp + 0xd]
sub esp, 8
fstp qword [esp]
call fcn.0051ca16
add esp, 8
test eax, eax
je 0x479155
fld dword [ebp + 0xd]
sub esp, 8
fstp qword [esp]
call fcn.0051ca32
add esp, 8
test eax, eax
jne 0x479155
mov eax, dword [edi + 0x147c]
cmp eax, 2
jne 0x4785c1
fld dword [0x574218]
fstp dword [esp + 0x18]
jmp 0x478631
cmp eax, 3
jne 0x4785d8
fld dword [0x58198c]
fadd qword [0x574210]
fstp dword [esp + 0x18]
jmp 0x478631
mov eax, edi
call fcn.0049b320
fld dword [eax*4 + 0x58197c]
fstp dword [esp + 0x18]
fld dword [0x57420c]
fld dword [esp + 0x18]
fcom st(1)
fnstsw ax
test ah, 5
jp 0x478605
fstp st(0)
fstp dword [esp + 0x18]
jmp 0x478631
fstp st(1)
fld dword [0x574208]
fcomp st(1)
fnstsw ax
test ah, 0x41
jp 0x47862f
fcomp qword [0x574200]
fnstsw ax
test ah, 5
jp 0x478631
fld dword [0x5741fc]
fstp dword [esp + 0x18]
jmp 0x478631
fstp st(0)
fld dword [ebp + 5]
push ecx
fstp dword [esp + 0x2c]
lea ecx, [edi + 0x554c]
fld dword [ebp + 9]
lea eax, [esp + 0x30]
fstp dword [esp + 0x48]
fld dword [ebp + 0xd]
fstp dword [esp + 0x24]
fld dword [esp + 0x2c]
fstp dword [esp + 0x30]
fld dword [esp + 0x48]
fstp dword [esp + 0x34]
fld dword [esp + 0x24]
fstp dword [esp + 0x38]
fld dword [esp + 0x1c]
fstp dword [esp]
call fcn.00478240
cmp eax, esi
jne 0x4786d5
mov eax, edi
call fcn.0049ace0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [edi + 0x587c], 0
jne 0x479155
fld dword [edi + 0x5560]
movzx ecx, word [edi + 0x160]
fstp dword [edi + 0x58c0]
mov dword [edi + 0x58b4], esi
fld dword [edi + 0x5564]
mov dword [edi + 0x58b8], eax
fstp dword [edi + 0x58c4]
mov dword [edi + 0x58bc], ecx
fld dword [edi + 0x5568]
fstp dword [edi + 0x58c8]
jmp 0x479155
cmp eax, 2
je 0x479155
cmp eax, 3
jne 0x478744
mov eax, edi
call fcn.0049ace0
fld dword [edi + 0x5554]
mov eax, dword [edi + 0xdc]
fstp dword [esp + 0x34]
fld dword [edi + 0x5558]
mov cx, word [edi + 0x160]
mov edx, 0x20b
fstp dword [esp + 0x38]
fld dword [edi + 0x555c]
mov word [esp + 0x2c], dx
push 0x14
fstp dword [esp + 0x40]
lea edx, [esp + 0x30]
mov dword [esp + 0x32], eax
push edx
mov eax, edi
mov word [esp + 0x3a], cx
call fcn.004d5690
push 5
mov ecx, edi
call fcn.0045aab0
jmp 0x479155
fld dword [ebp + 0xd]
mov eax, dword [edi + 0xe0]
sub esp, 0xc
fstp dword [esp + 8]
fld dword [ebp + 9]
fstp dword [esp + 4]
fld dword [ebp + 5]
fstp dword [esp]
push eax
mov eax, edi
call fcn.0041cd60
test al, al
je 0x478926
mov cx, word [ebp + 3]
mov word [edi + 0x162], cx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x586c], eax
mov dl, byte [ebp + 2]
mov byte [edi + 0x144d], dl
movzx eax, byte [ebp + 2]
shr eax, 7
xor ebx, ebx
cmp eax, ebx
je 0x4787a7
mov eax, edi
call fcn.0049ace0
jmp 0x4787b3
mov esi, edi
call fcn.0049aec0
mov esi, 1
cmp dword [edi + 0x147c], esi
jne 0x4787c7
mov dword [edi + 0x1480], ebx
mov dword [edi + 0x147c], ebx
cmp byte [edi + 0x1460], bl
je 0x4787dd
and byte [edi + 0x144d], 0x7f
or byte [edi + 0x144d], 0x80
fld dword [ebp + 5]
mov ecx, dword [edi + 0xdc]
mov dl, byte [edi + 0x144d]
fstp dword [esp + 0x35]
fld dword [ebp + 9]
mov eax, 0x501
fstp dword [esp + 0x39]
mov word [esp + 0x2c], ax
mov ax, word [edi + 0x162]
fld dword [ebp + 0xd]
lea ebx, [esp + 0x2c]
fstp dword [esp + 0x3d]
mov esi, edi
mov dword [esp + 0x2e], ecx
mov byte [esp + 0x32], dl
mov word [esp + 0x33], ax
call fcn.004d5750
or ebx, 0xffffffff
test al, al
je 0x47886e
lea esi, [esp + 0x20]
call fcn.0044e110
mov dword [esp + 0xcc], 0
mov ecx, dword [edi + 0x17f4]
test ecx, ecx
je 0x478853
mov eax, edi
call fcn.0044ec00
mov dword [esp + 0xcc], ebx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x47886e
add eax, 0x118
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [edi + 0x15bc]
test esi, esi
je 0x4788a0
lea eax, [edi + 0xd0]
lea ecx, [esi + 8]
call fcn.0041b8c0
fcomp dword [0x574158]
fnstsw ax
test ah, 0x41
jne 0x4788a0
add dword [esi + 0x40], ebx
mov dword [edi + 0x15bc], 0
cmp dword [edi + 0x15c0], 0
lea ebx, [edi + 0x15c0]
je 0x478919
mov esi, dword [edi + 0x15c4]
test esi, esi
je 0x478919
lea eax, [edi + 0xd0]
lea ecx, [esi + 0xd0]
call fcn.0041b8c0
fcomp dword [0x574158]
fnstsw ax
test ah, 0x41
jne 0x478919
mov eax, ebx
call fcn.00454800
lea eax, [esi + 0x15c0]
call fcn.00454800
mov ecx, 0xa04
push 3
lea edx, [esp + 0x1c]
mov word [esp + 0x1c], cx
push edx
mov ecx, edi
mov byte [esp + 0x22], 2
call fcn.004ed0e0
push 3
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
mov byte [esp + 0x22], 3
call fcn.004ed0e0
push edi
call fcn.0048ac70
mov ebx, edi
call fcn.00499b60
mov eax, edi
call fcn.0049ae40
jmp 0x479155
movzx eax, byte [ebp + 2]
mov esi, edi
call fcn.0049afb0
mov edx, dword [edi + 0xdc]
mov ecx, 0x506
mov word [esp + 0x20], cx
mov cl, byte [ebp + 2]
mov dword [esp + 0x22], edx
mov byte [esp + 0x26], cl
test al, al
je 0x478976
lea edx, [esp + 0x20]
push edx
lea ecx, [edi + 0xd0]
mov edx, 7
call fcn.004d5250
jmp 0x479155
push 7
lea eax, [esp + 0x24]
push eax
mov eax, edi
call fcn.004d5690
jmp 0x479155
mov ecx, dword [edi + 0x1444]
cmp ecx, 1
je 0x478bc9
cmp ecx, 3
je 0x478bc9
cmp dword [edi + 0x1358], 0
jne 0x478bc9
mov eax, edi
call fcn.0049b250
cmp eax, 0xff
je 0x478bc9
cmp byte [edi + 0x144c], 1
je 0x478bc9
cmp dword [edi + 0x147c], 0
jne 0x478bc9
cmp ecx, 2
jne 0x4789f7
cmp dword [edi + 0x1544], 1
jne 0x4789f7
mov ecx, dword [ebp + 2]
cmp ecx, dword [edi + 0x1548]
je 0x478bc9
mov eax, dword [edi + 0xe0]
mov ebx, dword [ebp + 2]
lea edx, [esp + 0x20]
push edx
lea esi, [eax + 0x64]
mov dword [esp + 0x24], ebx
call fcn.00415480
test eax, eax
je 0x478acc
mov esi, 1
cmp dword [eax + 0x1444], esi
je 0x478acc
cmp byte [eax + 0x5814], 0
je 0x478a3c
cmp byte [eax + 0x5815], 0
jne 0x478a48
cmp dword [edi + 0xdc], ebx
jne 0x478acc
mov cl, byte [eax + 0x1360]
cmp cl, 0xd
je 0x478acc
cmp cl, 0x67
je 0x478acc
mov ecx, dword [eax + 0xdc]
cmp ecx, dword [edi + 0xdc]
je 0x478acc
mov edx, eax
mov eax, edi
call fcn.00457dc0
test al, al
jne 0x478acc
mov eax, dword [edi + 0x1444]
cmp eax, esi
je 0x478aa5
mov ebx, 2
cmp eax, ebx
je 0x478aa5
test eax, eax
jne 0x478a9f
mov ecx, edi
call fcn.00491540
cmp dword [edi + 0x1270], ebx
jge 0x478a9f
mov dword [edi + 0x1270], ebx
mov dword [edi + 0x1444], ebx
mov dword [edi + 0x1544], esi
mov edx, dword [ebp + 2]
mov eax, edi
mov dword [edi + 0x1548], edx
mov dword [edi + 0x1454], esi
mov dword [edi + 0x1458], esi
call fcn.0049ae40
jmp 0x479155
push edi
call fcn.004920d0
mov eax, edi
call fcn.0049ae40
jmp 0x479155
mov ecx, dword [edi + 0x1444]
mov ebx, 1
cmp ecx, ebx
je 0x478bc9
cmp ecx, 3
je 0x478bc9
cmp dword [edi + 0x1358], 0
jne 0x478bc9
mov eax, edi
call fcn.0049b250
cmp eax, 0xff
je 0x478bc9
cmp byte [edi + 0x144c], bl
je 0x478bc9
cmp dword [edi + 0x147c], 0
jne 0x478bc9
mov esi, 2
cmp ecx, esi
jne 0x478b4e
cmp dword [edi + 0x1544], esi
jne 0x478b4e
mov eax, dword [ebp + 2]
cmp eax, dword [edi + 0x1548]
je 0x478bc9
mov ecx, dword [ebp + 2]
call fcn.00458d80
test eax, eax
je 0x478acc
mov eax, dword [edi + 0x1444]
cmp eax, ebx
je 0x478b8b
cmp eax, esi
je 0x478b8b
test eax, eax
jne 0x478b85
mov ecx, edi
call fcn.00491540
cmp dword [edi + 0x1270], esi
jge 0x478b85
mov dword [edi + 0x1270], esi
mov dword [edi + 0x1444], esi
mov dword [edi + 0x1544], esi
mov ecx, dword [ebp + 2]
mov eax, edi
mov dword [edi + 0x1548], ecx
mov dword [edi + 0x1454], ebx
mov dword [edi + 0x1458], ebx
call fcn.0049ae40
jmp 0x479155
mov cl, byte [ebp + 2]
cmp cl, 0xff
jne 0x478bd4
mov eax, dword [ebp + 3]
test eax, eax
je 0x478bd4
push eax
mov ecx, edi
call fcn.00493ef0
push edi
call fcn.004920d0
jmp 0x479155
mov eax, dword [edi + 0x1444]
cmp eax, 1
je 0x478bc9
cmp dword [edi + 0x1358], 0
jne 0x478bc9
cmp eax, 3
je 0x478bc9
mov eax, edi
call fcn.0049b250
cmp eax, 0xff
je 0x478bc9
cmp byte [edi + 0x144c], 1
je 0x478bc9
cmp dword [edi + 0x147c], 0
jne 0x478bc9
movzx eax, cl
cmp eax, dword [edi + 0xabc]
jge 0x478bc9
mov cl, byte [edi + 0x1360]
test cl, cl
je 0x478c27
cmp cl, 0xd
jne 0x478bc9
cmp dword [edi + eax*4 + 0xac0], 0
je 0x478bc9
mov edx, dword [edi + eax*4 + 0xac0]
mov eax, dword [edx + 0x34]
cmp byte [eax + 0x2f], 0
je 0x478bc9
movzx ecx, byte [edi + 0x134]
cmp byte [ecx + eax + 0x27], 0
je 0x478bc9
mov dl, byte [eax + 0x2d]
cmp dl, byte [edi + 0x12f]
ja 0x478bc9
movzx ecx, word [eax + 0x24]
test cx, cx
je 0x478c78
cmp word [edi + 0x136], cx
jb 0x478bc9
mov ecx, dword [ebp + 3]
push ecx
push eax
lea ecx, [esp + 0x27]
call fcn.0045a200
test al, al
je 0x478acc
mov eax, dword [edi + 0x1444]
mov esi, 2
cmp eax, 1
je 0x478cc1
cmp eax, esi
je 0x478cc1
test eax, eax
jne 0x478cbb
mov ecx, edi
call fcn.00491540
cmp dword [edi + 0x1270], esi
jge 0x478cbb
mov dword [edi + 0x1270], esi
mov dword [edi + 0x1444], esi
mov dword [edi + 0x1458], esi
movzx edx, byte [ebp + 2]
mov eax, edi
mov dword [edi + 0x145c], edx
call fcn.0049ae40
jmp 0x479155
mov eax, dword [edi + 0x1444]
cmp eax, 1
je 0x478bc9
cmp dword [edi + 0x1358], 0
jne 0x478bc9
cmp eax, 3
je 0x478bc9
mov eax, edi
call fcn.0049b250
cmp eax, 0xff
je 0x478bc9
cmp byte [edi + 0x144c], 1
je 0x478bc9
cmp dword [edi + 0x147c], 0
jne 0x478bc9
movzx eax, byte [ebp + 2]
cmp eax, dword [edi + 0xabc]
jge 0x478bc9
mov cl, byte [edi + 0x1360]
test cl, cl
je 0x478d51
cmp cl, 0xd
jne 0x478bc9
cmp dword [edi + eax*4 + 0xac0], 0
je 0x478bc9
mov eax, dword [edi + eax*4 + 0xac0]
mov eax, dword [eax + 0x34]
cmp byte [eax + 0x2f], 0
je 0x478bc9
movzx ecx, byte [edi + 0x134]
cmp byte [ecx + eax + 0x27], 0
je 0x478bc9
mov dl, byte [eax + 0x2d]
cmp dl, byte [edi + 0x12f]
ja 0x478bc9
movzx ecx, word [eax + 0x24]
test cx, cx
je 0x478daa
cmp word [edi + 0x136], cx
jb 0x478bc9
lea ecx, [esp + 0x1f]
push ecx
mov ecx, dword [ebp + 3]
push eax
mov edx, edi
call fcn.0045a760
jmp 0x478c86
mov eax, dword [edi + 0xdc]
push eax
call fcn.0041dcc0
mov ecx, eax
test ecx, ecx
je 0x479155
lea eax, [edi + 0xd0]
add ecx, 8
call fcn.0041b8c0
fcomp qword [0x5740d8]
fnstsw ax
test ah, 5
jp 0x479155
mov eax, edi
call fcn.00466b90
jmp 0x479155
lea esi, [esp + 0x48]
call fcn.00467f60
mov al, byte [ebp + 2]
xor ebx, ebx
mov ecx, 0x305
mov word [esp + 0x48], cx
mov dword [esp + 0x9f], ebx
mov byte [esp + 0xa3], bl
cmp al, 2
jne 0x478e53
mov ecx, dword [0x587974]
push 0x72
mov eax, esi
mov edx, 1
push eax
mov word [esp + 0xc0], dx
call fcn.004ed210
mov eax, edi
call fcn.00466880
jmp 0x479155
cmp al, 3
jne 0x478ed0
mov ecx, 2
push 0x72
lea edx, [esp + 0x4c]
mov word [esp + 0xbc], cx
mov ecx, dword [0x587974]
push edx
call fcn.004ed210
lea esi, [esp + 0x20]
call fcn.0044e110
mov esi, 1
mov dword [esp + 0xcc], esi
cmp dword [edi + 0x17f4], ebx
jne 0x478e9c
mov eax, edi
call fcn.00466880
jmp 0x478eb3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x7530
mov dword [edi + 0x1470], eax
mov dword [edi + 0x1474], esi
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x479155
add eax, 0x118
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x479155
cmp al, 4
jne 0x478eff
push 0x72
lea ecx, [esp + 0x4c]
mov eax, 3
push ecx
mov ecx, dword [0x587974]
mov word [esp + 0xc0], ax
call fcn.004ed210
mov esi, edi
call fcn.004665e0
jmp 0x479155
cmp al, 5
jne 0x479155
mov ecx, dword [0x587974]
push 0x72
lea eax, [esp + 0x4c]
mov edx, 4
push eax
mov word [esp + 0xc0], dx
call fcn.004ed210
mov esi, edi
call fcn.00466740
jmp 0x479155
cmp dword [edi + 0x1444], 1
je 0x479155
call fcn.00456610
lea ecx, [edi + 0x1634]
call fcn.00487030
movzx ecx, byte [ebp + 3]
movzx edx, byte [ebp + 2]
push ecx
push edx
push edi
call fcn.00471b00
jmp 0x479155
mov cx, word [edi + 0x166]
push 4
lea edx, [esp + 0x2c]
mov eax, 0x555
mov word [esp + 0x2e], cx
push edx
mov ecx, edi
mov word [esp + 0x30], ax
call fcn.004ed0e0
jmp 0x479155
cmp dword [edi + 0x1444], 1
je 0x479155
cmp dword [edi + 0x5880], 0
jne 0x479155
cmp dword [edi + 0x1358], 0
jne 0x479155
mov al, byte [ebp + 2]
test al, al
je 0x479155
movzx eax, al
cmp eax, dword [edi + 0x130c]
jg 0x479155
cmp byte [ebp + 3], 0x18
jae 0x479155
call fcn.00456610
lea ecx, [edi + 0x1634]
call fcn.00487030
mov ecx, dword [edi + 0xdc]
push 0
movzx edx, byte [ebp + 3]
movzx eax, byte [ebp + 2]
push ecx
push edx
push eax
push edi
call fcn.00472da0
jmp 0x479155
cmp dword [edi + 0x1444], 1
je 0x479155
cmp dword [edi + 0x5880], 0
jne 0x479155
cmp dword [edi + 0x1358], 0
jne 0x479155
mov al, byte [ebp + 2]
test al, al
je 0x479155
movzx ecx, al
cmp ecx, dword [edi + 0x130c]
jg 0x479155
cmp byte [ebp + 3], 0x18
jae 0x479155
call fcn.00456610
lea ecx, [edi + 0x1634]
call fcn.00487030
mov edx, dword [ebp + 4]
movzx eax, byte [ebp + 3]
movzx ecx, byte [ebp + 2]
push 0
push edx
push eax
push ecx
push edi
call fcn.00472da0
jmp 0x479155
cmp dword [edi + 0x1444], 1
je 0x479155
cmp dword [edi + 0x5880], 0
jne 0x479155
cmp dword [edi + 0x1358], 0
jne 0x479155
cmp dword [edi + 0x147c], 0
je 0x4790b6
call fcn.00472b80
jmp 0x479155
mov al, byte [ebp + 2]
test al, al
je 0x479155
movzx edx, al
cmp edx, dword [edi + 0x130c]
jg 0x479155
cmp byte [ebp + 3], 0x18
jae 0x479155
call fcn.00456610
lea ecx, [edi + 0x1634]
call fcn.00487030
movzx eax, byte [ebp + 4]
mov ecx, dword [ebp + 5]
push eax
jmp 0x478ff0
cmp dword [edi + 0x1444], 1
je 0x479155
cmp dword [edi + 0x1358], 0
jne 0x479155
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x2710
cmp dword [edi + 0x587c], 0
jne 0x479155
fld dword [edi + 0xd8]
movzx edx, word [edi + 0x160]
sub esp, 0xc
xor ecx, ecx
fstp dword [esp + 8]
fld dword [edi + 0xd4]
fstp dword [esp + 4]
fld dword [edi + 0xd0]
fstp dword [esp]
push eax
mov eax, edi
call fcn.0049dd00
jmp 0x479155
push 0
push 9
call fcn.004ec760
mov ecx, dword [esp + 0xc4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xac]
xor ecx, esp
call fcn.0051a8be
add esp, 0xbc
ret 4