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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 1
xor ebx, ebx
pop edi
cmp eax, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x4c], edi
jne 0x478fbe
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x28], ebx
jmp 0x479006
cmp eax, edi
jne 0x478fd8
push esi
mov dword [ebp - 0x20], edi
call fcn.00456597
pop ecx
push eax
call fcn.00440143
pop ecx
mov dword [ebp - 0x28], eax
jmp 0x479006
cmp eax, 2
jne 0x478ffb
push esi
call fcn.00456597
pop ecx
push eax
call fcn.00440143
pop ecx
mov dword [ebp - 0x28], eax
xor ecx, ecx
cmp ax, bx
sete cl
mov dword [ebp - 0x20], ecx
jmp 0x479006
cmp eax, 3
jne 0x479006
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x30]
push eax
push esi
call fcn.00443a82
cmp word [ebp - 0x30], 0x8000
pop ecx
pop ecx
jne 0x47903e
cmp word [ebp - 0x2e], 0x8000
jne 0x47903e
cmp word [ebp - 0x2c], 0x7fff
jne 0x47903e
cmp word [ebp - 0x2a], 0x7fff
jne 0x47903e
lea eax, [ebp - 0x30]
push eax
push esi
call fcn.00445f84
pop ecx
pop ecx
push esi
call fcn.00456597
pop ecx
push eax
call fcn.00455029
pop ecx
mov dword [ebp - 8], eax
push esi
call fcn.00456597
pop ecx
push eax
call fcn.00455029
pop ecx
mov dword [ebp - 0x48], eax
push dword [ebp - 8]
call fcn.0045500d
pop ecx
mov dword [0x5b3cbc], eax
call fcn.004c096e
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x14], ebx
cmp dword [esi + 4], ebx
jle 0x47934a
mov ecx, dword [ebp - 0x14]
mov eax, dword [esi]
imul eax, ecx
add eax, dword [esi + 0x10]
cmp word [ebp + 0x18], bx
lea edx, [ecx + 1]
mov dword [ebp - 4], edx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x1c], eax
je 0x4790c7
mov edi, dword [ebp + 0xc]
mov ebx, dword [edi + 0x30]
cmp ebx, ecx
jle 0x4790b6
mov ecx, ebx
mov dword [ebp - 0x44], ecx
mov edi, dword [edi + 0x34]
cmp edi, eax
jge 0x4790c2
mov eax, edi
mov dword [ebp - 0x1c], eax
push 1
xor ebx, ebx
pop edi
cmp ecx, eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x10], ebx
jge 0x47933e
mov eax, dword [0x5b7bf4]
push ebx
mov dword [ebp - 0xb0], eax
lea eax, [ebp - 0xb0]
mov dword [0x5b7bf4], eax
lea eax, [ebp - 0xa0]
push eax
mov dword [ebp - 0x50], 0x5b7bf4
mov dword [ebp - 0xac], ebx
call fcn.0052a5c0
mov esi, dword [ebp + 0x10]
pop ecx
test eax, eax
pop ecx
jne 0x479302
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x40]
push dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x30]
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push ebx
push eax
push dword [ebp + 8]
call fcn.0047870e
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x18]
add esp, 0x2c
test eax, eax
jle 0x47929b
cmp word [ebp + 0x18], 0
jne 0x4791e5
mov ecx, dword [ebp - 4]
cmp ecx, dword [esi + 4]
jge 0x4791e5
cmp eax, dword [0x5b3cbc]
jge 0x4791e5
mov eax, dword [esi]
imul eax, ecx
add eax, dword [esi + 0x10]
mov edi, dword [eax]
mov ebx, dword [eax + 4]
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0047936f
add eax, dword [ebp - 0x18]
add esp, 0x10
cmp eax, dword [0x5b3cbc]
jge 0x4791df
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x40]
push dword [ebp - 8]
push eax
push ebx
push 0
push edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call fcn.0047870e
mov ecx, dword [esi + 4]
add esp, 0x2c
inc dword [ebp - 4]
cmp dword [ebp - 4], ecx
jge 0x4791df
mov eax, dword [esi]
imul eax, dword [ebp - 4]
add eax, dword [esi + 0x10]
cmp dword [ebp - 4], ecx
mov edi, dword [eax]
mov ebx, dword [eax + 4]
jl 0x47917d
mov ebx, dword [ebp + 0xc]
push 1
pop edi
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.0044204d
pop ecx
test ax, ax
pop ecx
je 0x47929b
xor edi, edi
cmp dword [ebp - 0x14], edi
jle 0x479247
mov eax, dword [esi]
imul eax, edi
add eax, dword [esi + 0x10]
cmp word [ebp + 0x18], 0
mov ecx, dword [eax]
mov eax, dword [eax + 4]
je 0x47922a
mov edx, dword [ebx + 0x30]
cmp edx, ecx
jle 0x479221
mov ecx, edx
mov edx, dword [ebx + 0x34]
cmp edx, eax
jge 0x47922a
mov eax, edx
push 0
push eax
push ecx
lea eax, [ebp - 0x40]
push ebx
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00478a49
add esp, 0x1c
inc edi
cmp edi, dword [ebp - 0x14]
jl 0x479204
cmp dword [ebp - 0x10], 0
mov eax, dword [ebp - 0xc]
je 0x479251
inc eax
push dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x40]
push dword [ebp - 0x44]
push ebx
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00478a49
add esp, 0x1c
cmp word [ebp - 0x20], 0
je 0x479283
push dword [ebp - 0x4c]
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00443f1b
add esp, 0xc
cmp word [ebp - 0x28], 0
je 0x479298
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 8]
call fcn.00444536
pop ecx
pop ecx
push 1
pop edi
cmp dword [ebp + 0x14], 0
jne 0x4792d6
cmp dword [ebp - 0x24], 0
jne 0x4792d6
mov eax, dword [ebp - 0x14]
push 0xa
cdq
pop ecx
idiv ecx
test edx, edx
jne 0x4792d6
call fcn.004c096e
sub eax, dword [ebp - 0x58]
cmp eax, 0x3c
jbe 0x4792d6
call fcn.0043bf5e
push edi
push 0x458
mov dword [ebp - 0x24], eax
call fcn.0043bf73
pop ecx
pop ecx
cmp word [ebp - 0x54], 0
mov eax, dword [ebp - 0x38]
je 0x4792eb
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], eax
jmp 0x4792f3
inc eax
and dword [ebp - 0x10], 0
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0xb0]
xor ebx, ebx
mov dword [eax], ecx
jmp 0x47932f
mov eax, dword [0x5b3cbc]
cmp eax, edi
jle 0x479323
cdq
sub eax, edx
sar eax, 1
cmp eax, edi
jle 0x47931b
mov dword [0x5b3cbc], eax
jmp 0x47932f
mov dword [0x5b3cbc], edi
jmp 0x47932f
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 4]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jl 0x4790d8
mov edx, dword [ebp - 4]
cmp edx, dword [esi + 4]
mov dword [ebp - 0x14], edx
jl 0x479085
cmp dword [ebp - 0x24], ebx
je 0x479358
push dword [ebp - 0x24]
call fcn.0043bfa3
pop ecx
push dword [ebp - 8]
call fcn.00455083
pop ecx
push dword [ebp - 0x48]
call fcn.00455083
pop ecx
pop edi
pop esi
pop ebx
leave
ret