Function at 0x406744
Capabilities:
Delete file
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff9b0
xor eax, eax
mov dword [ebp - 0x1c], eax
call fcn.004038cc
push 0
push str.comport
push str.PCDOCW
call fcn.004033c8
add esp, 0xc
dec eax
mov dword [0x44fff4], eax
cmp dword [0x44fff4], 0
jl 0x406786
cmp dword [0x44fff4], 0x100
jl 0x40678e
xor edx, edx
mov dword [0x44fff4], edx
mov ecx, dword [0x44fff4]
mov dword [0x44fff8], ecx
push 1
push str.NOEDIT
push str.PCDOCW
call fcn.004033c8
add esp, 0xc
test eax, eax
jle 0x4067bc
mov dword [0x46a11c], 1
push 0x465fd7
push str.lfn_PP
call fcn.00420ba4
add esp, 8
push 0x467555
push str.lfn_RD
call fcn.00420ba4
add esp, 8
push 0x468ad3
push str.lfn_XD
call fcn.00420ba4
add esp, 8
push 0
push 0x104
push 0x44fbda
push str.lfn_XS
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0
push 0x104
push 0x44fad3
push str.lfn_RS
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0
push 0x104
push 0x44fce1
push str.lfn_LG
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0
push 0x104
push 0x44fe18
push str.lfn_XML
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0
push 0x104
push 0x4655a5
push str.datapath
push str.PCDOCW
call fcn.00403334
add esp, 0x14
cmp byte [0x4655a5], 0
jne 0x4068a3
push 0x4650c8
push 0x4655a5
call fcn.004415c8
add esp, 8
push 0x4655a5
call fcn.004045c0
pop ecx
mov byte [ebp - 0x234], 0
xor eax, eax
mov dword [ebp - 0x14], eax
cmp byte [ebp - 0x234], 0
jne 0x4068fe
mov edx, dword [ebp - 0x14]
shl edx, 4
cmp dword [edx + 0x457818], 0
je 0x4068fe
mov ecx, dword [ebp - 0x14]
shl ecx, 4
mov eax, dword [ecx + 0x457810]
cmp byte [eax], 0
je 0x4068fe
mov edx, dword [ebp - 0x14]
shl edx, 4
push dword [edx + 0x457810]
lea ecx, [ebp - 0x234]
push ecx
call fcn.004415c8
add esp, 8
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 4
jl 0x4068ba
push 0x5c
lea eax, [ebp - 0x234]
push eax
call fcn.004416fd
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40692a
mov edx, dword [ebp - 0x10]
mov byte [edx + 1], 0
jmp 0x406931
mov byte [ebp - 0x234], 0
cmp byte [ebp - 0x234], 0
jne 0x406c4c
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
shl eax, 4
cmp dword [eax + 0x45781c], 0
je 0x40697f
mov edx, dword [ebp - 0x14]
shl edx, 4
mov ecx, dword [edx + 0x457810]
mov dword [ebp - 0x24], ecx
xor eax, eax
mov dword [ebp - 0x18], eax
imul edx, dword [ebp - 0x18], 0x83
mov ecx, dword [ebp - 0x24]
mov byte [ecx + edx*2], 0
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0x15
jl 0x406966
jmp 0x40698e
mov eax, dword [ebp - 0x14]
shl eax, 4
mov edx, dword [eax + 0x457810]
mov byte [edx], 0
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 4
jl 0x406943
cmp dword [0x450db0], 0
je 0x4069b7
push 0x4650c8
push 0x4655a5
call fcn.004415c8
add esp, 8
jmp 0x406c4c
mov dword [ebp - 0x1c], 1
push 0x4650c8
lea ecx, [ebp - 0x12c]
push ecx
call fcn.004415c8
add esp, 8
lea eax, [ebp - 0x12c]
push eax
call fcn.00404600
pop ecx
push 0
push 5
lea edx, [ebp - 0x650]
push edx
push 0
call sub.SHELL32.DLL_SHGetSpecialFolderPathA
test eax, eax
jne 0x4069fe
mov byte [ebp - 0x650], 0
jmp 0x406a1f
lea ecx, [ebp - 0x650]
push ecx
call fcn.004045c0
pop ecx
push 0x455fd0
lea eax, [ebp - 0x650]
push eax
call fcn.004414ec
add esp, 8
push 0x4650c8
push 0x4655a5
call fcn.0044157c
add esp, 8
test eax, eax
jne 0x406a3c
mov byte [0x4655a5], 0
cmp byte [0x4655a5], 0
jne 0x406a83
cmp byte [ebp - 0x650], 0
jne 0x406a6f
push str.setup_MyDoc_err1
call fcn.0040391c
pop ecx
lea edx, [ebp - 0x12c]
push edx
push 0x4655a5
call fcn.004415c8
add esp, 8
jmp 0x406a83
lea ecx, [ebp - 0x650]
push ecx
push 0x4655a5
call fcn.004415c8
add esp, 8
push 0x4655a5
call fcn.00404600
pop ecx
push 0x4655a5
push str.Der_Pfad_f
push 0x455fee
lea eax, [ebp - 0x548]
push eax
call fcn.00444f70
add esp, 0x10
cmp byte [ebp - 0x650], 0
je 0x406acd
lea edx, [ebp - 0x650]
push edx
push 0x4655a5
call fcn.0044157c
add esp, 8
test eax, eax
jne 0x406b02
push 0
push 0x456044
push 7
push 0x456040
push 0x20001
push 0
push 0x30
push 0
lea ecx, [ebp - 0x548]
push ecx
push 0
push dword [0x44f8dc]
call fcn.0041ddd4
add esp, 0x2c
mov dword [ebp - 0x14], eax
jmp 0x406b5b
push 0
push str.Anderen_Pfad_ausw
push 7
push str.Dokumentenverzeichnis_verwenden
push 2
push 0x45605c
push 0x20001
push 0
push 0x30
push 0
lea eax, [ebp - 0x548]
push eax
push 0
push dword [0x44f8dc]
call fcn.0041ddd4
add esp, 0x34
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 2
jne 0x406b5b
lea edx, [ebp - 0x650]
push edx
push 0x4655a5
call fcn.004415c8
add esp, 8
jmp 0x406a8e
cmp dword [ebp - 0x14], 7
jne 0x406bb5
push 0x4655a5
lea ecx, [ebp - 0x33c]
push ecx
call fcn.004415c8
add esp, 8
push 0x456099
lea eax, [ebp - 0x33c]
push eax
push dword [0x44f8dc]
call fcn.0041f7b4
add esp, 0xc
cmp byte [ebp - 0x33c], 0
je 0x406a8e
lea edx, [ebp - 0x33c]
push edx
push 0x4655a5
call fcn.004415c8
add esp, 8
jmp 0x406a8e
lea ecx, [ebp - 0x12c]
push ecx
push 0x4655a5
call fcn.0044157c
add esp, 8
test eax, eax
je 0x406c0d
push 0x4655a5
call fcn.0040444c
pop ecx
test eax, eax
jne 0x406c0d
push 0x4655a5
push 0x4560b1
push 0x14
push dword [0x44f8dc]
call fcn.0041124c
add esp, 0x10
push 0x4655a5
push str.setup_MyDoc_err2___s_
call fcn.0040391c
add esp, 8
jmp 0x406a8e
push 0x4655a5
push str.setup_MyDoc__s_
call fcn.0040391c
add esp, 8
push 0x4655a5
push str.datapath
push str.PCDOCW
call fcn.004032c0
add esp, 0xc
push 0x4655a5
call fcn.0041ef80
pop ecx
push 0x4655a5
call fcn.004045c0
pop ecx
push 0x4655a5
lea eax, [ebp - 0x548]
push eax
call fcn.004415c8
add esp, 8
push str.PCDDIRTEST.
lea edx, [ebp - 0x548]
push edx
call fcn.004414ec
add esp, 8
push 0x80
lea ecx, [ebp - 0x548]
push ecx
call sub.KERNEL32.DLL_SetFileAttributesA
push 0x456118
lea eax, [ebp - 0x548]
push eax
call fcn.0044362c
add esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x406cb9
push dword [ebp - 0x20]
call fcn.00442e70
pop ecx
lea edx, [ebp - 0x548]
push edx
call sub.KERNEL32.DLL_DeleteFileA
jmp 0x406cdd
push 0x4655a5
push str.Cant_use_datapath___s__r_n
call fcn.0040391c
add esp, 8
push 0x4650c8
push 0x4655a5
call fcn.004415c8
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
shl eax, 4
mov edx, dword [eax + 0x457810]
cmp byte [edx], 0
jne 0x406d0c
push 0x4655a5
mov ecx, dword [ebp - 0x14]
shl ecx, 4
push dword [ecx + 0x457810]
call fcn.004415c8
add esp, 8
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 4
jl 0x406ce2
push 0
push 9
lea eax, [ebp - 0xc]
push eax
push str.lfi_PP
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0x44ffa4
push 0x456135
lea edx, [ebp - 0xc]
push edx
call fcn.00444fec
add esp, 0xc
dec eax
jne 0x406d5a
cmp dword [0x44ffa4], 1
jl 0x406d5a
cmp dword [0x44ffa4], 6
jl 0x406d64
mov dword [0x44ffa4], 3
push 0
push 9
lea ecx, [ebp - 0xc]
push ecx
push str.lfi_RS
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0x44ffa8
push 0x456138
lea eax, [ebp - 0xc]
push eax
call fcn.00444fec
add esp, 0xc
dec eax
jne 0x406da9
cmp dword [0x44ffa8], 1
jl 0x406da9
cmp dword [0x44ffa8], 4
jle 0x406db3
mov dword [0x44ffa8], 1
push 0
push 9
lea edx, [ebp - 0xc]
push edx
push str.lfi_RD
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0x44ffac
push 0x45613b
lea ecx, [ebp - 0xc]
push ecx
call fcn.00444fec
add esp, 0xc
dec eax
jne 0x406df8
cmp dword [0x44ffac], 1
jl 0x406df8
cmp dword [0x44ffac], 2
jle 0x406e02
mov dword [0x44ffac], 1
push 0
push 9
lea eax, [ebp - 0xc]
push eax
push str.lfn_TRS
push str.PCDOCW
call fcn.00403334
add esp, 0x14
push 0x44ffb0
push 0x45613e
lea edx, [ebp - 0xc]
push edx
call fcn.00444fec
add esp, 0xc
dec eax
je 0x406e3f
mov dword [0x44ffb0], 0xffffffff
cmp dword [ebp - 0x1c], 0
je 0x406e4a
call fcn.00406e50
mov esp, ebp
pop ebp
ret