Function at 0x40c310
Capabilities:
Check for time delay via gettickcount
Create directory
Get common file path
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a2549
mov eax, dword fs:[0]
push eax
mov eax, 0x14bc
call fcn.004a1af0
mov eax, dword [0x4c2014]
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 dword [ebp - 0x8c4], edi
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
test eax, eax
je 0x40c363
mov ecx, dword [0x4c5140]
push eax
push 0x15
push esi
call dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
cmp byte [edi + 0x121d], 1
jne 0x40c44f
cmp dword [0x4c5124], 0
je 0x40c520
push 0x400
lea eax, [ebp - 0x444]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
lea eax, [ebp - 0x844]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
mov byte [ebp - 0x30], 0
lea eax, [ebp - 0x444]
mov dword [ebp - 0x17], 0
xorps xmm0, xmm0
mov byte [ebp - 0x13], 0
movups xmmword [ebp - 0x2f], xmm0
push 0
push 0
push eax
push 0
movq qword [ebp - 0x1f], xmm0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x444]
push eax
lea eax, [ebp - 0x844]
push 0x4b5ef8
push eax
call fcn.00420240
push dword [edi + 8]
lea eax, [ebp - 0x30]
push 0x4b5b64
push eax
call fcn.00420280
add esp, 0x18
mov dword [edi + 0x416], 2
lea eax, [ebp - 0x844]
mov byte [edi + 0x5c6], 0
push eax
push 0x4b66a8
lea eax, [ebp - 0x30]
push eax
push 0x4b608c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push 0x4b66ac
mov ecx, esi
call fcn.004299b0
add esp, 4
test eax, eax
jne 0x40c520
mov byte [edi + 0x5f9], 0xe
jmp 0x40c520
cmp dword [edi + 0x456], 0
mov eax, dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
je 0x40c4b1
push 0
call eax
sub eax, dword [edi + 0x456]
add esp, 4
cmp eax, 0xb4
jae 0x40c4ac
lea ecx, [ebp - 0x84c]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push 0x4b5f48
mov dword [ebp - 4], 0
mov ecx, dword [0x4c5140]
mov eax, dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
push 0x12
push esi
call eax
lea ecx, [ebp - 0x84c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, 1
jmp 0x40c522
mov eax, dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
push 0
call eax
sub eax, dword [edi + 4]
add esp, 4
cmp eax, 0x2a300
jbe 0x40c53f
lea ecx, [ebp - 0x84c]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push 0x4b66b8
mov dword [ebp - 4], 1
mov ecx, dword [0x4c5140]
mov eax, dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
push 0x12
push esi
call eax
cmp dword [0x4c5124], 0
mov byte [edi + 0x121d], 1
je 0x40c514
push 0x4b66b8
mov ecx, esi
call fcn.004299b0
add esp, 4
test eax, eax
jne 0x40c514
mov byte [edi + 0x5f9], 0xe
lea ecx, [ebp - 0x84c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
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.0044612d
mov esp, ebp
pop ebp
ret 8
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
mov dword [ebp - 0x8ac], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x8a8], edx
lea ecx, [ebp - 0x8ac]
push eax
call fcn.004207e0
test eax, eax
je 0x40c572
mov eax, dword [eax + 0x10]
inc eax
cmp eax, 8
je 0x40c58e
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x8ac]
call fcn.004207e0
test eax, eax
je 0x40c520
mov eax, dword [eax + 0x10]
inc eax
cmp eax, 9
jne 0x40c520
cmp byte [edi + 0x5fa], 0
jne 0x40c650
cmp dword [0x4c50d0], 0
je 0x40c650
mov dword [ebp - 0x890], 0xf
mov dword [ebp - 0x894], 0
mov byte [ebp - 0x8a4], 0
push 0x32
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 2
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push dword [edi + 8]
lea eax, [ebp - 0x44]
push 0x4b5b64
push eax
call fcn.004202c0
mov ecx, esp
mov dword [ebp - 0x8c8], esp
push 0x4b61d4
call fcn.0041f8d0
sub esp, 0x18
mov byte [ebp - 4], 3
lea eax, [ebp - 0x44]
mov dword [ebp - 0x84c], esp
mov ecx, esp
push eax
call fcn.0041f8d0
sub esp, 0x18
mov byte [ebp - 4], 4
mov ecx, esp
push 0x4b66c0
call fcn.0041f8d0
lea ecx, [ebp - 0x8a4]
mov byte [ebp - 4], 2
call fcn.0043bde0
add esp, 0x48
mov byte [edi + 0x5fa], 1
lea ecx, [ebp - 0x8a4]
mov dword [ebp - 4], 0xffffffff
call fcn.0041f810
cmp dword [0x4c5114], 0
je 0x40c877
push 0x200
lea eax, [ebp - 0x244]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x848]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
lea ecx, [ebp - 0x850]
mov dword [ebp - 4], 5
call dword [sym.imp.mfc140u.dll_Ordinal_296]
lea ecx, [ebp - 0x84c]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
lea ecx, [ebp - 0x878]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push 0
mov byte [ebp - 4], 8
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
mov dword [ebp - 0x85c], eax
lea eax, [ebp - 0x244]
mov dword [ebp - 0x858], edx
push 0
push 0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [edi + 8]
mov esi, dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x848]
push str._sGzxItem
push eax
call esi
add esp, 0x10
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0x10
je 0x40c718
push 0
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push dword [edi + 8]
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x848]
push str._sGzxItem_u.ini
push eax
call esi
push dword [edi + 8]
lea eax, [ebp - 0x850]
push 0x4b5b6c
push eax
call esi
add esp, 0x1c
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x85c]
push eax
call fcn.004207e0
test eax, eax
je 0x40c75c
mov eax, dword [eax + 0xc]
jmp 0x40c75e
xor eax, eax
push eax
lea eax, [ebp - 0x878]
push 0x4b6db8
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
add esp, 0xc
push dword [ebp - 0x848]
push 0
push 0x4b5c74
push 0x4b5c7c
call esi
push dword [ebp - 0x848]
mov dword [ebp - 0x8c8], eax
push 0
push 0x4b5c8c
push 0x4b5c7c
call esi
mov esi, eax
lea ecx, [ebp - 0x85c]
lea eax, [ebp - 0x38]
push eax
call fcn.004207e0
test eax, eax
je 0x40c7be
mov ecx, dword [eax + 0xc]
jmp 0x40c7c0
xor ecx, ecx
cmp dword [ebp - 0x8c8], ecx
jne 0x40c83d
cmp esi, 1
jne 0x40c83d
cmp dword [0x4c5118], 0
je 0x40c7ed
cmp byte [edi + 0x5fc], 0
je 0x40c7ed
mov ecx, edi
call fcn.004146c0
mov ecx, edi
call fcn.004146c0
mov ecx, dword [0x4c5140]
mov eax, dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
push 0x4b5c8c
push 0x12
push dword [ebp + 8]
mov dword [edi + 0x416], 1
call eax
lea ecx, [ebp - 0x878]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x84c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x850]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x848]
jmp 0x40c51a
lea ecx, [ebp - 0x878]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x84c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x850]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x848]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov esi, dword [ebp + 8]
cmp dword [0x4c4c44], 0
je 0x40c88e
mov byte [edi + 0x573], 1
mov byte [edi + 0x562], 1
push 0x30
lea eax, [edi + 0x3b2]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov byte [edi + 0x5e0], 0
mov dword [edi + 0x59b], 0
mov byte [edi + 0x540], 0
mov dword [edi + 0x58f], 0
mov dword [edi + 0x4a6], 0
mov dword [edi + 0x4cf], 0
mov dword [edi + 0x587], 0
mov dword [edi + 0x41a], 0
mov dword [edi + 0x543], 0
mov byte [edi + 0x5f4], 0
mov dword [edi + 0x520], 0
mov byte [edi + 0x5ab], 0
mov dword [edi + 0x3fa], 0
mov dword [edi + 0x402], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x518], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x462], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x466], eax
mov dword [edi + 0x5d7], 0
mov dword [edi + 0x50c], 0
mov dword [edi + 0x508], 0
mov byte [edi + 0x574], 1
mov dword [edi + 0x500], 0
mov word [edi + 0x555], 0x101
mov byte [edi + 0x56e], 1
mov word [edi + 0x5ac], 0
mov byte [edi + 0x57b], 0
mov byte [edi + 0x5ae], 0
mov dword [edi + 0x4f7], 0
mov dword [edi + 0x406], 0
mov word [edi + 0x5e2], 0
mov dword [edi + 0x4aa], 0
mov word [edi + 0x5de], 1
mov dword [edi + 0x486], 0
mov byte [edi + 0x5d3], 6
mov byte [edi + 0x5d6], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x476], eax
mov dword [edi + 0x4fc], 0
mov byte [edi + 0x5d2], 0
mov byte [edi + 0x5cc], 0
mov dword [edi + 0x534], 0
mov byte [edi + 0x5f6], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc dword [edi + 0x46a]
mov ecx, dword [edi + 0x48a]
mov dword [edi + 0x47a], eax
xor eax, eax
mov dword [edi + 0x47e], 0
mov dword [edi + 0x5e8], eax
mov dword [edi + 0x46e], eax
mov dword [edi + 0x482], eax
mov word [edi + 0x5cd], ax
mov word [edi + 0x5f2], ax
mov dword [edi + 0x49e], eax
mov dword [edi + 0x4a2], eax
mov dword [edi + 0x4aa], eax
mov byte [edi + 0x5d5], al
mov byte [edi + 0x5f5], 1
test ecx, ecx
je 0x40ca8e
call fcn.00422600
mov dword [edi + 0x48a], 0
mov ecx, dword [edi + 0x492]
test ecx, ecx
je 0x40caa7
call fcn.00422600
mov dword [edi + 0x492], 0
mov ecx, dword [edi + 0x48e]
test ecx, ecx
je 0x40cac0
call fcn.00422600
mov dword [edi + 0x48e], 0
cmp dword [edi + 0x396], 0
jne 0x40caf4
mov eax, dword [edi + 0x1201]
test eax, eax
je 0x40caf4
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x40caf4
mov eax, dword [edi + 0x1201]
cmp dword [eax + 8], 0
je 0x40caf4
push esi
mov ecx, edi
call fcn.00402fd0
cmp dword [edi + 0x1205], 0
jne 0x40cb08
call fcn.00401f60
mov dword [edi + 0x1205], eax
mov eax, dword [edi + 0x1205]
test eax, eax
je 0x40c520
push 0x186a0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov al, byte [edi + 0x5cb]
add esp, 0xc
mov dword [edi + 0x482], 0
cmp al, 1
ja 0x40cb4e
push 2
push 0
push 0
push 0
push 0
push 0
push ecx
mov ecx, 0x4c4c10
jmp 0x40cb7c
cmp al, 2
jne 0x40cb66
push 2
push 0
push 0
push 0
push 0
push 0
push ecx
mov ecx, 0x4c4bdc
jmp 0x40cb7c
cmp al, 3
jne 0x40cb8c
push 2
push 0
push 0
push 0
push 0
push 0
push ecx
mov ecx, 0x4c4ba8
mov edx, 0x2713
call fcn.00422560
mov dword [edi + 0x48a], eax
cmp dword [edi + 0x48a], 0
je 0x40c520
inc dword [edi + 0x482]
lea ecx, [ebp - 0x88c]
mov esi, dword [sym.imp.mfc140u.dll_CByteArray::CByteArray]
xorps xmm0, xmm0
movups xmmword [ebp - 0x88c], xmm0
mov dword [ebp - 0x87c], 0
call esi
mov dword [ebp - 4], 9
push dword [edi + 8]
mov edi, dword [sym.imp.WS2_32.dll_htonl]
call edi
push 4
lea edx, [ebp - 0x848]
mov dword [ebp - 0x848], eax
lea ecx, [ebp - 0x88c]
call fcn.00401e60
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call edi
push 4
lea edx, [ebp - 0x848]
mov dword [ebp - 0x848], eax
lea ecx, [ebp - 0x88c]
call fcn.00401e60
add esp, 4
push 0x4c5e
call edi
push 4
lea edx, [ebp - 0x848]
mov dword [ebp - 0x848], eax
lea ecx, [ebp - 0x88c]
call fcn.00401e60
push 4
lea edx, [ebp - 0x848]
lea ecx, [ebp - 0x88c]
call fcn.00401e60
mov eax, dword [ebp - 0x8c4]
mov edx, 1
push 0xb4
mov al, byte [eax + 0x5cb]
cmp al, dl
movzx ecx, al
cmovbe ecx, edx
mov edx, 0x4c2568
mov byte [0x4c256c], cl
lea ecx, [ebp - 0x88c]
call fcn.00401e60
add esp, 0xc
mov dword [ebp - 0x8b0], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x8c0]
movups xmmword [ebp - 0x8c0], xmm0
call esi
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0x860]
push 0xe
lea ecx, [ebp - 0x8c0]
mov dword [ebp - 0x860], 0x5a00
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x858], 0xffff0700
mov word [ebp - 0x854], 0x1000
call fcn.00401e60
mov eax, dword [ebp - 0x884]
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 - 0x850]
push 2
lea ecx, [ebp - 0x8c0]
mov dword [ebp - 0x850], eax
call fcn.00401e60
push dword [ebp - 0x884]
mov edx, dword [ebp - 0x888]
lea ecx, [ebp - 0x8c0]
call fcn.00401e60
mov ecx, dword [ebp - 0x8c4]
lea eax, [ebp - 0x84c]
add esp, 8
mov dword [ebp - 0x84c], 0
push eax
lea eax, [ebp - 0x14c8]
push eax
lea eax, [ecx + 0x110]
push eax
push dword [ebp - 0x8b8]
push dword [ebp - 0x8bc]
call fcn.00402770
xorps xmm0, xmm0
mov dword [ebp - 0x864], 0
lea ecx, [ebp - 0x874]
movups xmmword [ebp - 0x874], xmm0
call dword [sym.imp.mfc140u.dll_CByteArray::CByteArray]
push 0x4c5e
mov byte [ebp - 4], 0xb
call esi
movzx eax, ax
lea edx, [ebp - 0x850]
push 2
lea ecx, [ebp - 0x874]
mov dword [ebp - 0x850], eax
call fcn.00401e60
mov esi, dword [sym.imp.mfc140u.dll_CByteArray::SetAtGrow]
lea ecx, [ebp - 0x874]
add esp, 4
push 0xff
push dword [ebp - 0x86c]
call esi
push 0xff
push dword [ebp - 0x86c]
lea ecx, [ebp - 0x874]
call esi
push 0
push dword [ebp - 0x86c]
lea ecx, [ebp - 0x874]
call esi
push 0
push dword [ebp - 0x86c]
lea ecx, [ebp - 0x874]
call esi
push 0
push dword [ebp - 0x86c]
lea ecx, [ebp - 0x874]
call esi
push 1
push dword [ebp - 0x86c]
lea ecx, [ebp - 0x874]
call esi
mov eax, dword [ebp - 0x8c4]
push dword [eax + 8]
call edi
push 4
lea edx, [ebp - 0x848]
mov dword [ebp - 0x848], eax
lea ecx, [ebp - 0x874]
call fcn.00401e60
add esp, 4
lea ecx, [ebp - 0x874]
push 1
push dword [ebp - 0x86c]
call esi
push 0x78
push dword [ebp - 0x86c]
lea ecx, [ebp - 0x874]
call esi
mov esi, dword [ebp - 0x8c4]
lea ecx, [ebp - 0x874]
push 0x78
lea edx, [esi + 0x120]
call fcn.00401e60
push dword [ebp - 0x84c]
lea edx, [ebp - 0x14c8]
lea ecx, [ebp - 0x874]
call fcn.00401e60
push 0xc00
push 0
lea eax, [ebp - 0x14c8]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x14
mov dword [ebp - 0x890], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x8a0]
movups xmmword [ebp - 0x8a0], xmm0
call dword [sym.imp.mfc140u.dll_CByteArray::CByteArray]
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x86c]
add eax, 4
push eax
call edi
push 4
lea edx, [ebp - 0x848]
mov dword [ebp - 0x848], eax
lea ecx, [ebp - 0x8a0]
call fcn.00401e60
push dword [ebp - 0x86c]
mov edx, dword [ebp - 0x870]
lea ecx, [ebp - 0x8a0]
call fcn.00401e60
mov ecx, dword [esi + 0x48a]
add esp, 8
xor edi, edi
test ecx, ecx
je 0x40cf26
mov edx, dword [ebp - 0x89c]
sub esp, 0xc
push dword [ebp - 0x898]
call fcn.004225e0
mov edi, eax
neg edi
sbb edi, edi
inc edi
mov esi, dword [reloc.mfc140u.dll_CByteArray::CByteArray]
lea ecx, [ebp - 0x8a0]
call esi
lea ecx, [ebp - 0x874]
call esi
lea ecx, [ebp - 0x8c0]
call esi
lea ecx, [ebp - 0x88c]
call esi
mov eax, edi
jmp 0x40c522