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

Disassembly:
sub esp, 0xbc
mov eax, dword [0x56a8e0]
xor eax, esp
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
mov eax, dword [ebx + 0x298]
push esi
mov dword [esp + 8], ecx
test eax, eax
jne 0x4e2211
push 0x56e434
call fcn.004aba60
mov esi, eax
add esp, 4
test esi, esi
je 0x4e2107
mov ecx, esi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e2090
sub ecx, edx
add ecx, 0xd
cmp ecx, 0x80
jae 0x4e20ff
lea edx, [esp + 0x3c]
mov eax, esi
sub edx, esi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4e20b0
mov eax, 0x56e43c
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4e20c1
push edi
lea edi, [esp + 0x40]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4e20d0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x40]
and ecx, 3
push 0x56e44c
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.005047a9
add esp, 8
mov esi, eax
pop edi
jmp 0x4e2103
mov esi, dword [esp + 4]
test esi, esi
jne 0x4e2154
mov ecx, dword [0x56e454]
mov eax, dword [str.clptrc1.txt]
mov edx, dword [0x56e458]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], eax
mov al, byte [0x56e45c]
lea ecx, [esp + 0x3c]
push 0x56e460
push ecx
mov dword [esp + 0x4c], edx
mov byte [esp + 0x50], al
call fcn.005047a9
mov esi, eax
add esp, 8
test esi, esi
jne 0x4e2154
mov dword [ebx + 0x298], 0xffffffff
jmp 0x4e223c
push esi
call fcn.00497adb
lea edx, [esp + 0x40]
push edx
call fcn.004ddf50
lea eax, [esp + 0x44]
push 0x56e464
push eax
call fcn.005047a9
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4e218b
mov dword [ebx + 0x298], 0xffffffff
jmp 0x4e223c
lea eax, [esp + 0x3c]
lea edx, [ebx + 0x2a0]
mov ecx, eax
mov dword [ebx + 0x298], 1
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4e21a3
lea edx, [esp + 0x1c]
push 0xa
push edx
call fcn.004ddda0
lea eax, [esp + 0x14]
push eax
call fcn.00505092
lea ecx, [esp + 0x18]
push ecx
call fcn.00498ff9
push eax
push 0x56e468
lea edx, [esp + 0x40]
push 0x14
push edx
call fcn.00504cbd
add esp, 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
movzx ecx, word [esp + 0x1c]
push eax
lea eax, [esp + 0x28]
push eax
push ecx
lea edx, [esp + 0x3c]
push edx
push str._s__03d__s_th_ld_ti_ld__p_n
push esi
call fcn.00506143
add esp, 0x20
jmp 0x4e223c
inc eax
mov dword [ebx + 0x298], eax
test eax, eax
jg 0x4e2226
mov dword [ebx + 0x298], 1
lea eax, [ebx + 0x2a0]
push 0x56e48c
push eax
call fcn.005047a9
add esp, 8
mov esi, eax
cmp dword [ebx + 0x298], 0
jle 0x4e230c
test esi, esi
je 0x4e230c
mov eax, dword [ebx + 0x29c]
cmp eax, 0xc001c001
je 0x4e226d
push eax
push str.__ErrV__x_n
push esi
call fcn.00506143
add esp, 0xc
mov eax, dword [ebx + 0x298]
cdq
mov ecx, 0x64
idiv ecx
cmp edx, 0xa
jne 0x4e22cf
lea edx, [esp + 0xc]
push edx
call fcn.00505092
lea eax, [esp + 0x10]
push eax
call fcn.00498ff9
push eax
push 0x56e49c
lea ecx, [esp + 0x38]
push 0x14
push ecx
call fcn.00504cbd
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movzx edx, word [esp + 0x14]
push eax
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x48]
push str.___s__03d__ld_
push ecx
call fcn.00496d63
add esp, 0x14
jmp 0x4e22d4
mov byte [esp + 0x3c], 0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
lea edx, [esp + 0x3c]
push edx
mov edx, dword [ebx + 0x298]
push eax
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str._ld__p__d__s_s_s_n
push esi
call fcn.00506143
push esi
call fcn.00497c05
push esi
call fcn.00497adb
add esp, 0x28
mov ecx, dword [esp + 0xbc]
pop esi
xor ecx, esp
call fcn.00493d56
add esp, 0xbc
ret