Function at 0x41a620
Capabilities:
Check for time delay via gettickcount
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x217c
call fcn.004887b0
mov eax, dword [0x4db06c]
xor eax, esp
mov dword [esp + 0x2178], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
cmp dword [ebx + 0x100c], 0
mov dword [esp + 0x14], eax
je 0x41a673
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2178]
xor ecx, esp
call fcn.00487555
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0x10]
mov esi, eax
shr esi, 1
mov edi, eax
not esi
and edi, 1
mov ecx, eax
mov dword [esp + 0x1c], edi
and esi, 1
and ecx, 4
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], ecx
test edi, edi
je 0x41a6a1
mov dword [ebx + 0x100c], edi
jmp 0x41a6ae
cmp dword [ebx + 0x86c], 0
jne 0x41a8c6
test esi, esi
je 0x41a6e5
test al, 8
je 0x41a6dd
mov esi, dword [ebx + 0x14]
call dword [sym.imp.KERNEL30.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL30.dll_TlsGetValue]
push edi
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL30.dll_SetLastError]
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
jmp 0x41a6eb
call dword [sym.imp.KERNEL30.dll_GetLastError]
jmp 0x41a6e7
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41a70d
push ecx
lea ecx, [esp + 0x1144]
push ecx
push eax
call fcn.0041a5c0
lea eax, [esp + 0x1140]
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x38]
call fcn.0041c060
cmp dword [esp + 0x18], 0
lea ecx, [esp + 0x38]
lea ecx, [ecx + eax*2]
mov dword [esp + 0xc], ecx
je 0x41a741
mov edx, str._file_is_modified_
call fcn.0041c060
mov ecx, dword [esp + 0xc]
lea ecx, [ecx + eax*2]
mov dword [esp + 0xc], ecx
test esi, esi
mov esi, dword [esp + 0x10]
je 0x41a7bc
test esi, esi
je 0x41a7bc
mov edx, 0x4c2248
call fcn.0041c060
mov ecx, dword [esp + 0xc]
lea ecx, [ecx + eax*2]
mov eax, dword [ebx + 0x710]
test eax, eax
mov dword [esp + 0x18], ecx
movzx eax, ax
jg 0x41a774
mov eax, 0x400
push 0
push 0x820
push ecx
push eax
push esi
push 0
push 0x1200
call dword [sym.imp.KERNEL30.dll_FormatMessageW]
mov ecx, dword [esp + 0x18]
cmp word [ecx + eax*2 - 2], 0xa
lea eax, [ecx + eax*2]
lea esi, [eax - 4]
cmovne esi, eax
mov eax, dword [esp + 0x10]
push eax
push 0x4c224c
push esi
call fcn.0040e140
add esp, 0xc
lea ecx, [esi + eax*2]
mov esi, dword [esp + 0x10]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x14]
mov eax, 0x4c1430
test edx, edx
cmovne eax, edx
push eax
push 0x4c2254
push ecx
call fcn.0040e140
mov ecx, dword [esp + 0x18]
add esp, 0xc
lea eax, [ecx + eax*2]
lea ecx, [esp + 0x38]
sub eax, ecx
sar eax, 1
push eax
mov eax, ecx
mov ecx, ebx
push eax
call fcn.0041a930
cmp dword [ebx + 0xcd0], 0
je 0x41a821
cmp dword [ebx + 0x864], 0
je 0x41a821
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
push 0x20000
lea eax, [esp + 0x54]
mov ecx, ebx
push eax
call fcn.00417da0
test edi, edi
jne 0x41a832
test byte [ebx + 0x690], 1
jne 0x41a8c6
lea eax, [esp + 0x38]
mov dword [esp + 0x30], esi
xor edi, 1
mov dword [esp + 0x24], eax
test byte [ebx + 0x690], 2
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], 2
jne 0x41a8ad
mov esi, dword [sym.imp.KERNEL30.dll_GetTickCount]
mov dword [ebx + 0x1010], 1
call esi
mov dword [ebx + 0x1000], eax
lea eax, [esp + 0x24]
push eax
push 1
push dword [ebx + 0x70c]
push dword [ebx + 0x708]
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebx + 0x1010], 0
call esi
sub eax, dword [ebx + 0x1000]
add dword [ebx + 0xff4], eax
mov eax, dword [esp + 0x34]
jmp 0x41a8b3
xor eax, eax
mov dword [esp + 0x34], eax
mov ecx, eax
sub ecx, 0
je 0x41a8e2
sub ecx, 1
jne 0x41a8cb
or dword [ebx + 0x690], 1
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2178]
xor ecx, esp
call fcn.00487555
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x100c], 0
jne 0x41a8cb
mov eax, dword [ebx + 0x690]
mov ecx, ebx
shr eax, 1
and eax, 1
push eax
call fcn.0041aa60
mov eax, dword [ebx + 0xb60]
mov ecx, dword [esp + 0x2184]
pop edi
pop esi
add dword [eax + 0x130], 1
pop ebx
adc dword [eax + 0x134], 0
xor ecx, esp
mov eax, dword [esp + 0x28]
call fcn.00487555
mov esp, ebp
pop ebp
ret 0xc