Function at 0x4067f0
Capabilities:
Delete file
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x444380]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov dword [ebp - 4], 1
cmp dword [0x46ec34], 0
je 0x406830
mov eax, dword [0x46ec34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x46ec34], 0
cmp dword [0x46ec38], 0
je 0x406850
mov ecx, dword [0x46ec38]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x46ec38], 0
cmp dword [0x46ec3c], 0
je 0x406870
mov edx, dword [0x46ec3c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x46ec3c], 0
mov word [ebp - 0x214], 0
jmp 0x40688d
mov ax, word [ebp - 0x214]
add ax, 1
mov word [ebp - 0x214], ax
movzx ecx, word [ebp - 0x214]
cmp ecx, 5
jge 0x4068fb
movzx edx, word [ebp - 0x214]
cmp dword [edx*4 + 0x46ec20], 0
je 0x4068c1
push 1
movzx eax, word [ebp - 0x214]
mov ecx, dword [eax*4 + 0x46ec20]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
movzx edx, word [ebp - 0x214]
cmp dword [edx*4 + 0x46ec20], 0
je 0x4068f9
movzx eax, word [ebp - 0x214]
mov ecx, dword [eax*4 + 0x46ec20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, word [ebp - 0x214]
mov dword [edx*4 + 0x46ec20], 0
jmp 0x40687b
movzx eax, byte [ebp + 8]
test eax, eax
jne 0x406908
jmp 0x406b2b
push 0x46d150
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [ebp - 0x218], 0
jmp 0x40692e
mov ecx, dword [ebp - 0x218]
add ecx, 1
mov dword [ebp - 0x218], ecx
mov edx, dword [ebp - 0x218]
cmp edx, dword [0x46d21c]
jge 0x406a47
mov eax, dword [ebp - 0x218]
push eax
push str.bkgr_d.gif
push 0x200
lea ecx, [ebp - 0x210]
push ecx
call fcn.00414a51
add esp, 0x10
push 1
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x210]
push eax
call fcn.0040db40
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 1
je 0x406983
jmp 0x406a47
cmp dword [ebp - 8], 0
jne 0x406995
mov dword [ebp - 4], 2
jmp 0x406a47
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], 0
je 0x4069c4
mov edx, dword [ebp - 8]
mov dword [ebp - 0x220], edx
mov eax, dword [ebp - 0x220]
push eax
call fcn.004149b7
add esp, 4
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x218]
push ecx
push str.bkgr_d.txt
push 0x200
lea edx, [ebp - 0x210]
push edx
call fcn.00414a51
add esp, 0x10
push 1
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x210]
push ecx
call fcn.0040db40
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 1
je 0x406a04
jmp 0x406a47
cmp dword [ebp - 8], 0
jne 0x406a13
mov dword [ebp - 4], 2
jmp 0x406a47
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], 0
je 0x406a42
mov eax, dword [ebp - 8]
mov dword [ebp - 0x224], eax
mov ecx, dword [ebp - 0x224]
push ecx
call fcn.004149b7
add esp, 4
mov dword [ebp - 8], 0
jmp 0x40691f
cmp dword [0x46f008], 0
je 0x406a75
mov edx, dword [0x46f008]
mov dword [ebp - 0x228], edx
mov eax, dword [ebp - 0x228]
push eax
call fcn.004149b7
add esp, 4
mov dword [0x46f008], 0
cmp dword [0x46f00c], 0
je 0x406b23
mov dword [ebp - 0x21c], 0
jmp 0x406a9d
mov ecx, dword [ebp - 0x21c]
add ecx, 1
mov dword [ebp - 0x21c], ecx
mov edx, dword [ebp - 0x21c]
cmp edx, dword [0x46f010]
jge 0x406af5
mov eax, dword [ebp - 0x21c]
mov ecx, dword [0x46f00c]
cmp dword [ecx + eax*4], 0
je 0x406af3
mov edx, dword [ebp - 0x21c]
mov eax, dword [0x46f00c]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp - 0x22c]
push edx
call fcn.004149b7
add esp, 4
mov eax, dword [ebp - 0x21c]
mov ecx, dword [0x46f00c]
mov dword [ecx + eax*4], 0
jmp 0x406a8e
cmp dword [0x46f00c], 0
je 0x406b23
mov edx, dword [0x46f00c]
mov dword [ebp - 0x230], edx
mov eax, dword [ebp - 0x230]
push eax
call fcn.004149b7
add esp, 4
mov dword [0x46f00c], 0
xor ecx, ecx
jne 0x40680a
cmp dword [ebp - 8], 0
je 0x406b50
mov edx, dword [ebp - 8]
mov dword [ebp - 0x234], edx
mov eax, dword [ebp - 0x234]
push eax
call fcn.004149b7
add esp, 4
mov dword [ebp - 8], 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004148bb
mov esp, ebp
pop ebp
ret