Function at 0x1021820
Capabilities:
Check for time delay via gettickcount
Create thread
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
or esi, 0xffffffff
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], esi
call fcn.01019631
cmp byte [0x1073931], 0
mov dword [ebp - 8], 0xbb8
je 0x1021856
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1073934], eax
je 0x102185d
mov dword [ebp - 8], 0x1770
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
xor ebx, ebx
push ebx
call fcn.0101ef8b
test eax, eax
jl 0x1021a8e
push edi
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.010217b2
test eax, eax
jl 0x1021a60
lea ecx, [ebp - 0x1c]
call fcn.010196f9
cmp eax, 2
jle 0x10218d2
mov eax, dword [ebp - 0x1c]
cmp word [eax + 2], 0x3a
jne 0x10218d2
movzx eax, word [eax]
lea ecx, [eax - 0x61]
cmp cx, 0x19
ja 0x10218c3
movzx esi, ax
sub esi, 0x61
jmp 0x10218d2
lea ecx, [eax - 0x41]
cmp cx, 0x19
ja 0x10218d2
movzx esi, ax
sub esi, 0x41
cmp byte [ebp + 0xc], bl
je 0x1021a2d
cmp esi, ebx
jl 0x10218eb
cmp byte [esi + 0x1073d9c], bl
jne 0x1021a2d
push 0x18
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
je 0x1021902
mov ecx, eax
call fcn.01020213
mov edi, eax
jmp 0x1021904
xor edi, edi
cmp edi, ebx
je 0x1021a60
lea ecx, [ebp - 0x1c]
call fcn.0101a4ee
push eax
mov ecx, edi
call fcn.01019dfd
lea eax, [edi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push ebx
push ebx
push edi
push 0x1021091
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
test ebx, ebx
je 0x10219f3
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0xc], 0
jne 0x10219b1
test esi, esi
jl 0x1021965
mov byte [esi + 0x1073d9c], 1
mov eax, dword [edi + 0x14]
push dword [edi + 0x10]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1057798]
cmp eax, 0x1057798
je 0x1021a24
test byte [eax + 0x3c], 1
je 0x1021a24
cmp byte [eax + 0x39], 2
jb 0x1021a24
push dword [edi]
push dword [edi + 0x10]
push 0x1004b28
push 0xe
push dword [eax + 0x34]
push dword [eax + 0x30]
call fcn.01020009
jmp 0x1021a24
mov eax, dword [0x1057798]
cmp eax, 0x1057798
je 0x10219e9
test byte [eax + 0x3c], 1
je 0x10219e9
cmp byte [eax + 0x39], 2
jb 0x10219e9
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
mov eax, dword [0x1057798]
push 0x1004b28
push 0xf
push dword [eax + 0x34]
push dword [eax + 0x30]
call fcn.01020009
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1021a24
mov ecx, edi
call fcn.0102106a
mov eax, dword [0x1057798]
cmp eax, 0x1057798
je 0x1021a24
test byte [eax + 0x3c], 1
je 0x1021a24
cmp byte [eax + 0x39], 2
jb 0x1021a24
push 0x1004b28
push 0x10
push dword [eax + 0x34]
push dword [eax + 0x30]
call fcn.0101ffb7
mov ecx, edi
call fcn.0102106a
jmp 0x1021a58
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
push dword [ebp - 0x1c]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 4], eax
call edi
test esi, esi
jl 0x1021a58
sub eax, ebx
cmp dword [ebp - 8], eax
sbb al, al
inc al
mov byte [esi + 0x1073d9c], al
cmp dword [ebp - 4], 0xffffffff
jne 0x1021a76
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1021a78
and eax, 0xffff
or eax, 0x80070000
jmp 0x1021a78
xor eax, eax
push eax
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.01021407
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
pop edi
lea ecx, [ebp - 0x1c]
call fcn.01019f33
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret 8