Function at 0x40bf51
Capabilities:
Check for time delay via gettickcount
Delete file
Get file size
Set file attributes

Disassembly:
push 0x24
mov eax, 0x46e28e
call fcn.00450ec5
xor ebx, ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [edi + 0x54]
mov dword [edi + 0x38], eax
mov ecx, dword [esi + 0x60]
call fcn.00405477
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
test eax, eax
jne 0x40bfa7
inc ebx
cmp ebx, 3
jl 0x40bf76
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x10c]
push eax
push ecx
call fcn.00405d32
add esi, 0x1c
call fcn.00401926
push 5
pop eax
jmp 0x40c26d
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x10c]
push eax
push ecx
call fcn.00405d32
add esi, 0x1c
call fcn.00401926
mov esi, edi
call fcn.0040cbf0
push 0x64
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40bfd9
push 0xd
jmp 0x40bfa1
xor esi, esi
inc esi
cmp dword [edi + 0x30], 0
mov dword [ebp - 0x2c], esi
je 0x40c012
push dword [edi + 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call esi
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.0040c273
push dword [eax]
call esi
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
call fcn.004026f8
and dword [edi + 0x30], 0
jmp 0x40c1c7
push 0
push 0x80
push 3
push 0
push esi
lea ebx, [edi + 0x44]
mov eax, dword [ebx]
push connect
push eax
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x40c12f
cmp dword [edi + 0x9c], 0
je 0x40c06f
lea esi, [ebp - 0x30]
mov eax, edi
call fcn.0040d230
and dword [ebp - 4], 0
push eax
mov ecx, 0x478d3c
mov dword [ebp - 0x18], 1
call fcn.00404069
mov byte [ebp - 0x11], 1
test eax, eax
jne 0x40c073
mov byte [ebp - 0x11], 0
or dword [ebp - 4], 0xffffffff
test byte [ebp - 0x18], 1
je 0x40c088
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.004026f8
cmp byte [ebp - 0x11], 0
je 0x40c101
mov eax, dword [ebx]
xor esi, esi
sub eax, 0x10
inc esi
cmp dword [eax + 0xc], esi
jle 0x40c0a4
push dword [eax + 4]
push ebx
call fcn.0040247d
push dword [ebx]
lea ecx, [ebp - 0x18]
call fcn.0040d24c
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
je 0x40c0f0
lea esi, [ebp - 0x30]
mov eax, edi
call fcn.0040d230
mov byte [ebp - 4], 2
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
mov ecx, eax
call fcn.00404069
mov ebx, eax
mov eax, dword [ebp - 0x30]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
call fcn.004026f8
test bl, bl
je 0x40c0f0
and dword [ebp - 0x20], 0
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.004026f8
jmp 0x40c10f
mov ecx, edi
call fcn.0040be93
test eax, eax
jne 0x40c10f
and dword [ebp - 0x20], eax
cmp dword [ebp - 0x28], 0
je 0x40c11e
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], 0
jne 0x40c12c
xor eax, eax
inc eax
jmp 0x40c26d
xor esi, esi
inc esi
mov eax, dword [edi + 0x54]
xor ebx, ebx
cmp dword [eax + 0x74], ebx
je 0x40c1c7
lea eax, [ebp - 0x30]
push eax
push edi
call fcn.0040c273
mov eax, dword [eax]
push ebx
push 0x80
push 3
push ebx
push esi
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.004026f8
cmp ebx, 0xffffffff
je 0x40c1c7
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40c1b6
mov eax, dword [edi + 0x50]
mov ecx, dword [edi + 0x54]
imul eax, eax, 0x18
add eax, 4
cdq
add eax, dword [ecx + 0x88]
adc edx, dword [ecx + 0x8c]
mov ecx, dword [ebp - 0x24]
cmp ecx, eax
jne 0x40c1b6
mov eax, dword [ebp - 0x20]
cmp eax, edx
jne 0x40c1b6
mov esi, edi
call fcn.0040c433
test eax, eax
je 0x40c1b6
and dword [ebp - 0x2c], 0
test ebx, ebx
je 0x40c1c1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2c], 0
je 0x40c231
mov eax, dword [edi + 0x50]
mov ecx, dword [edi + 0x54]
imul eax, eax, 0x18
add eax, 4
cdq
mov ebx, edx
mov edx, dword [ecx + 0x88]
mov esi, eax
mov eax, dword [ecx + 0x8c]
add esi, edx
adc ebx, eax
test eax, eax
jl 0x40c1f8
jg 0x40c1f2
test edx, edx
jb 0x40c1f8
cmp dword [ecx + 0x74], 0
jne 0x40c1fc
xor esi, esi
xor ebx, ebx
lea eax, [ebp - 0x30]
push eax
push edi
call fcn.0040c273
mov eax, dword [eax]
push ebx
push esi
push eax
call fcn.00412e4c
mov esi, eax
mov eax, dword [ebp - 0x30]
add esp, 0xc
add eax, 0xfffffff0
call fcn.004026f8
test esi, esi
je 0x40c231
xor eax, eax
cmp esi, 2
sete al
add eax, 9
jmp 0x40c26d
lea eax, [ebp - 0x28]
push eax
push edi
call fcn.0040c273
push 2
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.004026f8
mov eax, edi
call fcn.0040c2b4
test eax, eax
jne 0x40c262
push 6
jmp 0x40bfa1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x38], eax
xor eax, eax
call fcn.00450f9d
ret