Function at 0x4043e0
Capabilities:
Check os version
Create directory
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51434d
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x56a698]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0x138], ebx
mov dword [ebp - 0x140], edi
call fcn.0040a05e
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x404438
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x130], esi
mov dword [ebp - 4], edi
call fcn.0040a05e
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x404467
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x144], eax
lea ecx, [ebp - 0x12c]
push ecx
mov byte [ebp - 4], 1
mov dword [ebp - 0x12c], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4048be
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x105
cmp dword [ebp - 0x128], 6
jb 0x40478b
or eax, ecx
jge 0x4044d3
push 0x105
lea ecx, [ebp - 0x130]
call fcn.00401db0
mov esi, dword [ebp - 0x130]
push esi
push edi
push edi
push 0x23
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
cmp eax, edi
jl 0x404781
cmp eax, dword [esi - 8]
jg 0x404781
xor edx, edx
mov dword [esi - 0xc], eax
push 0x5231ec
lea ecx, [ebp - 0x130]
mov word [esi + eax*2], dx
call fcn.00403360
push 8
push str.Siemens
lea ecx, [ebp - 0x130]
call fcn.00403200
mov eax, dword [ebp - 0x130]
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
push eax
call esi
push 0xb
push str.Automation
lea ecx, [ebp - 0x130]
call fcn.00403200
mov ecx, dword [ebp - 0x130]
push edi
push ecx
call esi
push 9
push str.Logfiles
lea ecx, [ebp - 0x130]
call fcn.00403200
mov edx, dword [ebp - 0x130]
push edi
push edx
call esi
push 6
push str.Setup
lea ecx, [ebp - 0x130]
call fcn.00403200
mov eax, dword [ebp - 0x130]
push edi
push eax
call esi
push 1
push 0x5231ec
lea ecx, [ebp - 0x130]
call fcn.00403200
add ebx, 0xe0
push ebx
lea ecx, [ebp - 0x130]
push ecx
lea edx, [ebp - 0x134]
push edx
call fcn.00403400
add esp, 0xc
mov edi, dword [ebp - 0x138]
add edi, 0xe8
push eax
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.004018d0
mov eax, dword [ebp - 0x134]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4045f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0040a05e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404613
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x134], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x105
or eax, ecx
mov byte [ebp - 4], 3
jge 0x404653
push 0x105
lea ecx, [ebp - 0x134]
call fcn.00401db0
mov esi, dword [ebp - 0x134]
push esi
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x404781
cmp eax, dword [esi - 8]
jg 0x404781
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push 0x5231ec
lea ecx, [ebp - 0x134]
call fcn.00403360
push 0x23
push str.SiemensAutomationLogfilesSetup_
lea ecx, [ebp - 0x134]
call fcn.00403200
mov esi, dword [ebp - 0x134]
push 0
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push ebx
lea edx, [ebp - 0x134]
push edx
lea eax, [ebp - 0x13c]
push eax
call fcn.00403400
add esp, 0xc
push eax
mov ecx, edi
mov byte [ebp - 4], 4
call fcn.004018d0
mov eax, dword [ebp - 0x13c]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404705
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404725
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x138]
mov esi, dword [ebp - 0x130]
push esi
push 3
call section..text
add esp, 8
cmp eax, 1
jne 0x404929
push esi
push eax
call section..text
add esp, 8
test eax, eax
jg 0x40487a
push ecx
mov ecx, esp
mov dword [ebp - 0x138], esp
lea edx, [ebp - 0x130]
push edx
push str.Path_is_write_protected:
push ecx
call fcn.00401520
add esp, 0xc
mov ecx, ebx
call fcn.00402a50
jmp 0x4048be
push 0x80070057
call fcn.00401e50
or eax, ecx
jge 0x4047a5
push 0x105
lea ecx, [ebp - 0x130]
call fcn.00401db0
mov esi, dword [ebp - 0x130]
push esi
push edi
push edi
push 0x24
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
cmp eax, edi
jl 0x404781
cmp eax, dword [esi - 8]
jg 0x404781
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push 0x5231ec
lea ecx, [ebp - 0x130]
call fcn.00403360
push 0x5231ec
lea edx, [ebp - 0x130]
push edx
lea eax, [ebp - 0x134]
push eax
call fcn.004034c0
lea ecx, [ebx + 0xe0]
push ecx
push eax
lea edx, [ebp - 0x13c]
push edx
mov byte [ebp - 4], 5
call fcn.00403400
add esp, 0x18
lea edi, [ebx + 0xe8]
push eax
mov ecx, edi
mov byte [ebp - 4], 6
call fcn.004018d0
mov eax, dword [ebp - 0x13c]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40484b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x134]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40472b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40472b
mov eax, dword [edi]
push 0xa
push eax
mov ecx, 0x56bc60
mov dword [ebp - 0x140], 1
call fcn.00407410
cmp dword [ebx + 0xc0], 0
jne 0x4048a5
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x523318
push 0x5232d0
push 7
push 0x56bc60
call fcn.00407920
add esp, 0x10
mov eax, dword [ebp - 0x144]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4048e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404907
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [ebp - 0x140]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004fcaa0
mov esp, ebp
pop ebp
ret
push ecx
mov eax, esp
mov dword [ebp - 0x138], esp
lea ecx, [ebp - 0x130]
push ecx
push str.Path_not_exist:
push eax
call fcn.00401520
add esp, 0xc
mov ecx, ebx
call fcn.00402a50
jmp 0x4048be