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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x520e40
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp dword [eax + 0x17c], 0
jne 0x520e00
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov byte [eax + 0x124], 0
call fcn.0065182c
mov dword [ebp - 4], eax
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov ebx, dword [eax + 0x30]
mov edx, dword [0x671ee0]
mov esi, dword [eax + 0x34]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x34]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov edx, dword [eax + 0x30]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
call fcn.00609bd0
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp ebx, dword [eax + 0x30]
jne 0x520646
mov edx, dword [0x671ee0]
cmp esi, dword [eax + 0x34]
jne 0x520646
xor eax, eax
jmp 0x520648
mov al, 1
mov byte [ebp - 0x1a], al
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp byte [eax + 0x170], 1
jne 0x520676
mov eax, dword [0x672244]
mov eax, dword [eax]
cmp dword [eax + 0x18], 1
jg 0x520676
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov byte [eax + 0x170], 0
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov esi, dword [eax + 0x128]
mov ebx, dword [esi + 0x120]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xc]
test eax, eax
je 0x5206dd
mov eax, esi
call fcn.00639684
test eax, eax
jl 0x5206dd
mov edx, 1
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x48]
test eax, eax
setge al
mov edx, dword [0x672244]
mov edx, dword [edx]
cmp dword [edx + 0x18], 1
setg dl
cmp al, dl
jne 0x5206dd
mov eax, esi
call fcn.00639600
mov edx, dword [0x671ee0]
mov edx, dword [edx]
movzx edx, byte [edx + 0x170]
cmp eax, edx
je 0x520750
mov eax, ebx
call fcn.00652e24
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x34]
mov edx, dword [0x67341c]
mov edx, dword [edx]
xor ecx, ecx
mov eax, ebx
call fcn.00652c54
mov eax, dword [0x672244]
mov eax, dword [eax]
cmp dword [eax + 0x18], 1
jle 0x52071e
mov edx, dword [0x67341c]
mov edx, dword [edx + 4]
mov ecx, 1
mov eax, ebx
call fcn.00652c54
mov edx, dword [0x67341c]
mov edx, dword [edx + 8]
mov ecx, 2
mov eax, ebx
call fcn.00652c54
mov eax, dword [0x671ee0]
mov eax, dword [eax]
xor edx, edx
mov dl, byte [eax + 0x170]
mov eax, esi
call fcn.0063961c
mov eax, ebx
call fcn.00652e3c
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov byte [eax + 0x172], 1
call fcn.00601830
mov al, byte [eax + 0x3a]
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
jne 0x5207a0
mov eax, dword [0x6719c8]
mov eax, dword [eax]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x5207a0
mov eax, dword [0x6719c8]
mov eax, dword [eax]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
mov byte [eax + 0x8e4], 0
mov byte [eax + 0x474], 0
dec esi
cmp esi, 0xffffffff
jne 0x52077f
mov bl, byte [ebp - 0x19]
xor bl, 1
mov edx, ebx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x128]
call fcn.006430e0
mov edx, ebx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x12c]
call fcn.006430e0
mov edx, ebx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.006430e0
lea edx, [ebp - 0x24]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.00643188
mov eax, dword [ebp - 0x24]
push eax
call fcn.00601830
mov eax, dword [eax + 0x1a8]
lea edx, [ebp - 0x28]
call fcn.00643188
mov edx, dword [ebp - 0x28]
pop eax
call fcn.00403bd0
je 0x520888
call fcn.00601830
mov eax, dword [eax + 0x1a8]
lea edx, [ebp - 0x24]
call fcn.00643188
mov edx, dword [ebp - 0x24]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.00643284
call fcn.0053da4c
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp byte [eax + 0x173], 0
je 0x52087a
push 0xffff0000
push 0
push 0x142
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.00646ed0
push eax
call sub.user32.dll_SendMessageW
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov byte [eax + 0x173], 0
call fcn.00601830
mov eax, dword [eax + 0x1a8]
mov edx, dword [eax + 0x120]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
mov eax, dword [eax + 0x120]
call fcn.00652db4
mov edx, ebx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x13c]
call fcn.006430e0
mov edx, ebx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x140]
call fcn.006430e0
call fcn.00601830
mov eax, dword [eax + 0x1ac]
call fcn.0063aa00
mov edx, eax
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x140]
call fcn.0063aa0c
mov edx, ebx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
call fcn.006430e0
call fcn.00601830
mov eax, dword [eax + 0x1b4]
lea edx, [ebp - 0x24]
call fcn.00643188
mov edx, dword [ebp - 0x24]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
call fcn.00643284
call fcn.00601830
mov eax, dword [eax + 0x1b4]
mov edx, dword [eax + 0x120]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
mov eax, dword [eax + 0x120]
call fcn.00652db4
mov edx, ebx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x14c]
call fcn.006430e0
call fcn.00601830
mov eax, dword [eax + 0x1b8]
call fcn.0063aa00
mov edx, eax
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x14c]
call fcn.0063aa0c
mov bl, 1
mov esi, ebx
and esi, 0x7f
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + esi*4 + 0x150]
mov dl, byte [ebp - 0x19]
xor dl, 1
call fcn.006430e0
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + esi*4 + 0x158]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
call fcn.00644e10
mov esi, eax
dec esi
cmp esi, 0
jl 0x520a2f
mov edx, esi
mov eax, dword [ebp - 0x20]
call fcn.00644de0
mov edi, eax
mov dl, byte [ebp - 0x19]
xor dl, 1
mov eax, edi
call fcn.006430e0
call fcn.00601830
xor edx, edx
mov dl, bl
cmp dword [eax + edx*4 + 0x200], 0
je 0x520a29
call fcn.00601830
xor edx, edx
mov dl, bl
mov eax, dword [eax + edx*4 + 0x200]
mov edx, esi
call fcn.00644de0
mov edx, dword [eax + 0x58]
lea eax, [edi + 0x58]
call fcn.004032c8
dec esi
cmp esi, 0xffffffff
jne 0x5209db
dec ebx
cmp bl, 0xff
jne 0x52099c
cmp byte [ebp - 0x19], 0
je 0x520a6a
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov byte [eax + 0x171], 0
lea eax, [ebp - 0x2c]
mov edx, dword [0x672550]
mov edx, dword [edx]
call fcn.00403438
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00651aa8
jmp 0x520a84
lea edx, [ebp - 0x2c]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
call fcn.0060a25c
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00651aa8
mov byte [ebp - 5], 0
xor ebx, ebx
cmp byte [ebp - 0x1a], 0
jne 0x520aae
call fcn.0065c614
mov edx, dword [0x671ee0]
mov edx, dword [edx]
sub eax, dword [edx + 0x174]
cmp eax, 0x3e8
jle 0x520da9
mov eax, dword [0x671ee0]
mov eax, dword [eax]
xor edx, edx
mov dword [eax + 0x174], edx
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp byte [eax + 0x171], 0
je 0x520c7a
mov eax, dword [0x671ee0]
mov eax, dword [eax]
call fcn.0060a200
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x520b40
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov edi, dword [eax + esi*4]
cmp byte [edi + 0x9e4], 0
je 0x520b07
cmp dword [edi + 0x9f4], 0
jl 0x520b15
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov byte [eax + 0x172], 0
cmp byte [edi + 0x9e4], 0
je 0x520b3a
mov eax, dword [edi + 0x9e8]
call fcn.0054ad14
test al, al
jne 0x520b3a
mov eax, dword [edi + 0x9e8]
call fcn.0054ac9c
add ebx, eax
dec esi
cmp esi, 0xffffffff
jne 0x520aec
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x520c04
test ebx, ebx
jne 0x520b92
mov edx, dword [0x671f68]
mov edx, dword [edx]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.00643234
lea eax, [ebp - 0x2c]
mov edx, dword [0x672c4c]
mov edx, dword [edx]
call fcn.00403438
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00651aa8
jmp 0x520c70
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x40]
mov eax, ebx
call fcn.0061d178
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0xb
xor eax, eax
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0xb
lea edx, [ebp - 0x3c]
mov eax, dword [0x671a8c]
mov eax, dword [eax]
mov ecx, 1
call fcn.00659050
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.006431c4
mov eax, dword [ebp - 0xc]
mov edi, dword [eax + 0x18]
dec edi
test edi, edi
jl 0x520c70
inc edi
xor esi, esi
push ebp
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
call fcn.0052002c
pop ecx
inc esi
dec edi
jne 0x520bee
jmp 0x520c70
test ebx, ebx
jle 0x520c12
lea edx, [ebp - 0x14]
mov eax, ebx
call fcn.0061d178
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0xb
call fcn.0065c614
mov ecx, 0x12c
cdq
idiv ecx
and eax, 0x80000003
jns 0x520c39
dec eax
or eax, 0xfffffffc
inc eax
mov eax, dword [eax*4 + 0x66c4a0]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0xb
lea edx, [ebp - 0x3c]
mov eax, dword [0x671a8c]
mov eax, dword [eax]
mov ecx, 1
call fcn.00659050
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.006431c4
mov eax, dword [ebp - 0xc]
call fcn.00652408
jmp 0x520c94
mov edx, dword [0x671f68]
mov edx, dword [edx]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.00643234
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp byte [eax + 0x170], 0
jne 0x520cb1
call fcn.0053c3b8
lea esi, [eax + 0x9f8]
jmp 0x520cbe
mov eax, dword [0x671ee0]
mov eax, dword [eax]
lea esi, [eax + 0x178]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x520da9
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp dword [eax + 0x30], 0
jle 0x520da9
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
lea eax, [ebp - 0x10]
call fcn.00403358
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x10]
call fcn.0065829c
cmp byte [ebp - 0x1a], 0
jne 0x520d67
mov eax, dword [ebp - 0x18]
call fcn.00403ab8
mov edi, eax
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov eax, dword [eax + 0x144]
call fcn.00403ab8
cmp edi, eax
jne 0x520d67
mov eax, dword [ebp - 0x18]
mov edx, dword [0x671ee0]
mov edx, dword [edx]
mov edx, dword [edx + 0x164]
mov edx, dword [edx + 0x144]
call fcn.00403bd0
jne 0x520d67
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp esi, dword [eax + 0x14c]
je 0x520da9
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
add eax, 0x144
mov edx, dword [ebp - 0x18]
call fcn.004038bc
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov ecx, esi
xor edx, edx
call fcn.006190d8
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov edx, dword [eax]
call dword [edx + 0x38]
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x168]
mov dl, byte [ebp - 5]
call fcn.006430e0
mov eax, dword [0x671ee0]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x520dd2
test ebx, ebx
jg 0x520dd6
xor edx, edx
jmp 0x520dd8
mov dl, 1
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov eax, dword [eax + 0x16c]
call fcn.006430e0
mov eax, dword [ebp - 4]
call fcn.00651868
mov eax, dword [0x671ee0]
mov eax, dword [eax]
mov byte [eax + 0x124], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x520e47
lea eax, [ebp - 0x40]
call fcn.00403274
lea eax, [ebp - 0x2c]
call fcn.00403274
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00403898
lea eax, [ebp - 0x18]
call fcn.00403880
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00403298
ret