Function at 0x411540
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x152c
call fcn.00426590
mov eax, dword [0x4b249c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x152c], ecx
cmp dword [ebp + 0x14], 0
je 0x41159d
cmp dword [0x4b20a8], 0xffffffff
jne 0x41159d
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x152c]
call fcn.00411d00
test eax, eax
je 0x41159d
push 0
push 0
push 4
push 0
push 3
push 0x40000000
mov ecx, dword [ebp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x4b20a8], eax
mov edx, dword [ebp - 0x152c]
cmp dword [edx + 0xe8], 0xffffffff
jne 0x411827
mov eax, dword [ebp - 0x152c]
add eax, 0xf8
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x131c], eax
cmp dword [ebp - 0x131c], 0xffffffff
je 0x4115e1
mov ecx, dword [ebp - 0x131c]
and ecx, 0x10
je 0x4115e1
jmp 0x41166e
mov edx, dword [ebp - 0x152c]
add edx, 0xf8
push edx
mov ecx, dword [ebp - 0x152c]
call fcn.00411bf0
test eax, eax
jne 0x41166e
mov eax, dword [ebp - 0x152c]
add eax, 0xf8
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x41161d
jmp 0x411bdd
push str.TSLOG
mov ecx, dword [ebp - 0x152c]
add ecx, 0xf8
push ecx
push str._s_S_
push 0x104
mov edx, dword [ebp - 0x152c]
add edx, 0xf8
push edx
call fcn.0042a1c6
add esp, 0x14
mov eax, dword [ebp - 0x152c]
add eax, 0xf8
push eax
mov ecx, dword [ebp - 0x152c]
call fcn.00411bf0
test eax, eax
jne 0x41166e
jmp 0x411bdd
xor ecx, ecx
mov word [ebp - 0x1318], cx
push 0x206
push 0
lea edx, [ebp - 0x1316]
push edx
call fcn.00426300
add esp, 0xc
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0xec]
add ecx, 1
mov edx, dword [ebp - 0x152c]
mov dword [edx + 0xec], ecx
push 0
lea eax, [ebp - 0x1318]
push eax
mov ecx, dword [ebp - 0x152c]
mov edx, dword [ecx + 0xec]
push edx
mov ecx, dword [ebp - 0x152c]
call fcn.00411e20
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0x23c]
add ecx, 1
mov edx, dword [ebp - 0x152c]
mov dword [edx + 0x23c], ecx
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea eax, [ebp - 0x1318]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x152c]
mov dword [ecx + 0xe8], eax
mov edx, dword [ebp - 0x152c]
cmp dword [edx + 0xe8], 0xffffffff
jne 0x411827
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1320], eax
cmp dword [ebp - 0x1320], 0x70
jne 0x411765
mov eax, dword [ebp - 0x152c]
mov dword [eax + 0x2c], 0
push str.C:T_CONFIGTSLOG.ini
push 0x43efec
push str.FileLog
push 0x43eff4
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x411bdd
cmp dword [ebp - 0x1320], 5
jne 0x411822
mov ecx, dword [ebp - 0x152c]
add ecx, 0xf8
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x411793
jmp 0x411bdd
push str.TSLOG
mov edx, dword [ebp - 0x152c]
add edx, 0xf8
push edx
push str._sTSLOG_S_
push 0x104
mov eax, dword [ebp - 0x152c]
add eax, 0xf8
push eax
call fcn.0042a1c6
add esp, 0x14
push 0
lea ecx, [ebp - 0x1318]
push ecx
mov edx, dword [ebp - 0x152c]
mov eax, dword [edx + 0xec]
push eax
mov ecx, dword [ebp - 0x152c]
call fcn.00411e20
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea ecx, [ebp - 0x1318]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, dword [ebp - 0x152c]
mov dword [edx + 0xe8], eax
mov eax, dword [ebp - 0x152c]
cmp dword [eax + 0xe8], 0xffffffff
jne 0x411820
jmp 0x411bdd
jmp 0x411827
jmp 0x411bdd
mov dword [ebp - 0x1110], 0
mov byte [ebp - 0x1108], 0
push 0x10ff
push 0
lea ecx, [ebp - 0x1107]
push ecx
call fcn.00426300
add esp, 0xc
mov dword [ebp - 0x110c], 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov edx, dword [ebp + 0xc]
push edx
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x110c], eax
cmp dword [ebp - 0x110c], 0
jg 0x411889
jmp 0x411bdd
cmp dword [ebp - 0x110c], 0x10ff
jle 0x41189a
jmp 0x411bdd
push 0
push 0
mov eax, dword [ebp - 0x110c]
push eax
lea ecx, [ebp - 0x1108]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp + 0xc]
push edx
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp + 0x10], eax
cmp dword [ebp + 0x10], 0
ja 0x4118cd
jmp 0x411bdd
mov eax, dword [ebp + 0x10]
sub eax, 1
mov dword [ebp + 0x10], eax
cmp dword [ebp + 0x10], 0x1000
jbe 0x4118e6
mov dword [ebp + 0x10], 0x1000
cmp dword [0x4b20a8], 0xffffffff
je 0x411939
push 2
push 0
push 0
mov ecx, dword [0x4b20a8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x1110]
push edx
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x1108]
push ecx
mov edx, dword [0x4b20a8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x4b20a8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4b20a8], 0xffffffff
push 0
lea ecx, [ebp - 0x1110]
push ecx
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x1108]
push eax
mov ecx, dword [ebp - 0x152c]
mov edx, dword [ecx + 0xe8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41199b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
jne 0x411996
mov eax, dword [ebp - 0x152c]
mov dword [eax + 0x2c], 0
push str.C:T_CONFIGTSLOG.ini
push 0x43efec
push str.FileLog
push 0x43eff4
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x411bdd
mov ecx, dword [ebp - 0x152c]
mov edx, dword [0x4b3edc]
cmp edx, dword [ecx + 0x23c]
jae 0x4119ce
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0x23c]
mov dword [0x4b3edc], ecx
mov ecx, dword [ebp - 0x152c]
call fcn.0040ee50
jmp 0x4119f3
mov edx, dword [ebp - 0x152c]
mov eax, dword [0x4b3edc]
cmp eax, dword [edx + 0x23c]
jbe 0x4119f3
mov ecx, dword [ebp - 0x152c]
mov edx, dword [ecx + 0x23c]
mov dword [0x4b3edc], edx
cmp dword [ebp + 8], 6
je 0x411a17
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0xf4]
add ecx, dword [ebp - 0x1110]
mov edx, dword [ebp - 0x152c]
mov dword [edx + 0xf4], ecx
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0xdc]
shl ecx, 0xa
mov edx, dword [ebp - 0x152c]
cmp dword [edx + 0xf4], ecx
jb 0x411bdd
mov eax, dword [ebp - 0x152c]
mov dword [eax + 0xf4], 0
mov ecx, dword [ebp - 0x152c]
mov edx, dword [ecx + 0xe8]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0xe8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov word [ebp - 0x1528], dx
push 0x206
push 0
lea eax, [ebp - 0x1526]
push eax
call fcn.00426300
add esp, 0xc
push 0x208
push 0
lea ecx, [ebp - 0x1528]
push ecx
call fcn.00426300
add esp, 0xc
mov edx, dword [ebp - 0x152c]
mov eax, dword [ebp - 0x152c]
mov ecx, dword [edx + 0xec]
cmp ecx, dword [eax + 0xe0]
jl 0x411afa
push 0
lea edx, [ebp - 0x1528]
push edx
mov eax, dword [ebp - 0x152c]
mov ecx, dword [ebp - 0x152c]
mov edx, dword [eax + 0xec]
sub edx, dword [ecx + 0xe0]
add edx, 1
push edx
mov ecx, dword [ebp - 0x152c]
call fcn.00411e20
lea eax, [ebp - 0x1528]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x208
push 0
lea ecx, [ebp - 0x1528]
push ecx
call fcn.00426300
add esp, 0xc
lea edx, [ebp - 0x1528]
push edx
push 0
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0xec]
push ecx
mov ecx, dword [ebp - 0x152c]
call fcn.00411e20
mov edx, dword [ebp - 0x152c]
mov eax, dword [edx + 0xec]
add eax, 1
mov ecx, dword [ebp - 0x152c]
mov dword [ecx + 0xec], eax
mov edx, dword [ebp - 0x152c]
cmp dword [edx + 0xec], 0x3e7
jl 0x411b6e
mov eax, dword [ebp - 0x152c]
mov dword [eax + 0xec], 0
mov ecx, dword [ebp - 0x152c]
mov edx, dword [ecx + 0x23c]
add edx, 1
mov eax, dword [ebp - 0x152c]
mov dword [eax + 0x23c], edx
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea ecx, [ebp - 0x1528]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, dword [ebp - 0x152c]
mov dword [edx + 0xe8], eax
mov eax, dword [ebp - 0x152c]
mov ecx, dword [eax + 0x23c]
mov dword [0x4b3edc], ecx
mov edx, dword [ebp - 0x152c]
cmp dword [edx + 0xe8], 0
je 0x411bdd
mov ecx, dword [ebp - 0x152c]
call fcn.0040ee50
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042624f
mov esp, ebp
pop ebp
ret 0x10