Function at 0x405e60
Capabilities:
Delete file
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x440374]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov dword [ebp - 4], 1
cmp dword [0x46888c], 0
je 0x405ea0
mov eax, dword [0x46888c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x46888c], 0
cmp dword [0x468890], 0
je 0x405ec0
mov ecx, dword [0x468890]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x468890], 0
cmp dword [0x468894], 0
je 0x405ee0
mov edx, dword [0x468894]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x468894], 0
mov word [ebp - 0x214], 0
jmp 0x405efd
mov ax, word [ebp - 0x214]
add ax, 1
mov word [ebp - 0x214], ax
movzx ecx, word [ebp - 0x214]
cmp ecx, 5
jge 0x405f6b
movzx edx, word [ebp - 0x214]
cmp dword [edx*4 + 0x468878], 0
je 0x405f31
push 1
movzx eax, word [ebp - 0x214]
mov ecx, dword [eax*4 + 0x468878]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
movzx edx, word [ebp - 0x214]
cmp dword [edx*4 + 0x468878], 0
je 0x405f69
movzx eax, word [ebp - 0x214]
mov ecx, dword [eax*4 + 0x468878]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, word [ebp - 0x214]
mov dword [edx*4 + 0x468878], 0
jmp 0x405eeb
movzx eax, byte [ebp + 8]
test eax, eax
jne 0x405f78
jmp 0x40619c
push 0x442878
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push 0x456324
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [ebp - 0x218], 0
jmp 0x405fa9
mov ecx, dword [ebp - 0x218]
add ecx, 1
mov dword [ebp - 0x218], ecx
mov edx, dword [ebp - 0x218]
cmp edx, dword [0x456a28]
jge 0x4060b8
mov eax, dword [ebp - 0x218]
push eax
push str.bkgr_d.gif
lea ecx, [ebp - 0x210]
push ecx
call fcn.00415328
add esp, 0xc
push 1
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x210]
push eax
call fcn.0040d770
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 1
je 0x405ff9
jmp 0x4060b8
cmp dword [ebp - 8], 0
jne 0x40600b
mov dword [ebp - 4], 2
jmp 0x4060b8
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], 0
je 0x40603a
mov edx, dword [ebp - 8]
mov dword [ebp - 0x220], edx
mov eax, dword [ebp - 0x220]
push eax
call fcn.00414bfe
add esp, 4
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x218]
push ecx
push str.bkgr_d.txt
lea edx, [ebp - 0x210]
push edx
call fcn.00415328
add esp, 0xc
push 1
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x210]
push ecx
call fcn.0040d770
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 1
je 0x406075
jmp 0x4060b8
cmp dword [ebp - 8], 0
jne 0x406084
mov dword [ebp - 4], 2
jmp 0x4060b8
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], 0
je 0x4060b3
mov eax, dword [ebp - 8]
mov dword [ebp - 0x224], eax
mov ecx, dword [ebp - 0x224]
push ecx
call fcn.00414bfe
add esp, 4
mov dword [ebp - 8], 0
jmp 0x405f9a
cmp dword [0x468ac8], 0
je 0x4060e6
mov edx, dword [0x468ac8]
mov dword [ebp - 0x228], edx
mov eax, dword [ebp - 0x228]
push eax
call fcn.00414bfe
add esp, 4
mov dword [0x468ac8], 0
cmp dword [0x468acc], 0
je 0x406194
mov dword [ebp - 0x21c], 0
jmp 0x40610e
mov ecx, dword [ebp - 0x21c]
add ecx, 1
mov dword [ebp - 0x21c], ecx
mov edx, dword [ebp - 0x21c]
cmp edx, dword [0x468ad0]
jge 0x406166
mov eax, dword [ebp - 0x21c]
mov ecx, dword [0x468acc]
cmp dword [ecx + eax*4], 0
je 0x406164
mov edx, dword [ebp - 0x21c]
mov eax, dword [0x468acc]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp - 0x22c]
push edx
call fcn.00414bfe
add esp, 4
mov eax, dword [ebp - 0x21c]
mov ecx, dword [0x468acc]
mov dword [ecx + eax*4], 0
jmp 0x4060ff
cmp dword [0x468acc], 0
je 0x406194
mov edx, dword [0x468acc]
mov dword [ebp - 0x230], edx
mov eax, dword [ebp - 0x230]
push eax
call fcn.00414bfe
add esp, 4
mov dword [0x468acc], 0
xor ecx, ecx
jne 0x405e7a
cmp dword [ebp - 8], 0
je 0x4061c1
mov edx, dword [ebp - 8]
mov dword [ebp - 0x234], edx
mov eax, dword [ebp - 0x234]
push eax
call fcn.00414bfe
add esp, 4
mov dword [ebp - 8], 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.00415063
mov esp, ebp
pop ebp
ret