Function at 0x406540
Capabilities:
Check for time delay via gettickcount
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x488368
mov eax, dword fs:[0]
push eax
mov eax, 0x1498
call fcn.00487b00
mov eax, dword [0x4a4014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
test eax, eax
je 0x40658d
mov ecx, dword [0x4a6048]
push eax
push 0x15
push esi
call dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
mov eax, dword [0x4a6008]
test eax, eax
je 0x4065a5
cmp dword [edi + 0x456], eax
jb 0x4065a5
mov byte [edi + 0x792], 1
cmp byte [edi + 0x792], 1
jne 0x4066c2
cmp dword [0x4a603c], 0
je 0x4066a3
push 0x400
lea eax, [ebp - 0x410]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
lea eax, [ebp - 0x810]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
mov byte [ebp - 0x88c], 0
lea eax, [ebp - 0x410]
mov dword [ebp - 0x873], 0
xorps xmm0, xmm0
mov byte [ebp - 0x86f], 0
movups xmmword [ebp - 0x88b], xmm0
push 0
push 0
push eax
push 0
movq qword [ebp - 0x87b], xmm0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x810]
push 0x49ab84
push eax
call fcn.0040dcc0
push dword [edi + 4]
lea eax, [ebp - 0x88c]
push 0x49aa8c
push eax
call fcn.0040dce0
add esp, 0x18
mov dword [edi + 0x3b2], 2
lea eax, [ebp - 0x810]
mov dword [edi + 0x4ea], 0
push eax
push 0x49afc4
lea eax, [ebp - 0x88c]
push eax
push 0x49ab9c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push 0x49afc8
mov ecx, esi
call fcn.004144d0
add esp, 4
test eax, eax
jne 0x4066a3
mov dword [edi + 0x55c], 0xe
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042c14d
mov esp, ebp
pop ebp
ret 8
cmp dword [edi + 0x3d6], 0
mov eax, dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
je 0x406724
push 0
call eax
sub eax, dword [edi + 0x3d6]
add esp, 4
cmp eax, 0xb4
jae 0x40671f
lea ecx, [ebp - 0x814]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push 0x49ac38
mov dword [ebp - 4], 0
mov ecx, dword [0x4a6048]
mov eax, dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
push 0x12
push esi
call eax
lea ecx, [ebp - 0x814]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, 1
jmp 0x4066a5
mov eax, dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
push 0
call eax
sub eax, dword [edi]
add esp, 4
cmp eax, 0x2a300
jbe 0x40679a
lea ecx, [ebp - 0x814]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push 0x49afd4
mov dword [ebp - 4], 1
mov ecx, dword [0x4a6048]
mov eax, dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
push 0x12
push esi
call eax
cmp dword [0x4a603c], 0
mov byte [edi + 0x792], 1
je 0x406789
push 0x49afd4
mov ecx, esi
call fcn.004144d0
add esp, 4
test eax, eax
jne 0x406789
mov dword [edi + 0x55c], 0xe
lea ecx, [ebp - 0x814]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
jmp 0x4066a3
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
mov dword [ebp - 0x844], eax
lea eax, [ebp - 0x890]
mov dword [ebp - 0x840], edx
lea ecx, [ebp - 0x844]
push eax
call fcn.0040dfa0
test eax, eax
je 0x4067d0
mov eax, dword [eax + 0x10]
inc eax
cmp eax, 0xa
je 0x4067f7
lea eax, [ebp - 0x890]
push eax
lea ecx, [ebp - 0x844]
call fcn.0040dfa0
test eax, eax
je 0x4066a3
mov eax, dword [eax + 0x10]
inc eax
cmp eax, 0xb
jne 0x4066a3
push 0x30
lea eax, [edi + 0x356]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [edi + 0x4ce], 0
mov dword [edi + 0x486], 0
mov dword [edi + 0x4c2], 0
mov dword [edi + 0x41e], 0
mov dword [edi + 0x442], 0
mov dword [edi + 0x4be], 0
mov dword [edi + 0x48e], 0
mov dword [edi + 0x550], 0
mov dword [edi + 0x4de], 0
mov dword [edi + 0x39e], 0
mov dword [edi + 0x3a6], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x3e2], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x3e6], eax
mov dword [edi + 0x46a], 0
mov dword [edi + 0x462], 0
mov dword [edi + 0x4e2], 0
mov dword [edi + 0x4aa], 0
mov dword [edi + 0x4e6], 0
mov dword [edi + 0x446], 0
mov dword [edi + 0x3aa], 0
mov word [edi + 0x53e], 0
mov dword [edi + 0x422], 0
mov dword [edi + 0x52e], 1
mov dword [edi + 0x532], 0
mov dword [edi + 0x51e], 0
mov dword [edi + 0x50e], 6
mov dword [edi + 0x522], 0
mov dword [edi + 0x51a], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x3f6], eax
mov dword [edi + 0x45e], 0
mov dword [edi + 0x558], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc dword [edi + 0x3ea]
mov dword [edi + 0x3fa], eax
xor eax, eax
mov dword [edi + 0x544], eax
mov dword [edi + 0x3ee], eax
mov dword [edi + 0x402], eax
mov dword [edi + 0x4fa], eax
mov word [edi + 0x54e], ax
mov dword [edi + 0x416], eax
mov dword [edi + 0x41a], eax
mov dword [edi + 0x422], eax
mov dword [edi + 0x4fe], eax
mov dword [edi + 0x516], eax
mov eax, dword [edi + 0x472]
mov dword [edi + 0x3fe], 0
mov dword [edi + 0x554], 1
test eax, eax
je 0x4069c5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x472], 0
mov ecx, dword [edi + 0x406]
test ecx, ecx
je 0x4069de
call fcn.0040fd90
mov dword [edi + 0x406], 0
mov ecx, dword [edi + 0x40a]
test ecx, ecx
je 0x4069f7
call fcn.0040fd90
mov dword [edi + 0x40a], 0
mov eax, dword [edi + 0x776]
cmp dword [eax + 8], 0
je 0x406a0b
push esi
mov ecx, edi
call fcn.00403190
cmp dword [edi + 0x77a], 0
jne 0x406a1f
call fcn.00401f40
mov dword [edi + 0x77a], eax
mov eax, dword [edi + 0x77a]
test eax, eax
je 0x4066a3
push 0x186a0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [edi + 0x4f6]
add esp, 0xc
mov dword [edi + 0x402], 0
cmp eax, 1
ja 0x406a66
push 2
push 0
push 0
push 0
push 0
push 0
push ecx
mov ecx, 0x4a5fd4
jmp 0x406a95
cmp eax, 2
jne 0x406a7e
push eax
push 0
push 0
push 0
push 0
push 0
push ecx
mov ecx, 0x4a5fa0
jmp 0x406a95
cmp eax, 3
jne 0x406aa5
push 2
push 0
push 0
push 0
push 0
push 0
push ecx
mov ecx, 0x4a5f6c
mov edx, 0x2713
call fcn.0040fcf0
mov dword [edi + 0x406], eax
cmp dword [edi + 0x406], 0
je 0x4066a3
inc dword [edi + 0x402]
lea ecx, [ebp - 0x83c]
xorps xmm0, xmm0
mov dword [ebp - 0x82c], 0
movups xmmword [ebp - 0x83c], xmm0
call dword [sym.imp.mfc140u.dll_CByteArray::CByteArray]
mov dword [ebp - 4], 2
push dword [edi + 4]
mov esi, dword [sym.imp.WS2_32.dll_htonl]
call esi
push 4
lea edx, [ebp - 0x894]
mov dword [ebp - 0x894], eax
lea ecx, [ebp - 0x83c]
call fcn.00401e40
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call esi
push 4
lea edx, [ebp - 0x894]
mov dword [ebp - 0x894], eax
lea ecx, [ebp - 0x83c]
call fcn.00401e40
add esp, 4
push 0x4c9e
call esi
push 4
lea edx, [ebp - 0x894]
mov dword [ebp - 0x894], eax
lea ecx, [ebp - 0x83c]
call fcn.00401e40
push 4
lea edx, [ebp - 0x894]
lea ecx, [ebp - 0x83c]
call fcn.00401e40
add esp, 8
cmp dword [edi + 0x4f6], 1
ja 0x406b73
mov byte [0x4a4a9c], 1
jmp 0x406b7e
mov al, byte [edi + 0x4f6]
mov byte [0x4a4a9c], al
push 0xb4
mov edx, 0x4a4a98
lea ecx, [ebp - 0x83c]
call fcn.00401e40
add esp, 4
mov dword [ebp - 0x848], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x858]
movups xmmword [ebp - 0x858], xmm0
call dword [sym.imp.mfc140u.dll_CByteArray::CByteArray]
mov byte [ebp - 4], 3
lea edx, [ebp - 0x8a4]
push 0xe
lea ecx, [ebp - 0x858]
mov dword [ebp - 0x8a4], 0x5a00
mov dword [ebp - 0x8a0], 0
mov dword [ebp - 0x89c], 0xffff0700
mov word [ebp - 0x898], 0x1000
call fcn.00401e40
mov eax, dword [ebp - 0x834]
add esp, 4
mov esi, dword [sym.imp.WS2_32.dll_htons]
add eax, 2
push eax
call esi
movzx eax, ax
lea edx, [ebp - 0x894]
push 2
lea ecx, [ebp - 0x858]
mov dword [ebp - 0x894], eax
call fcn.00401e40
push dword [ebp - 0x834]
mov edx, dword [ebp - 0x838]
lea ecx, [ebp - 0x858]
call fcn.00401e40
add esp, 8
mov dword [ebp - 0x814], 0
lea eax, [ebp - 0x814]
mov ecx, edi
push eax
lea eax, [ebp - 0x14a4]
push eax
lea eax, [edi + 0x10c]
push eax
push dword [ebp - 0x850]
push dword [ebp - 0x854]
call fcn.00402830
xorps xmm0, xmm0
mov dword [ebp - 0x818], 0
lea ecx, [ebp - 0x828]
movups xmmword [ebp - 0x828], xmm0
call dword [sym.imp.mfc140u.dll_CByteArray::CByteArray]
push 0x4c9e
mov byte [ebp - 4], 4
call esi
movzx eax, ax
lea edx, [ebp - 0x894]
push 2
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x894], eax
call fcn.00401e40
mov esi, dword [sym.imp.mfc140u.dll_CByteArray::SetAtGrow]
lea ecx, [ebp - 0x828]
add esp, 4
push 0xff
push dword [ebp - 0x820]
call esi
push 0xff
push dword [ebp - 0x820]
lea ecx, [ebp - 0x828]
call esi
push 0
push dword [ebp - 0x820]
lea ecx, [ebp - 0x828]
call esi
push 0
push dword [ebp - 0x820]
lea ecx, [ebp - 0x828]
call esi
push 0
push dword [ebp - 0x820]
lea ecx, [ebp - 0x828]
call esi
push 1
push dword [ebp - 0x820]
lea ecx, [ebp - 0x828]
call esi
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_htonl]
push 4
lea edx, [ebp - 0x894]
mov dword [ebp - 0x894], eax
lea ecx, [ebp - 0x828]
call fcn.00401e40
add esp, 4
lea ecx, [ebp - 0x828]
push 1
push dword [ebp - 0x820]
call esi
push 0x78
push dword [ebp - 0x820]
lea ecx, [ebp - 0x828]
call esi
push 0x78
lea edx, [edi + 0x11c]
lea ecx, [ebp - 0x828]
call fcn.00401e40
push dword [ebp - 0x814]
lea edx, [ebp - 0x14a4]
lea ecx, [ebp - 0x828]
call fcn.00401e40
push 0xc00
lea eax, [ebp - 0x14a4]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x14
mov dword [ebp - 0x85c], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x86c]
movups xmmword [ebp - 0x86c], xmm0
call dword [sym.imp.mfc140u.dll_CByteArray::CByteArray]
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x820]
add eax, 4
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 4
lea edx, [ebp - 0x894]
mov dword [ebp - 0x894], eax
lea ecx, [ebp - 0x86c]
call fcn.00401e40
push dword [ebp - 0x820]
mov edx, dword [ebp - 0x824]
lea ecx, [ebp - 0x86c]
call fcn.00401e40
mov ecx, dword [edi + 0x406]
add esp, 8
mov dword [ebp - 0x894], 0
test ecx, ecx
je 0x406e46
mov edx, dword [ebp - 0x868]
sub esp, 0xc
push dword [ebp - 0x864]
call fcn.0040fd70
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x894], eax
mov esi, dword [reloc.mfc140u.dll_CByteArray::CByteArray]
lea ecx, [ebp - 0x86c]
call esi
lea ecx, [ebp - 0x828]
call esi
lea ecx, [ebp - 0x858]
call esi
lea ecx, [ebp - 0x83c]
call esi
mov eax, dword [ebp - 0x894]
jmp 0x4066a5