Function at 0x5c2830
Capabilities:
Check for time delay via gettickcount
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x30
cmp dword [ecx], 0
push esi
push edi
mov dword [esp + 0x10], ecx
je 0x5c2dc7
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov dword [esp + 8], eax
je 0x5c2872
mov edx, dword [eax]
and edx, 0xff
cmp edx, 0x80
jae 0x5c2872
push eax
call esi
mov ecx, dword [esp + 0x10]
cmp dword [ecx], 5
jge 0x5c28d5
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.005c2230
mov ecx, dword [esp + 0x10]
mov edi, eax
mov eax, dword [edi]
add esp, 8
cmp ecx, eax
je 0x5c28cc
lea ecx, [esp + 8]
call fcn.004039f0
mov eax, dword [edi]
test eax, eax
mov dword [esp + 8], eax
je 0x5c28cc
mov edx, dword [eax]
and edx, 0xff
cmp edx, 0x80
jae 0x5c28c3
push eax
call esi
and eax, 0xff
cmp eax, 0xff
jne 0x5c28cc
lea ecx, [esp + 8]
call fcn.0049d350
lea ecx, [esp + 0x1c]
call fcn.004039f0
mov ecx, dword [esp + 0x10]
mov dl, byte [ecx + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
xor eax, eax
cmp dl, al
mov dword [esp + 0xc], eax
jne 0x5c2b22
or ecx, 0xffffffff
mov edi, str.wininet.dll
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.wininet.dll
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], eax
call fcn.0049d9d0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.005c24f0
add esp, 8
lea ecx, [esp + 0x18]
call fcn.004039f0
lea ecx, [esp + 0x28]
push ecx
call fcn.004a6e30
lea edx, [esp + 0x34]
push edx
call fcn.004a6e30
fld qword [eax]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x24]
fstp qword [esp + 0x2c]
push ecx
call fcn.004a7810
mov eax, dword [eax]
add esp, 0x10
test eax, eax
je 0x5c2971
lea ecx, [eax + 4]
test ecx, ecx
je 0x5c2971
test eax, eax
je 0x5c296d
add eax, 4
jmp 0x5c2976
xor eax, eax
jmp 0x5c2976
mov eax, 0x6b6e10
push eax
lea edx, [esp + 0x10]
push str._Log_time:__s__n
push edx
call fcn.00403a80
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.004039f0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x24], eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5c29d5
test dword [eax], 0xffffff00
je 0x5c29d5
mov cl, byte [eax + 4]
add eax, 4
test cl, cl
je 0x5c29d5
test eax, eax
jne 0x5c29c2
mov eax, 0x6b6e10
push eax
lea edx, [esp + 0x10]
push str.wininet.dll_version:__s_n
push edx
call fcn.00403a80
add esp, 0xc
mov eax, dword [0x6b8df0]
test eax, eax
mov dword [esp + 0x14], 0
je 0x5c2a04
lea edx, [eax + 4]
test edx, edx
je 0x5c2a04
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.0049d9d0
call fcn.004ca350
fstp dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x5c2a62
test dword [ecx], 0xffffff00
je 0x5c2a62
mov al, byte [ecx + 4]
test al, al
lea edx, [ecx + 4]
je 0x5c2a62
fld dword [esp + 0x18]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jnp 0x5c2a62
test edx, edx
jne 0x5c2a41
mov edx, 0x6b6e10
fld dword [esp + 0x18]
sub esp, 8
fstp qword [esp]
push edx
lea eax, [esp + 0x18]
push str._s_version__.2f_n
push eax
call fcn.00403a80
mov ecx, dword [esp + 0x28]
add esp, 0x14
test ecx, ecx
mov edx, dword [esp + 0x10]
mov byte [edx + 0x20], 1
je 0x5c2abf
mov eax, dword [ecx]
and eax, 0xff
cmp eax, 0x80
mov edi, ecx
jae 0x5c2abf
push ecx
call esi
and eax, 0xff
cmp eax, 0x7f
jne 0x5c2aae
mov ecx, dword [edi]
and ecx, 0xff
cmp ecx, 0x80
jae 0x5c2aa9
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
jmp 0x5c2aae
mov eax, 0xff
test eax, eax
jne 0x5c2abf
mov edx, dword [esp + 0x14]
push edx
call fcn.00499410
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
mov dword [esp + 0x14], 0
je 0x5c2b22
mov ecx, dword [eax]
and ecx, 0xff
cmp ecx, 0x80
mov edi, eax
jae 0x5c2b22
push eax
call esi
and eax, 0xff
cmp eax, 0x7f
jne 0x5c2b11
mov edx, dword [edi]
and edx, 0xff
cmp edx, 0x80
jae 0x5c2b0c
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
jmp 0x5c2b11
mov eax, 0xff
test eax, eax
jne 0x5c2b22
mov eax, dword [esp + 0x1c]
push eax
call fcn.00499410
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x10]
sub eax, dword [ecx + 0x24]
push eax
lea edx, [esp + 0x10]
push str.__d_
push edx
call fcn.00403a80
mov eax, dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x5c2b5c
push eax
lea eax, [esp + 0x10]
push str.id__d:
push eax
call fcn.00403a80
add esp, 0xc
mov edi, dword [esp + 0x10]
lea esi, [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x14]
test eax, eax
je 0x5c2b7f
cmp eax, dword [esp + 0x1c]
jne 0x5c2b7f
inc dword [esi + 0x18]
jmp 0x5c2ba7
mov al, byte [esi + 5]
test al, al
je 0x5c2b92
lea ecx, [esi + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x5c2b99
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x10]
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], eax
push 2
lea ecx, [edi + 4]
push 0
call fcn.004a0e70
mov eax, dword [esp + 0xc]
test eax, eax
je 0x5c2bd0
lea edx, [eax + 4]
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x10]
not ecx
dec ecx
jmp 0x5c2bd7
xor ecx, ecx
mov edx, 0x6b6e10
push ecx
push edx
lea ecx, [edi + 4]
call fcn.004a1040
mov eax, dword [esp + 8]
test eax, eax
je 0x5c2c00
lea edx, [eax + 4]
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x10]
not ecx
dec ecx
mov eax, edx
jmp 0x5c2c07
xor ecx, ecx
mov eax, 0x6b6e10
push ecx
push eax
lea ecx, [edi + 4]
call fcn.004a1040
mov eax, dword [esp + 8]
test eax, eax
je 0x5c2c42
mov cl, byte [eax + 4]
add eax, 4
test cl, cl
je 0x5c2c42
mov cl, byte [eax + 1]
test cl, cl
je 0x5c2c38
lea ebx, [ebx]
mov cl, byte [eax + 2]
inc eax
test cl, cl
jne 0x5c2c30
cmp byte [eax], 0xa
sete al
test al, al
jne 0x5c2c51
push 1
push 0x6978ec
lea ecx, [edi + 4]
call fcn.004a1040
lea ecx, [edi + 4]
call fcn.004a0f70
mov eax, dword [esi + 0x18]
test eax, eax
je 0x5c2c77
mov eax, dword [esi + 0x14]
test eax, eax
je 0x5c2c77
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 0x14], eax
jne 0x5c2c77
dec dword [esi + 0x18]
jmp 0x5c2c98
mov al, byte [esi + 5]
test al, al
mov dword [esi + 0x14], 0
je 0x5c2c91
add esi, 0x1c
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x5c2c98
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x14]
mov al, byte [edi + 0x18]
test al, al
je 0x5c2d01
mov eax, dword [esp + 0xc]
test eax, eax
je 0x5c2cac
add eax, 4
jmp 0x5c2cb1
mov eax, 0x6b6e10
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call esi
mov eax, dword [esp + 8]
test eax, eax
je 0x5c2cc7
add eax, 4
jmp 0x5c2ccc
mov eax, 0x6b6e10
push eax
call esi
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x5c2cfa
mov dl, byte [ecx + 4]
test dl, dl
lea eax, [ecx + 4]
je 0x5c2cfa
mov dl, byte [eax + 1]
test dl, dl
je 0x5c2cf0
mov dl, byte [eax + 2]
inc eax
test dl, dl
jne 0x5c2ce8
cmp byte [eax], 0xa
sete al
test al, al
jne 0x5c2d05
push 0x6978ec
call esi
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x5c2d66
mov edx, dword [eax]
and edx, 0xff
cmp edx, 0x80
mov esi, eax
jae 0x5c2d66
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
and eax, 0xff
cmp eax, 0x7f
jne 0x5c2d51
mov eax, dword [esi]
and eax, 0xff
cmp eax, 0x80
jae 0x5c2d4c
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
jmp 0x5c2d51
mov eax, 0xff
test eax, eax
jne 0x5c2d62
mov ecx, dword [esp + 0xc]
push ecx
call fcn.00499410
add esp, 4
mov ecx, dword [esp + 8]
test ecx, ecx
mov dword [esp + 0xc], 0
je 0x5c2dc7
mov edx, dword [ecx]
and edx, 0xff
cmp edx, 0x80
mov esi, ecx
jae 0x5c2dc7
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
and eax, 0xff
cmp eax, 0x7f
jne 0x5c2db6
mov eax, dword [esi]
and eax, 0xff
cmp eax, 0x80
jae 0x5c2db1
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
jmp 0x5c2db6
mov eax, 0xff
test eax, eax
jne 0x5c2dc7
mov ecx, dword [esp + 8]
push ecx
call fcn.00499410
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8