Function at 0x40caa0
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x418b1d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x588
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x28], esi
lea eax, [esp + 0x5a8]
push eax
mov dword [esp + 0x5a4], 2
call fcn.004031d0
lea edx, [esp + 0x5ac]
lea ecx, [esi + 4]
push edx
call fcn.004031d0
lea eax, [esp + 0x5b0]
lea ecx, [esi + 8]
push eax
call fcn.004031d0
push str.update.ini
push 0x41e094
lea ecx, [esp + 0x34]
push ecx
call fcn.00404800
mov edx, dword [esp + 0x2c]
push edx
push 0
push str.update_file_num
push str.update
mov byte [esp + 0x5b0], 3
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x3c], 0
jle 0x40d606
mov eax, dword [0x41d050]
mov ebx, eax
mov ebp, eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x7c]
push str.update_file__d
push ecx
mov byte [esp + 0x5ac], 4
call dword [sym.imp.USER32.dll_wsprintfW]
mov edx, dword [esp + 0x38]
add esp, 0xc
push edx
push 0x104
lea eax, [esp + 0x148]
push eax
push 0x419608
push 0x419dd0
lea ecx, [esp + 0x8c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
mov eax, dword [ebx - 0xc]
cmp eax, 1
lea esi, [ebx - 0xc]
mov dword [esp + 0x10], edi
jg 0x40cbc7
cmp edi, dword [ebx - 4]
jle 0x40cc06
mov eax, dword [0x41d054]
add ebx, 0xfffffff4
cmp ebx, eax
je 0x40cbf0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40cbe7
push esi
call fcn.0040f26f
add esp, 4
mov eax, dword [0x41d050]
mov dword [esp + 0x14], eax
push edi
lea ecx, [esp + 0x18]
call fcn.004018f0
test eax, eax
mov ebp, dword [esp + 0x18]
je 0x40cc36
mov ebx, dword [esp + 0x14]
lea eax, [edi + edi]
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x40cc2d
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x140]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov dword [ebx - 8], edi
mov word [eax + ebx], 0
mov edi, dword [esp + 0x2c]
push edi
push 0x104
lea eax, [esp + 0x148]
push eax
push 0x419608
push str.path
lea ecx, [esp + 0x8c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [ebp - 0xc]
mov ebx, eax
cmp dword [esi], 1
jg 0x40cc7d
cmp ebx, dword [ebp - 4]
jle 0x40ccb8
mov eax, dword [0x41d054]
add ebp, 0xfffffff4
cmp ebp, eax
je 0x40cca6
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40cc9d
push esi
call fcn.0040f26f
add esp, 4
mov eax, dword [0x41d050]
mov dword [esp + 0x18], eax
push ebx
lea ecx, [esp + 0x1c]
call fcn.004018f0
test eax, eax
mov ebp, dword [esp + 0x18]
je 0x40cce8
lea eax, [ebx + ebx]
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x40ccdf
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x140]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x2c]
mov dword [ebp - 8], ebx
mov word [eax + ebp], 0
push edi
push 0x104
lea eax, [esp + 0x148]
push eax
push 0x419608
push str.verify
lea ecx, [esp + 0x8c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [esp + 0x1c]
add esi, 0xfffffff4
mov ebx, eax
cmp dword [esi], 1
jg 0x40cd33
mov eax, dword [esp + 0x1c]
cmp ebx, dword [eax - 4]
jle 0x40cd73
mov ecx, dword [esp + 0x1c]
mov eax, dword [0x41d054]
add ecx, 0xfffffff4
cmp ecx, eax
je 0x40cd61
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40cd57
push esi
call fcn.0040f26f
add esp, 4
mov edx, dword [0x41d050]
mov dword [esp + 0x1c], edx
push ebx
lea ecx, [esp + 0x20]
call fcn.004018f0
test eax, eax
mov ebp, dword [esp + 0x18]
je 0x40cda9
lea eax, [ebx + ebx]
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x40cd9c
mov edi, dword [esp + 0x1c]
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x140]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
mov dword [ecx - 8], ebx
mov word [eax + ecx], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push 0
push 0x419dac
lea eax, [esp + 0x84]
push eax
mov word [esp + 0x30], 0
call esi
push edi
push 0
test eax, eax
push str.is_main
lea edx, [esp + 0x84]
setne cl
push edx
mov byte [esp + 0x32], cl
call esi
test eax, eax
je 0x40cdf0
mov word [esp + 0x20], 1
jmp 0x40ce6c
mov eax, dword [ebp - 8]
test eax, eax
jl 0x40ce6c
push 0x419c28
push ebp
call fcn.0040f2a4
add esp, 8
test eax, eax
je 0x40ce1a
sub eax, ebp
sar eax, 1
test eax, eax
jle 0x40ce1a
mov word [esp + 0x20], 2
jmp 0x40ce6c
mov eax, dword [ebp - 8]
test eax, eax
jl 0x40ce6c
push str..dll
push ebp
call fcn.0040f2a4
add esp, 8
test eax, eax
je 0x40ce44
sub eax, ebp
sar eax, 1
test eax, eax
jle 0x40ce44
mov word [esp + 0x20], 3
jmp 0x40ce6c
mov eax, dword [ebp - 8]
test eax, eax
jl 0x40ce6c
push str..ocx
push ebp
call fcn.0040f2a4
add esp, 8
test eax, eax
je 0x40ce6c
sub eax, ebp
sar eax, 1
test eax, eax
jle 0x40ce6c
mov word [esp + 0x20], 4
mov ebx, dword [0x41d050]
mov dword [esp + 0x24], ebx
cmp word [esp + 0x20], 1
mov byte [esp + 0x5a0], 5
jne 0x40d02c
mov edx, dword [esp + 0x14]
mov esi, dword [edx - 0xc]
test esi, esi
lea eax, [edx - 0xc]
push ecx
mov dword [esp + 0x3c], esp
mov ecx, esp
jl 0x40ceaa
push eax
mov dword [ecx], edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x40ceb2
push edx
mov dword [ecx], ebx
call fcn.00403230
lea eax, [esp + 0x60]
push eax
call fcn.004048c0
add esp, 8
mov esi, eax
mov eax, dword [esp + 0x28]
push 0x41952c
add eax, 8
push eax
lea ecx, [esp + 0x4c]
push ecx
mov byte [esp + 0x5ac], 6
call fcn.00404800
push esi
push eax
lea edx, [esp + 0x60]
push edx
mov byte [esp + 0x5ac], 7
call fcn.00404750
mov edi, eax
mov esi, dword [edi]
cmp ebx, esi
mov byte [esp + 0x5a0], 8
je 0x40cf9c
mov ecx, dword [ebx - 0xc]
test ecx, ecx
lea eax, [ebx - 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [0x41d054]
jge 0x40cf22
lea ecx, [ebx - 0xc]
cmp ecx, eax
jne 0x40cf29
mov ecx, dword [esi - 0xc]
test ecx, ecx
jge 0x40cf6d
mov edi, dword [esi - 8]
push edi
lea ecx, [esp + 0x28]
mov dword [esp + 0x14], edi
call fcn.00402560
test eax, eax
mov ebx, dword [esp + 0x24]
je 0x40cf9c
lea eax, [edi + edi]
lea edx, [eax + 2]
cmp edx, eax
jb 0x40cf62
mov ecx, eax
mov edx, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov dword [ebx - 8], edi
mov word [eax + ebx], 0
jmp 0x40cf9c
add ebx, 0xfffffff4
cmp ebx, eax
je 0x40cf8c
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40cf8c
push esi
call fcn.0040f26f
add esp, 4
mov ebx, dword [edi]
lea eax, [ebx - 0xc]
push eax
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x58]
mov edx, dword [0x41d054]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40cfcd
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40cfcd
mov eax, dword [esp + 0x58]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x44]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40cff8
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40cff8
mov eax, dword [esp + 0x44]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x5c]
mov edx, dword [0x41d054]
lea ecx, [eax - 0xc]
cmp ecx, edx
mov byte [esp + 0x5a0], 5
je 0x40d120
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40d120
mov eax, dword [esp + 0x5c]
jmp 0x40d114
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x18]
push edx
add eax, 4
push eax
lea eax, [esp + 0x50]
push eax
call fcn.00404750
mov dword [esp + 0x10], eax
mov esi, dword [eax]
cmp ebx, esi
mov byte [esp + 0x5a0], 9
je 0x40d0e9
mov eax, dword [ebx - 0xc]
lea edi, [ebx - 0xc]
test eax, eax
mov eax, dword [0x41d054]
jge 0x40d06f
lea ecx, [ebx - 0xc]
cmp ecx, eax
jne 0x40d076
mov ecx, dword [esi - 0xc]
test ecx, ecx
jge 0x40d0ba
mov edi, dword [esi - 8]
push edi
lea ecx, [esp + 0x28]
mov dword [esp + 0x14], edi
call fcn.00402560
test eax, eax
mov ebx, dword [esp + 0x24]
je 0x40d0e9
lea eax, [edi + edi]
lea edx, [eax + 2]
cmp edx, eax
jb 0x40d0af
mov ecx, eax
mov edx, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov dword [ebx - 8], edi
mov word [eax + ebx], 0
jmp 0x40d0e9
add ebx, 0xfffffff4
cmp ebx, eax
je 0x40d0d5
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d0d5
push edi
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x10]
mov ebx, dword [eax]
lea ecx, [ebx - 0xc]
push ecx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x48]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
mov byte [esp + 0x5a0], 5
je 0x40d120
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d120
mov eax, dword [esp + 0x48]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
cmp ebp, ebx
je 0x40d1e5
mov eax, dword [ebp - 0xc]
test eax, eax
mov ecx, dword [0x41d054]
lea edi, [ebp - 0xc]
jge 0x40d13f
lea edx, [ebp - 0xc]
cmp edx, ecx
jne 0x40d149
mov edx, dword [ebx - 0xc]
test edx, edx
lea esi, [ebx - 0xc]
jge 0x40d1bd
cmp eax, 1
mov esi, dword [ebx - 8]
mov dword [esp + 0x10], esi
jg 0x40d15a
cmp esi, dword [ebp - 4]
jle 0x40d190
add ebp, 0xfffffff4
cmp ebp, ecx
je 0x40d17e
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d175
push edi
call fcn.0040f26f
add esp, 4
mov eax, dword [0x41d050]
mov dword [esp + 0x18], eax
push esi
lea ecx, [esp + 0x1c]
call fcn.004018f0
test eax, eax
mov ebp, dword [esp + 0x18]
je 0x40d1e5
lea eax, [esi + esi]
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x40d1b2
mov ecx, eax
mov edx, ecx
shr ecx, 2
mov esi, ebx
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
mov dword [ebp - 8], esi
mov word [eax + ebp], 0
jmp 0x40d1e5
add ebp, 0xfffffff4
cmp ebp, ecx
je 0x40d1d8
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d1d8
push edi
call fcn.0040f26f
add esp, 4
mov ebp, ebx
push esi
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d584
mov eax, dword [0x41d050]
mov ebx, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x348]
push eax
push ebp
mov byte [esp + 0x5a8], 0xc
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x360]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push str.yyyy_MM_dd
lea ecx, [esp + 0x64]
call fcn.00404530
mov esi, eax
push str.yyyy_MM_dd
lea ecx, [esp + 0x44]
mov byte [esp + 0x5a4], 0xd
call fcn.00404530
mov ecx, dword [esi]
mov ecx, dword [ecx - 8]
mov edx, dword [eax]
mov eax, dword [edx - 8]
push ecx
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x5a8], 0xe
call fcn.004023d0
push eax
push str.yyyy_MM_dd
lea eax, [esp + 0x74]
push eax
push 0
push 0x800
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
mov eax, dword [esp + 0x40]
mov edx, dword [0x41d054]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d2c5
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x40d2c5
mov eax, dword [esp + 0x40]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x60]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
mov byte [esp + 0x5a0], 0xc
je 0x40d2f8
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x40d2f8
mov eax, dword [esp + 0x60]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
push 0x419d58
lea ecx, [esp + 0x50]
call fcn.00404530
mov esi, eax
push 0x419d58
lea ecx, [esp + 0x58]
mov byte [esp + 0x5a4], 0xf
call fcn.00404530
mov ecx, dword [esi]
mov ecx, dword [ecx - 8]
mov edx, dword [eax]
mov eax, dword [edx - 8]
push ecx
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x5a8], 0x10
call fcn.004023d0
push eax
push 0x419d58
lea eax, [esp + 0x74]
push eax
push 0
push 0x800
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
mov eax, dword [esp + 0x54]
mov edx, dword [0x41d054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d37e
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x40d37e
mov eax, dword [esp + 0x54]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x4c]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
mov byte [esp + 0x5a0], 0xc
je 0x40d3b1
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x40d3b1
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
lea ecx, [esp + 0x30]
call fcn.004024e0
mov edi, dword [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
call esi
mov dword [edi - 8], eax
lea ecx, [esp + 0x34]
mov word [edi + eax*2], 0
call fcn.004024e0
mov ebp, dword [esp + 0x34]
push ebp
call esi
mov dword [ebp - 8], eax
mov word [ebp + eax*2], 0
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.00404750
mov edi, eax
mov esi, dword [edi]
cmp ebx, esi
mov byte [esp + 0x5a0], 0x11
je 0x40d4a6
mov ecx, dword [ebx - 0xc]
test ecx, ecx
lea eax, [ebx - 0xc]
mov dword [esp + 0x38], eax
mov eax, dword [0x41d054]
jge 0x40d42c
lea ecx, [ebx - 0xc]
cmp ecx, eax
jne 0x40d433
mov ecx, dword [esi - 0xc]
test ecx, ecx
jge 0x40d477
mov edi, dword [esi - 8]
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x3c], edi
call fcn.00402560
test eax, eax
mov ebx, dword [esp + 0x10]
je 0x40d4a6
lea eax, [edi + edi]
lea edx, [eax + 2]
cmp edx, eax
jb 0x40d46c
mov ecx, eax
mov edx, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x38]
mov dword [ebx - 8], edi
mov word [eax + ebx], 0
jmp 0x40d4a6
add ebx, 0xfffffff4
cmp ebx, eax
je 0x40d496
mov esi, dword [esp + 0x38]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d496
push esi
call fcn.0040f26f
add esp, 4
mov ebx, dword [edi]
lea eax, [ebx - 0xc]
push eax
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x50]
mov edx, dword [0x41d054]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
mov byte [esp + 0x5a0], 0xc
je 0x40d4df
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x40d4df
mov eax, dword [esp + 0x50]
add eax, 0xfffffff4
push eax
call fcn.0040f26f
add esp, 4
mov edx, dword [esp + 0x1c]
push ebx
push edx
call fcn.0040f302
add esp, 8
test eax, eax
je 0x40d51f
cmp word [esp + 0x20], 1
mov ecx, dword [esp + 0x28]
jne 0x40d512
mov eax, dword [ecx + 0x10]
lea edx, [esp + 0x14]
push edx
push 1
add ecx, 0xc
push eax
call fcn.0040ade0
jmp 0x40d51f
lea eax, [esp + 0x14]
push eax
add ecx, 0xc
call fcn.0040c590
mov eax, dword [0x41d054]
lea ecx, [ebp - 0xc]
cmp ecx, eax
je 0x40d53e
add ebp, 0xfffffff4
push ebp
call edi
test eax, eax
jg 0x40d53e
push ebp
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x30]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40d562
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x40d562
push esi
call fcn.0040f26f
add esp, 4
mov ecx, dword [0x41d054]
lea eax, [ebx - 0xc]
cmp eax, ecx
je 0x40d5bc
add ebx, 0xfffffff4
push ebx
call edi
test eax, eax
jg 0x40d5bc
push ebx
call fcn.0040f26f
add esp, 4
jmp 0x40d5bc
cmp word [esp + 0x20], 1
jne 0x40d5a5
mov eax, dword [esp + 0x28]
mov edx, dword [eax + 0x10]
lea ecx, [eax + 0xc]
lea eax, [esp + 0x14]
push eax
push 1
push edx
call fcn.0040ade0
jmp 0x40d5b6
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x2c]
add ecx, 0xc
call fcn.0040c590
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x24]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40d5e0
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x40d5e0
push esi
call fcn.0040f26f
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x5a0], 3
call fcn.00401be0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x64]
inc eax
cmp eax, ecx
mov dword [esp + 0x3c], eax
jl 0x40cb44
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov edx, dword [0x41d054]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
add ebx, 0xc
cmp ecx, edx
je 0x40d637
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x40d637
push esi
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x5a8]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40d65e
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x40d65e
push esi
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x5ac]
mov edx, dword [0x41d054]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d685
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x40d685
push esi
call fcn.0040f26f
add esp, 4
mov eax, dword [esp + 0x5b0]
mov ecx, dword [0x41d054]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40d6ac
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x40d6ac
push esi
call fcn.0040f26f
add esp, 4
mov ecx, dword [esp + 0x598]
pop edi
pop esi
pop ebp
mov eax, ebx
mov dword fs:[0], ecx
pop ebx
add esp, 0x594
ret 0xc