Function at 0x405f40
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 4]
call section..text
mov edi, eax
mov dword [esi + 0x2038], edi
test edi, edi
je 0x405f84
mov ebx, dword [edi]
cmp ebx, 0xffffffff
je 0x405f84
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x405f7e
push ebx
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [edi], 0xffffffff
push 0
push ecx
mov ecx, dword [esi + 4]
mov edx, 4
push 0
push 0
call fcn.00411d20
mov dword [esi + 8], eax
cmp eax, 0xffffffff
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
jne 0x405fb1
or dword [esi + 0x14], 0x8000000
jmp 0x406747
cmp dword [0x43bd20], 0
je 0x405fc9
call eax
cmp dword [0x43bd20], eax
mov eax, 0x43acbc
je 0x405fce
mov eax, 0x43ac6c
or dword [eax], 0x300000
call fcn.00416950
push 0
mov ebx, eax
push 0xfde9
mov dword [esi + 0x30], ebx
push dword [0x43c19c]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406023
mov edx, edi
lea ecx, [edx + 1]
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x406000
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [esi + 4]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406063
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406040
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [0x43c1a0]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x4060a6
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406083
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [esi + 0x1c]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x4060e6
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4060c3
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
cmp dword [esi + 0x24], 0x51e
lea edi, [esi + 0x1c]
jne 0x406118
mov edx, 0x436640
mov ecx, edi
call fcn.00411940
test eax, eax
jne 0x406105
mov dword [esi + 0x28], eax
mov ecx, dword [edi]
mov edx, 2
call fcn.00415970
test eax, eax
jne 0x406118
mov dword [esi + 0x28], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x406130
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406121
sub ecx, edx
sar ecx, 1
cmp dword [esi + 0x10], 0
mov dword [esi + 0x20], ecx
jbe 0x406742
mov eax, 1
lea ebx, [esi + 0x14]
xor ecx, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ecx
nop dword [eax]
and dword [ebx], 0xfffffff9
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0xc]
push str._::
push dword [ecx + eax]
call fcn.0041a159
add esp, 8
test eax, eax
je 0x406726
movzx ecx, word [eax + 8]
cmp ecx, 0x43
je 0x406184
cmp ecx, 0x55
jne 0x406187
or dword [ebx], 2
jmp 0x406187
or dword [ebx], 4
xor ecx, ecx
mov edx, 0x43708c
mov word [eax], cx
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + eax]
test eax, eax
cmovne edx, eax
mov edi, edx
movzx eax, word [edx]
test ax, ax
je 0x4061d3
mov ecx, eax
nop dword [eax + eax]
cmp cx, 0x5c
je 0x4061c2
cmp cx, 0x3a
je 0x4061c2
cmp cx, 0x2f
jne 0x4061c5
lea edi, [edx + 2]
movzx eax, word [edx + 2]
add edx, 2
mov ecx, eax
test ax, ax
jne 0x4061b0
test dword [ebx], 0x8000000
mov dword [esi + 0x18], edi
je 0x406224
mov ecx, dword [esi + 0x30]
mov edx, 0x437320
push 0x20010016
push 0
push 2
call fcn.00412150
mov ebx, dword [esi + 0x30]
add esp, 0xc
push 0
push 0xfde9
push dword [esi + 0x18]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406723
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406218
jmp 0x406707
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [0x43c1a8]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406267
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406244
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [esi + 0x18]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x4062a7
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406284
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
cmp dword [0x43bd20], 0
je 0x4062c3
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x43bd20], eax
mov eax, 0x43acbc
je 0x4062c8
mov eax, 0x43ac6c
and dword [eax], 0xffcfffff
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 4]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esi + 0x14]
mov dword [esi + 0x2c], eax
push ecx
mov ecx, dword [esi + 8]
lea edx, [esi + 0x34]
push eax
call fcn.00405ab0
mov edi, dword [esi + 0x2c]
add esp, 8
mov ebx, eax
cmp edi, 0xffffffff
je 0x40632e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x406327
push edi
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [esi + 0x2c], 0xffffffff
cmp dword [0x43bd20], 0
je 0x40634a
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x43bd20], eax
mov eax, 0x43acbc
je 0x40634f
mov eax, 0x43ac6c
or dword [eax], 0x300000
mov edx, 0x437320
mov ecx, dword [esi + 0x30]
push 0x20010016
push 0
push 2
call fcn.00412150
add esp, 0xc
cmp ebx, 0xfffffffd
je 0x406684
cmp ebx, 0xfffffffe
je 0x4065fe
test ebx, ebx
jne 0x4063c7
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [0x43c1ac]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x4063c7
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4063a4
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
mov ecx, dword [esi + 0x30]
mov edx, str._r_n_
push 0x20010016
push 0
push 5
call fcn.00412150
add esp, 0xc
cmp dword [esi + 0x28], 0
je 0x4065cf
mov eax, dword [esi + 0x24]
add eax, 0xfffffae4
mov dword [esi + 0x28], 0
cmp eax, 3
ja case.default.0x406402
jmp dword [eax*4 + 0x406898]
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 4]
push 0
mov edi, dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40646c
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40646c
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push 0x43665c
mov dword [esi + 0x28], 1
call fcn.00416da0
mov edi, eax
test edi, edi
je case.default.0x406402
mov edx, edi
lea ecx, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x406460
jmp 0x4065a9
push edi
push 0xe001000c
call fcn.00413190
add esp, 8
jmp case.default.0x406402
mov eax, dword [esi + 0xc]
mov ebx, dword [ebp - 4]
push 0x436660
push dword [ebx + eax]
push 0
call fcn.00414380
mov edi, eax
add esp, 0xc
test edi, edi
je case.default.0x406402
mov edx, dword [esi + 0xc]
mov ecx, edi
mov edx, dword [ebx + edx]
call fcn.004122c0
test eax, eax
je 0x4064fb
mov eax, dword [esi + 0x30]
push 0
push 0xfde9
push edi
mov dword [esi + 0x28], 1
mov dword [ebp - 0xc], eax
call fcn.00416da0
mov ebx, eax
test ebx, ebx
je 0x4064fb
mov edx, ebx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4064d7
sub edx, ecx
mov ecx, dword [ebp - 0xc]
push 0x20010016
push 0
push edx
mov edx, ebx
call fcn.00412150
push ebx
call fcn.0041d6c3
add esp, 0x10
push edi
call fcn.0041d6c3
add esp, 4
jmp case.default.0x406402
mov ecx, dword [esi + 0x20]
xor edx, edx
mov eax, dword [esi + 0x1c]
mov word [eax + ecx*2], dx
lea ecx, [esi + 0x1c]
mov edx, dword [esi + 0x18]
call fcn.00411940
test eax, eax
je case.default.0x406402
mov edx, dword [esi + 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [esi + 0x1c]
mov edx, dword [eax + edx]
call fcn.004122c0
test eax, eax
je case.default.0x406402
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [esi + 0x1c]
mov dword [esi + 0x28], 1
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406723
mov edx, edi
lea ecx, [edx + 1]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x406570
jmp 0x406707
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push 0x436668
mov dword [esi + 0x28], 1
call fcn.00416da0
mov edi, eax
test edi, edi
je case.default.0x406402
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4065a2
push 0x20010016
sub edx, ecx
mov ecx, ebx
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
cmp dword [esi + 0x28], 0
jne 0x406723
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push 0x43666c
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406723
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4065f2
jmp 0x406707
or dword [esi + 0x14], 0x8000000
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [0x43c1a4]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406648
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406625
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
mov ebx, dword [ebp - 8]
cmp ebx, dword [esi + 0x10]
jae 0x406723
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [0x43c1b4]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406723
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406678
jmp 0x406707
or dword [esi + 0x14], 0x8000000
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [0x43c1b0]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x4066d3
mov edx, edi
lea ecx, [edx + 1]
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x4066b0
sub edx, ecx
mov ecx, ebx
push 0x20010016
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
mov ebx, dword [ebp - 8]
cmp ebx, dword [esi + 0x10]
jae 0x406723
mov ebx, dword [esi + 0x30]
push 0
push 0xfde9
push dword [0x43c1b4]
call fcn.00416da0
mov edi, eax
test edi, edi
je 0x406723
mov edx, edi
lea ecx, [edx + 1]
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x406700
push 0x20010016
sub edx, ecx
mov ecx, ebx
push 0
push edx
mov edx, edi
call fcn.00412150
push edi
call fcn.0041d6c3
add esp, 0x10
lea ebx, [esi + 0x14]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
add ecx, 4
mov edx, dword [ebp - 0x10]
inc eax
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
cmp edx, dword [esi + 0x10]
jb 0x406150
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x43bd20], 0
je 0x40675f
call eax
cmp dword [0x43bd20], eax
mov eax, 0x43acbc
je 0x406764
mov eax, 0x43ac6c
and dword [eax], 0xffcfffff
mov edi, dword [esi + 8]
cmp edi, 0xffffffff
je 0x40679a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x406793
push edi
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [esi + 8], 0xffffffff
jmp 0x4067a0
mov dword [esi + 8], 0xffffffff
cmp dword [esi + 0x28], 0
jne 0x4067a7
or dword [esi + 0x14], 0x8000000
mov eax, dword [esi + 0x14]
and eax, 0x8000000
neg eax
sbb eax, eax
neg eax
add eax, 0x200f000f
push eax
call fcn.00413190
mov edi, dword [esi + 0x30]
add esp, 4
mov ebx, eax
cmp edi, 0xffffffff
je 0x40680f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4067e5
push edi
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [esi + 0x30], 0xffffffff
cmp ebx, 6
jne 0x406826
call fcn.004167e0
mov edi, eax
push ecx
mov ecx, edi
call fcn.004148e0
test edi, edi
je 0x406826
push edi
call fcn.0041d6c3
add esp, 4
jmp 0x406826
cmp ebx, 6
jne 0x406826
push 0x436670
push 0x20010007
call fcn.00413190
add esp, 8
test dword [esi + 0x14], 0x4000000
je 0x40685d
cmp dword [esi + 0x2038], 0
je 0x406881
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [esi + 0x2038]
mov dword [ecx], eax
jmp 0x406881
mov ecx, dword [esi + 4]
call fcn.0040cab0
test eax, eax
je 0x406881
push 0
push 0x9c7d
push 0x111
push dword [0x43ac4c]
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esi + 0x14]
and eax, 0x8000000
neg eax
pop edi
sbb eax, eax
and eax, 0xfffffffe
pop esi
inc eax
pop ebx
mov esp, ebp
pop ebp
ret