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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3a4
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
test byte [0x1082098], 1
push edi
mov esi, ecx
mov dword [ebp - 0x38c], ebx
jne 0x104fc65
mov eax, dword [esi + 0x84]
or dword [0x1082098], 1
cmp eax, ebx
je 0x104fc5e
mov eax, dword [eax + 0x54]
jmp 0x104fc60
xor eax, eax
mov dword [0x1082094], eax
mov eax, dword [esi + 0x80]
mov ecx, dword [eax]
lea edx, [ebp - 0x3a4]
push edx
push eax
call dword [ecx + 0x1c]
cmp dword [ebp - 0x3a0], ebx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jl 0x104fc97
mov eax, dword [0x1082094]
cmp eax, ebx
je 0x104fcb3
cmp dword [eax + 0x250], ebx
je 0x104fcb3
mov dword [esi + 0x34], ebx
mov eax, dword [esi + 0x30]
cmp eax, ebx
je 0x104fca7
push eax
call edi
mov dword [esi + 0x30], ebx
mov eax, dword [ebp - 0x3a0]
mov dword [ebp - 0x38c], eax
mov eax, dword [ebp - 0x3a4]
sub eax, ebx
je 0x104fd66
dec eax
je 0x104fd57
dec eax
je 0x104fd3b
dec eax
je 0x104fcfe
dec eax
je 0x104fcef
dec eax
je 0x104fce3
mov dword [ebp - 0x388], 0x2779
jmp 0x104fdb9
mov dword [ebp - 0x388], 0x2778
jmp 0x104fd61
mov dword [ebp - 0x388], 0x2777
jmp 0x104fdb9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x64]
cmp eax, 0x1d4c0
jbe 0x104fd2f
mov dword [esi + 0x34], ebx
mov eax, dword [esi + 0x30]
cmp eax, ebx
mov dword [ebp - 0x388], 0x277a
je 0x104fd28
push eax
call edi
mov dword [esi + 0x30], ebx
push 0x1006ca8
jmp 0x104fd95
mov dword [ebp - 0x388], 0x2775
jmp 0x104fdb9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x64]
cmp eax, 0x1d4c0
ja 0x104fd76
mov dword [ebp - 0x388], 0x2776
jmp 0x104fdb9
mov dword [ebp - 0x388], 0x277a
mov dword [esi + 0x34], ebx
jmp 0x104fdb9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x64]
cmp eax, 0x1d4c0
jbe 0x104fdaf
mov dword [esi + 0x34], ebx
mov eax, dword [esi + 0x30]
cmp eax, ebx
mov dword [ebp - 0x388], 0x277a
je 0x104fd90
push eax
call edi
mov dword [esi + 0x30], ebx
push 0x1006c80
mov eax, 0x80072efd
push 2
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x3a0], eax
call fcn.0105e573
jmp 0x104fdb9
mov dword [ebp - 0x388], 0x2774
cmp dword [ebp - 0x3a0], ebx
je 0x104fdef
mov esi, dword [esi + 4]
cmp esi, ebx
jne 0x104fdcd
mov esi, 0x1007b50
push dword [ebp - 0x3a0]
push esi
push 0x100816c
push 2
call fcn.0105e5ad
add esp, 0x10
push dword [ebp - 0x3a0]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x39c]
cmp eax, 0xffffffff
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
mov esi, 0x100
jne 0x104ff21
lea ebx, [esi - 0x80]
push ebx
lea eax, [ebp - 0x104]
push eax
push 0x26e8
push dword [0x1081390]
call edi
test eax, eax
jne 0x104fe37
push 0x10079f4
push ebx
lea eax, [ebp - 0x104]
push eax
call fcn.01034c79
xor ebx, ebx
push esi
lea eax, [ebp - 0x384]
push eax
push dword [ebp - 0x388]
push dword [0x1081390]
call edi
test eax, eax
je 0x104feec
lea eax, [ebp - 0x384]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x104fe60
sub eax, edx
sar eax, 1
mov ecx, eax
lea eax, [ebp - 0x104]
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
cmp si, bx
jne 0x104fe79
sub eax, edx
sar eax, 1
lea esi, [eax + ecx + 0x21]
xor ecx, ecx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
cmp edi, ebx
pop ecx
je 0x104feec
push dword [ebp - 0x398]
lea eax, [ebp - 0x184]
push 0x40
push eax
call fcn.01059027
test eax, eax
jl 0x104fee5
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x384]
push eax
push esi
push edi
call fcn.01034d76
add esp, 0x14
push edi
call fcn.0105db4c
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov ecx, dword [ebp - 0x39c]
pop edi
pop esi
cmp ecx, ebx
pop ebx
jne 0x104fefc
xor ecx, ecx
inc ecx
mov eax, dword [ebp - 0x398]
imul eax, eax, 0x64
xor edx, edx
div ecx
push eax
call fcn.0105db14
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x38c]
xor ecx, ebp
call fcn.01047417
leave
ret
sub eax, dword [ebp - 0x398]
xor edx, edx
cmp dword [ebp - 0x394], ebx
jbe 0x104ff4a
div dword [ebp - 0x394]
push eax
push esi
lea eax, [ebp - 0x104]
push eax
call fcn.0105c5dc
jmp 0x104fe39
mov ecx, 0x3e80
div ecx
jmp 0x104ff37