Function at 0x464510
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x5f3008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [0x616724]
push esi
push edi
push ebx
mov dword [ebp - 0x44], eax
mov word [ebp - 0x3c], 0xfeff
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4645dd
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4645c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x7d0
mov esi, eax
call fcn.00560858
add esp, 4
mov edi, eax
push esi
push 0x851
push 0x5aabc8
push 0x5aa1dc
push 0x1f4
push edi
call fcn.00406c50
add esp, 0x18
push 0x30
push 0x591508
push edi
push dword [ebp - 0x44]
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
call fcn.00560853
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [ebp - 0x40]
push eax
push 2
lea eax, [ebp - 0x3c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx ecx, byte [ebx + 0x5448]
movzx eax, byte [ebx + 0x5447]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5446]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464619
xor ecx, ecx
jmp 0x46461c
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464638
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
jmp 0x46463a
xor eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette00
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x544b]
movzx eax, byte [ebx + 0x544a]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5449]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464694
xor ecx, ecx
jmp 0x464697
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x4646b9
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x4646bb
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette01
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x544e]
movzx eax, byte [ebx + 0x544d]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x544c]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x46470f
xor ecx, ecx
jmp 0x464712
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464734
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464736
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette02
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5451]
movzx eax, byte [ebx + 0x5450]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x544f]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x46478a
xor ecx, ecx
jmp 0x46478d
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x4647af
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x4647b1
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette03
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5454]
movzx eax, byte [ebx + 0x5453]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5452]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464805
xor ecx, ecx
jmp 0x464808
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x46482a
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x46482c
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette04
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5457]
movzx eax, byte [ebx + 0x5456]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5455]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464880
xor ecx, ecx
jmp 0x464883
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x4648a5
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x4648a7
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette05
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x545a]
movzx eax, byte [ebx + 0x5459]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5458]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x4648fb
xor ecx, ecx
jmp 0x4648fe
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464920
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464922
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette06
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x545d]
movzx eax, byte [ebx + 0x545c]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x545b]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464976
xor ecx, ecx
jmp 0x464979
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x46499b
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x46499d
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette07
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5460]
movzx eax, byte [ebx + 0x545f]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x545e]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x4649f1
xor ecx, ecx
jmp 0x4649f4
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464a16
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464a18
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette08
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5463]
movzx eax, byte [ebx + 0x5462]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5461]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464a6c
xor ecx, ecx
jmp 0x464a6f
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464a91
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464a93
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette09
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5466]
movzx eax, byte [ebx + 0x5465]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5464]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464ae7
xor ecx, ecx
jmp 0x464aea
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464b0c
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464b0e
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette10
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5469]
movzx eax, byte [ebx + 0x5468]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5467]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464b62
xor ecx, ecx
jmp 0x464b65
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464b87
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464b89
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette11
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x546c]
movzx eax, byte [ebx + 0x546b]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x546a]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464bdd
xor ecx, ecx
jmp 0x464be0
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464c02
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464c04
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette12
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x546f]
movzx eax, byte [ebx + 0x546e]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x546d]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464c58
xor ecx, ecx
jmp 0x464c5b
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464c7d
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464c7f
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette13
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5472]
movzx eax, byte [ebx + 0x5471]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5470]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464cd3
xor ecx, ecx
jmp 0x464cd6
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464cf8
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464cfa
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette14
push str.ScrapColor
call esi
movzx ecx, byte [ebx + 0x5475]
movzx eax, byte [ebx + 0x5474]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0x5473]
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x18]
push ecx
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
add esp, 0x10
cmp eax, 0xf
jge 0x464d4e
xor ecx, ecx
jmp 0x464d51
lea ecx, [eax - 0xf]
cmp ecx, eax
jge 0x464d73
sub eax, ecx
lea esi, [ebp - 0x18]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x464d75
xor eax, eax
xor ecx, ecx
push ebx
mov word [ebp + eax*2 - 0x38], cx
lea eax, [ebp - 0x38]
push eax
push str.Palette15
push str.ScrapColor
call esi
push ebx
push 0
push 0
push 0
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0056060a
mov esp, ebp
pop ebp
ret 4