Function at 0x401c59
Capabilities:
Check for time delay via gettickcount
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x4056e8]
push ebx
push esi
xor ebx, ebx
cmp eax, ebx
push edi
mov edi, dword [ebp + 0xc]
mov esi, 0x8000
je 0x401cb8
cmp edi, 0x2b
je 0x401ca1
cmp edi, 0x2c
je 0x401ca1
cmp edi, 0x117
je 0x401ca1
cmp edi, esi
jae 0x401cb8
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DefWindowProcA]
pop edi
pop esi
pop ebx
leave
ret 0x10
push dword [ebp + 0x14]
mov ecx, dword [eax]
push dword [ebp + 0x10]
push edi
push eax
call dword [ecx + 0x18]
mov eax, edi
shr eax, 5
and eax, 1
jmp 0x401c9a
mov eax, 0x11f
cmp edi, eax
ja 0x401f29
je 0x401dbe
mov eax, edi
sub eax, 0x10
je 0x4023f3
sub eax, 0x76
je 0x401db2
sub eax, 0x8d
je 0x401d51
sub eax, 4
jne 0x401c8a
test byte [0x4056dc], 1
jne 0x4023f3
mov ecx, dword [0x405700]
cmp ecx, 0x1f
jae 0x4023f3
lea eax, [ecx*4 + 0x40564c]
mov edx, dword [eax]
cmp edx, dword [ebp + 0x10]
je 0x401d25
add eax, 4
inc ecx
cmp eax, 0x4056c8
jb 0x401d0e
jmp 0x4023f3
push dword [ebp + 0x14]
push ecx
call fcn.004024b5
test eax, eax
pop ecx
pop ecx
jne 0x4023f3
test byte [0x4056f0], 2
je 0x4023f3
or dword [0x4056f0], 0x10
jmp 0x4023f3
push ebx
push 0x7ffffffe
push 1
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetTimer]
mov edx, dword [0x4056dc]
cmp edx, ebx
jge 0x4023f3
test dl, 1
je 0x401e6c
mov ecx, dword [0x405704]
cmp dword [0x40550c], ecx
jne 0x4023f3
mov eax, dword [0x405700]
cmp dword [0x405510], eax
jne 0x4023f3
push ecx
push eax
call fcn.004024b5
test eax, eax
pop ecx
pop ecx
je 0x401f4d
jmp 0x4023f3
mov dword [ebp + 0x10], 1
jmp 0x401c8a
mov edx, dword [ebp + 0x14]
cmp edx, ebx
je 0x401e7e
mov ecx, dword [0x405700]
cmp edx, dword [ecx*4 + 0x405648]
je 0x401e0a
mov ecx, dword [0x40526c]
cmp ecx, 0x1f
ja 0x4023f3
lea eax, [ecx*4 + 0x405648]
cmp edx, dword [eax]
je 0x401e02
add eax, 4
inc ecx
cmp eax, 0x4056c4
jbe 0x401dee
jmp 0x4023f3
mov dword [0x405700], ecx
xor edi, edi
cmp dword [ebp + 0x10], ebx
movzx eax, word [ebp + 0x10]
movzx edx, word [ebp + 0x12]
mov dword [0x405704], eax
mov dword [0x4056dc], edx
jge 0x401e29
and dword [0x4056f0], 7
test dl, 0x10
je 0x401e6c
test dl, 1
je 0x401e49
test byte [0x4056f0], 1
jne 0x401e63
mov dword [0x40550c], eax
mov dword [0x405510], ecx
jmp 0x401e51
cmp ecx, dword [0x405708]
jae 0x401e63
push ebx
push dword [0x40528c]
push 1
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetTimer]
or byte [0x4056df], 0x80
jmp 0x401e75
and edx, 0x11
mov dword [0x4056dc], edx
cmp edi, ebx
je 0x401ea1
jmp 0x4023f3
cmp dword [ebp + 0x10], ebx
jne 0x401f1d
mov dword [0x4056dc], ebx
mov dword [0x405704], 0x8310
mov dword [0x4056f0], 0xb
test byte [0x4056c9], 0x20
jne 0x401f1d
mov eax, dword [0x405700]
push dword [eax*4 + 0x405648]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov esi, eax
mov eax, dword [0x4056fc]
dec esi
lea eax, [eax + eax*2]
cmp esi, eax
jl 0x401f1d
mov eax, dword [0x405700]
push esi
push dword [eax*4 + 0x405648]
call dword [sym.imp.USER32.dll_GetMenuItemID]
cmp eax, ebx
mov dword [0x4056ec], eax
jg 0x401eed
mov dword [0x4056ec], esi
neg edi
sbb edi, edi
push 0x4054fc
and edi, 8
push ebx
add edi, 3
push str.32768
mov dword [0x4056f0], edi
call dword [sym.imp.USER32.dll_FindWindowA]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
test eax, eax
jne 0x4023f3
and dword [0x4056f0], 8
jmp 0x4023f3
mov eax, edi
sub eax, 0x120
je 0x4023fa
dec eax
je 0x401f6f
sub eax, 0x7edf
je 0x401f4d
dec eax
dec eax
je 0x402153
jmp 0x401c8a
mov eax, dword [ebp + 0x10]
cmp eax, ebx
push ebx
jle 0x401f66
dec eax
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x4023f3
push 0x27
push 0x100
jmp 0x401f58
mov eax, dword [0x4056f0]
test al, 1
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
jne 0x401f93
test al, 2
je 0x4021f1
or eax, 1
mov dword [0x4056f0], eax
jmp 0x4021f1
test al, 4
jne 0x4023f3
push 0xa3a125
push 0x1022221
call fcn.00403669
test al, 0xc
pop ecx
pop ecx
mov dword [ebp + 0x10], eax
jne 0x401ff5
call edi
mov ecx, dword [0x4056d4]
sub ecx, eax
cmp ecx, ebx
mov dword [ebp - 8], ecx
jle 0x401fec
cmp ecx, 0x168
jge 0x401fec
push dword [ebp + 0x14]
push 2
push 0x121
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_PostMessageA]
push 0xd
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4023f3
mov eax, dword [ebp + 0x10]
shr eax, 5
or dword [ebp + 0x10], eax
test byte [ebp + 0x10], 0x10
je 0x402007
and dword [0x4056f0], 0xffffffef
jmp 0x4023f3
test byte [ebp + 0x10], 3
je 0x40206a
test byte [0x4056f0], 0x10
mov esi, dword [sym.imp.USER32.dll_PostMessageA]
je 0x402030
push ebx
push 0x25
push 0x100
push dword [ebp + 8]
call esi
and dword [0x4056f0], 0xffffffef
call edi
add eax, 0xed
test byte [ebp + 0x10], 2
mov dword [0x4056d4], eax
mov eax, dword [0x4056fc]
lea ecx, [eax - 7]
mov eax, dword [0x4056f0]
je 0x402053
test al, 0x20
jmp 0x402055
test al, 0x40
je 0x402059
add ecx, ecx
and eax, 0x1b
or eax, 4
mov dword [0x4056f0], eax
push ecx
jmp 0x4021c0
test byte [0x4056f0], 2
je 0x4021f1
lea eax, [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov esi, dword [0x4056f4]
mov eax, dword [ebp - 8]
mov ebx, dword [0x4054fc]
mov ecx, dword [0x405504]
lea edx, [esi + esi]
sub eax, ebx
cmp eax, edx
jle 0x4020a8
mov eax, ecx
sub eax, dword [ebp - 8]
cmp eax, edx
jg 0x4020ac
or dword [ebp + 0x10], 0x10
mov eax, dword [ebp - 4]
sub eax, dword [0x405500]
cmp eax, edx
jg 0x4020be
mov dword [ebp - 4], eax
jmp 0x4020d6
mov eax, dword [0x405508]
sub eax, dword [ebp - 4]
dec eax
cmp eax, edx
jg 0x4021ef
or dword [ebp + 0x10], 2
mov dword [ebp - 4], eax
cmp eax, esi
jle 0x4021de
test byte [0x4056f0], 8
jne 0x4021de
test byte [ebp + 0x10], 0x1c
jne 0x4021e8
lea eax, [eax + eax*4]
shl eax, 1
cdq
idiv esi
mov edi, eax
sub edi, 0xf
jns 0x402106
neg edi
lea eax, [ecx + ebx]
push 0xfffffffffffffffe
cdq
pop ebx
idiv ebx
mov edx, dword [ebp - 8]
add edx, eax
jns 0x402118
neg edx
mov eax, esi
shl eax, 2
sub ecx, eax
sub ecx, dword [0x4054fc]
lea eax, [edx + edx*4]
shl eax, 1
cdq
idiv ecx
add edi, eax
mov dword [ebp - 8], eax
inc eax
imul edi, eax
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 4]
mov edi, dword [ebp + 0xc]
shl ecx, 4
lea eax, [eax + ecx - 3]
mov dword [0x4056d4], eax
xor ebx, ebx
and dword [ebp + 0x10], 2
jne 0x402181
mov eax, dword [0x405704]
cmp eax, ebx
je 0x402169
cmp eax, 0x8800
jne 0x402197
and dword [0x4056f0], 0x1b
cmp dword [ebp + 0x10], ebx
je 0x4021d2
or dword [0x4056f0], 0x40
jmp 0x4023f3
test byte [0x4056f0], 2
je 0x402197
mov eax, dword [0x405704]
cmp eax, dword [0x4056ec]
je 0x402169
mov eax, dword [ebp + 0x10]
mov esi, dword [sym.imp.USER32.dll_PostMessageA]
push ebx
add eax, 0x26
push eax
push 0x100
push dword [ebp + 8]
call esi
cmp edi, 0x121
je 0x402169
mov eax, dword [ebp + 0x14]
cmp eax, ebx
jle 0x402169
dec eax
push eax
push dword [ebp + 0x10]
push 0x8002
push dword [ebp + 8]
call esi
jmp 0x4023f3
or dword [0x4056f0], 0x20
jmp 0x4023f3
cmp dword [ebp + 0x10], 0x14
jb 0x4023f3
and dword [0x4056f0], 2
xor ebx, ebx
mov eax, dword [0x405284]
cmp eax, ebx
jne 0x402300
cmp dword [ebp + 8], ebx
je 0x402217
push 0x700d
push 0x242e0102
call fcn.00403669
pop ecx
pop ecx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov ecx, eax
and ecx, 1
test al, 3
mov dword [0x405284], ecx
je 0x402263
test byte [0x4056f0], 8
jne 0x4023f3
push eax
call fcn.00403255
test eax, eax
pop ecx
je 0x4023f3
cmp dword [ebp + 8], ebx
jne 0x4023f3
test byte [ebp + 0x10], 8
je 0x402306
mov dword [0x4056d8], ebx
jmp 0x402306
test al, 0x20
je 0x402276
mov dword [0x40561c], 0x100
jmp 0x40249d
test al, 0x10
je 0x4022bd
push 0x1d73
push 0x72711110
call fcn.00403669
cmp dword [0x405708], ebx
pop ecx
pop ecx
mov dword [0x40561c], eax
jne 0x4022a7
cmp dword [0x405288], ebx
jle 0x4022a7
or dword [0x40561c], 0x40
call edi
mov dword [0x4056d8], eax
mov dword [0x405284], 2
jmp 0x4023f3
test al, 0xc
je 0x4022e8
test al, 8
je 0x4022cc
mov word [0x405274], bx
test byte [0x4056dc], 4
jne 0x4023f3
mov dword [0x4056d8], 0xfffffffe
jmp 0x4023f3
cmp dword [0x4056d8], 0xfffffffe
jne 0x4023f3
mov dword [0x4056d8], ebx
jmp 0x402431
jle 0x4023ba
push 0xffffffffffffffff
push 0x200d0102
call fcn.00403669
pop ecx
pop ecx
call edi
sub eax, dword [0x4056d8]
push 2
cmp eax, 0x2d0
pop esi
jle 0x402382
cmp dword [0x405284], esi
jl 0x402370
mov eax, dword [0x405704]
cmp eax, 0x8302
jne 0x402340
mov dword [0x40526c], ebx
cmp eax, 0x8400
jb 0x402367
cmp dword [0x405288], 0x5b
jle 0x40235f
push 0x40529c
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x402367
mov dword [0x40561c], esi
jmp 0x402382
or byte [0x40561c], 0x80
jmp 0x402382
cmp dword [0x405704], 0x8400
jb 0x402382
mov dword [0x405624], esi
cmp dword [0x405284], esi
jl 0x402395
cmp dword [ebp + 8], ebx
jne 0x40249d
jmp 0x4023f3
push 0xff737271
push 0x1d241110
mov dword [0x405284], ebx
call fcn.00403669
cmp dword [0x4056dc], 0x80008090
pop ecx
pop ecx
je 0x402431
jmp 0x4023f3
push 0x7f00
push ebx
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push ebx
push 0x40528c
push ebx
push 0x6a
mov dword [0x405284], ebx
mov dword [0x40528c], 0x190
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
add dword [0x40528c], 0x11
xor eax, eax
jmp 0x401c9a
cmp byte [ebp + 0x10], 9
jne 0x40240f
mov dword [0x405704], 0x8302
jmp 0x40249d
cmp byte [ebp + 0x10], 8
jne 0x402474
mov eax, dword [0x405274]
cmp eax, ebx
jle 0x402431
add eax, dword [0x405278]
mov dword [0x405274], eax
jns 0x402431
mov dword [0x405274], ebx
mov esi, dword [sym.imp.USER32.dll_FindWindowExA]
push ebx
mov eax, str.32768
push eax
push ebx
push eax
push ebx
push ebx
call esi
push eax
push ebx
call esi
test eax, eax
je 0x4024aa
cmp dword [0x405274], ebx
mov esi, dword [sym.imp.USER32.dll_PostMessageA]
jl 0x402467
push ebx
push 5
push 0x8000
push dword [ebp + 8]
call esi
push ebx
push 0x1b
push 0x100
push ebx
call esi
jmp 0x4024aa
cmp byte [ebp + 0x10], 0x20
jne 0x401c8a
cmp dword [0x405704], 0x8800
jb 0x402496
mov dword [0x405704], 0x8310
jmp 0x40249d
and dword [0x4056dc], 0x11
push ebx
push ebx
push 0x1f
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [ebp + 0x10]
and eax, 0xffffff80
jmp 0x401c9a