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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ecx
mov byte [ebp - 0x11], dl
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040a884
xor eax, eax
push ebp
push 0x795387
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.KERNEL32.DLL_GetTickCount_1
mov dword [ebp - 0x34], eax
cmp dword [ebp - 4], 0
jne 0x7950a6
cmp byte [ebp - 0x11], 0
je 0x795349
mov eax, dword [ebp - 4]
test eax, eax
je 0x7950b2
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x18], eax
xor edx, edx
push ebp
push 0x795306
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp + 8]
mov edx, dword [eax - 4]
mov eax, 0x7953a4
call fcn.0079476c
push 2
mov eax, dword [ebp + 8]
push dword [eax + 0xc]
push dword [eax + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 4]
mov dl, 1
mov eax, dword [0x794628]
call fcn.00797ad4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
call dword [edx]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 0x18]
mov ebx, dword [eax]
call dword [ebx + 0x1c]
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
call fcn.00794f64
pop ecx
mov ebx, eax
mov eax, ebx
shl eax, 0xa
push eax
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x794f04]
call fcn.0040d2b8
add esp, 4
mov eax, dword [ebp - 8]
test eax, eax
je 0x79514b
sub eax, 4
mov eax, dword [eax]
mov ebx, eax
cmp byte [ebp - 0x11], 0
jne 0x79517c
xor edi, edi
mov eax, 1
cmp ebx, edi
jle 0x79517c
mov edx, dword [ebp - 4]
movzx edx, byte [edx + eax - 1]
mov ecx, dword [ebp - 8]
mov byte [ecx + edi], dl
inc eax
cmp eax, dword [ebp - 0x1c]
jle 0x795177
mov eax, 1
inc edi
cmp ebx, edi
jg 0x79515e
cmp byte [ebp - 0x11], 0
je 0x795187
call fcn.00407610
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
jmp 0x795244
cmp byte [ebp - 0x11], 0
je 0x7951be
mov esi, ebx
dec esi
test esi, esi
jl 0x7951be
inc esi
xor edi, edi
mov eax, 0xff
call fcn.00407638
mov edx, dword [ebp - 8]
mov byte [edx + edi], al
inc edi
dec esi
jne 0x7951aa
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
push edx
push eax
mov eax, dword [ebp - 0x18]
call fcn.004a21d8
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
push edx
push eax
mov eax, ebx
cdq
cmp edx, dword [esp + 4]
jne 0x7951eb
cmp eax, dword [esp]
pop edx
pop eax
jae 0x7951fe
jmp 0x7951ef
pop edx
pop eax
jge 0x7951fe
mov edx, dword [ebp - 8]
mov ecx, ebx
mov eax, dword [ebp - 0x18]
call fcn.004a25e0
jmp 0x795216
mov eax, dword [ebp - 0x18]
call fcn.004a21d8
mov ecx, dword [ebp - 0x28]
sub ecx, eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
call fcn.004a25e0
cmp dword [ebp - 0x2c], 0
jne 0x795224
cmp dword [ebp - 0x30], 2
jae 0x795232
jmp 0x795226
jge 0x795232
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
call sub.KERNEL32.DLL_FlushFileBuffers
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
add eax, 1
adc edx, 0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x18]
call fcn.004a21d8
cmp edx, dword [ebp - 0x24]
jne 0x79525c
cmp eax, dword [ebp - 0x28]
jb 0x79519a
jmp 0x795262
jl 0x79519a
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
call sub.KERNEL32.DLL_FlushFileBuffers
fild qword [ebp - 0x28]
fdiv dword [0x7953c8]
add esp, 0xfffffff4
fstp xword [esp]
wait
lea ecx, [ebp - 0xc]
mov edx, dword [0x8c2498]
mov eax, 0x7953d8
call fcn.004278e0
call sub.KERNEL32.DLL_GetTickCount_1
sub eax, dword [ebp - 0x34]
mov dword [ebp - 0x48], eax
xor eax, eax
mov dword [ebp - 0x44], eax
fild qword [ebp - 0x48]
fdiv dword [0x7953e0]
fstp xword [ebp - 0x40]
wait
movzx eax, word [ebp - 0x38]
push eax
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
lea ecx, [ebp - 0x10]
mov edx, dword [0x8c2498]
mov eax, 0x7953f0
call fcn.004278e0
push 0x795408
push dword [ebp - 0xc]
push 0x79544c
push dword [ebp - 0x10]
push 0x795468
lea eax, [ebp - 0x4c]
mov edx, 5
call fcn.0040baec
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
call fcn.0079476c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x79533c
mov eax, dword [ebp - 0x18]
xor edx, edx
mov dword [ebp - 0x18], edx
call fcn.00408ac4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x79538e
lea eax, [ebp - 0x50]
mov edx, 2
call fcn.0040a7f0
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.0040a7f0
lea eax, [ebp - 8]
mov edx, dword [0x794f04]
call fcn.0040d3dc
lea eax, [ebp - 4]
call fcn.0040a7b4
ret