Function at 0x100b48a0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c8fed
mov eax, dword fs:[0]
push eax
mov eax, 0x2334
call fcn.10046830
mov eax, dword [0x102a000c]
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 edi, ecx
mov dword [ebp - 0x233c], edi
movss xmm0, dword [0x10293e74]
call fcn.100aa290
call fcn.10049e80
cmp byte [edi + 0x87c], 0
je 0x100b4907
push str.Cannot_save_with_Highlight_mode_on_
call fcn.1005ddc0
add esp, 4
jmp 0x100b5539
mov edx, 0x102b3598
mov ecx, str.Save_with_bloom_effect
call fcn.10056bd0
mov ecx, str.Bloom_effects_cannot_be_changed_until_a_new_round_is_started
call fcn.100aa340
mov ecx, dword [0x102a0b70]
mov eax, dword [ecx + 0x17fc]
mov byte [eax + 0x8e], 1
mov eax, dword [ecx + 0x17fc]
cmp byte [eax + 0x90], 0
jne 0x100b4964
xorps xmm1, xmm1
mov dword [ebp - 0x2338], 0
lea ecx, [ebp - 0x2338]
mov dword [ebp - 0x2334], 0
call fcn.1006a550
push str.Palette_name:
call fcn.1005df40
movss xmm0, dword [0x10293f08]
add esp, 4
call fcn.1005f8a0
push 0
push 0x100b4860
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x20
mov edx, 0x102b359c
mov dword [ebp - 0x2334], 0
mov ecx, str.palName
call fcn.100516c0
mov ecx, dword [0x102a0b70]
add esp, 0x14
mov eax, dword [ecx + 0x17fc]
mov byte [eax + 0x8e], 1
mov ecx, dword [ecx + 0x17fc]
mov edx, dword [ecx + 0x158]
sub edx, 1
mov dword [ecx + 0x158], edx
jne 0x100b49ed
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b49f9
mov eax, dword [ecx + 0x160]
movss xmm0, dword [eax + edx*4 - 4]
push str.Creator__optional_:
movss dword [ecx + 0x144], xmm0
call fcn.1005df40
movss xmm0, dword [0x10293f08]
add esp, 4
call fcn.1005f8a0
push 0
push 0x100b4860
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x20
mov edx, 0x102b3578
mov dword [ebp - 0x2334], 0
mov ecx, str.palcreator
call fcn.100516c0
mov ecx, dword [0x102a0b70]
add esp, 0x14
mov eax, dword [ecx + 0x17fc]
mov byte [eax + 0x8e], 1
mov ecx, dword [ecx + 0x17fc]
mov edx, dword [ecx + 0x158]
sub edx, 1
mov dword [ecx + 0x158], edx
jne 0x100b4a8a
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b4a96
mov eax, dword [ecx + 0x160]
movss xmm0, dword [eax + edx*4 - 4]
push str.Palette_description__optional_:
movss dword [ecx + 0x144], xmm0
call fcn.1005df40
movss xmm0, dword [0x10293f08]
add esp, 4
call fcn.1005f8a0
push 0
push 0x100b4860
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x40
mov edx, 0x102b3538
mov dword [ebp - 0x2334], 0
mov ecx, str.palDesc
call fcn.100516c0
mov edx, dword [0x102a0b70]
add esp, 0x14
mov eax, dword [edx + 0x17fc]
mov byte [eax + 0x8e], 1
mov ecx, dword [edx + 0x17fc]
mov esi, dword [ecx + 0x158]
sub esi, 1
mov dword [ecx + 0x158], esi
jne 0x100b4b27
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b4b33
mov eax, dword [ecx + 0x160]
movss xmm0, dword [eax + esi*4 - 4]
movss dword [ecx + 0x144], xmm0
mov eax, dword [edx + 0x17fc]
mov byte [eax + 0x8e], 1
mov eax, dword [edx + 0x17fc]
cmp byte [eax + 0x90], 0
jne 0x100b4b79
xorps xmm1, xmm1
mov dword [ebp - 0x2338], 0
lea ecx, [ebp - 0x2338]
mov dword [ebp - 0x2334], 0
call fcn.1006a550
push 0
lea edx, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0x42fa0000
mov ecx, str.Save_palette
mov dword [ebp - 0x2334], 0x41c80000
call fcn.1005cc50
add esp, 4
mov bl, al
push 0x102b3728
call fcn.1005df40
add esp, 4
test bl, bl
jne 0x100b4bc1
cmp byte [0x102b37f9], bl
je 0x100b5539
push 0x20
push 0x100d8b12
push 0x102b359c
call fcn.1002d6f0
add esp, 0xc
test eax, eax
jne 0x100b4ca9
push 0x18
mov dword [ebp - 0x248], eax
lea ecx, [ebp - 0x248]
push str.Error__no_filename_given
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], al
call fcn.10007eb0
mov dword [ebp - 4], 0
lea esi, [ebp - 0x248]
cmp dword [ebp - 0x234], 0x10
mov edi, dword [ebp - 0x238]
cmovae esi, dword [ebp - 0x248]
test edi, edi
je 0x100b4c9f
test esi, esi
je 0x100b4c55
cmp edi, 0xc8
ja 0x100b4c55
push edi
push esi
push 0x102b3728
call fcn.10022500
add esp, 0xc
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b5520
push 0xc8
push 0
push 0x102b3728
call fcn.10022330
add esp, 0xc
test esi, esi
jne 0x100b4c87
call fcn.1002e1a1
mov dword [eax], 0x16
call fcn.1002d914
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b5520
cmp edi, 0xc8
jbe 0x100b4c9f
call fcn.1002e1a1
mov dword [eax], 0x22
call fcn.1002d914
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b5520
push 0x20
push str.Default
push 0x102b359c
call fcn.1002d6f0
add esp, 0xc
test eax, eax
je 0x100b5465
push 0x20
push str.Random
push 0x102b359c
call fcn.1002d6f0
add esp, 0xc
test eax, eax
je 0x100b5465
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.1000ddd0
sub esp, 8
mov ecx, eax
call fcn.1001c4d0
lea ecx, [ebp - 0x248]
mov esi, eax
call fcn.1000d100
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.1000ddd0
push esi
push ecx
lea ecx, [ebp - 0x278]
mov dword [ebp - 4], 2
push ecx
mov ecx, eax
call fcn.1001c480
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 4
call fcn.1000d100
push 0x12
push 0x10249278
lea ecx, [ebp - 0x278]
call fcn.1000f210
mov edx, dword [edi + 0x6c]
lea ecx, [ebp - 0x2a8]
call fcn.1008e540
mov byte [ebp - 4], 5
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x100b4d84
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x278]
call fcn.1000f210
lea ecx, [ebp - 0x2a8]
mov byte [ebp - 4], 4
call fcn.1000d100
push 1
push 0x10249274
lea ecx, [ebp - 0x278]
call fcn.1000f210
mov ecx, 0x102b359c
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100b4de1
sub ecx, edx
push ecx
push 0x102b359c
lea ecx, [ebp - 0x230]
call fcn.10007eb0
mov byte [ebp - 4], 6
lea edx, [ebp - 0x230]
cmp dword [ebp - 0x21c], 0x10
lea edi, [ebp - 0x230]
mov ebx, dword [ebp - 0x220]
lea ecx, [ebp - 0x260]
cmovae edx, dword [ebp - 0x230]
add ebx, edx
mov dword [ebp - 0x260], 0
cmp dword [ebp - 0x21c], 0x10
mov dword [ebp - 0x250], 0
cmovae edi, dword [ebp - 0x230]
xor eax, eax
mov word [ebp - 0x260], ax
mov eax, ebx
sub eax, edi
mov dword [ebp - 0x24c], 7
push eax
call fcn.1000d1c0
mov byte [ebp - 0x2334], 0
lea ecx, [ebp - 0x260]
push dword [ebp - 0x2334]
push ebx
push edi
call fcn.1000d340
mov byte [ebp - 4], 7
lea eax, [ebp - 0x260]
cmp dword [ebp - 0x24c], 8
lea ecx, [ebp - 0x278]
push dword [ebp - 0x250]
cmovae eax, dword [ebp - 0x260]
push eax
call fcn.1000f210
cmp dword [ebp - 0x24c], 8
lea eax, [ebp - 0x260]
mov ecx, dword [ebp - 0x250]
cmovae eax, dword [ebp - 0x260]
mov dword [ebp - 0x2334], eax
cmp ecx, 5
jb 0x100b4f22
lea ebx, [eax + ecx*2]
mov ecx, eax
lea eax, [ebx - 8]
sub eax, ecx
sar eax, 1
je 0x100b4f22
nop dword [eax]
cmp word [ecx], 0x2e
je 0x100b4ef0
add ecx, 2
sub eax, 1
jne 0x100b4ee0
jmp 0x100b4f22
mov edx, 0x102492a0
mov edi, ecx
mov esi, 5
sub edi, edx
nop
mov ax, word [edi + edx]
cmp ax, word [edx]
jne 0x100b5378
add edx, 2
sub esi, 1
jne 0x100b4f00
sub ecx, dword [ebp - 0x2334]
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x100b4f44
push 0x102492a0
lea ecx, [ebp - 0x278]
call fcn.1000f4a0
push 5
push str..cfpl
lea ecx, [ebp - 0x230]
call fcn.1000bc50
cmp dword [ebp - 0x21c], 0x10
lea esi, [ebp - 0x230]
lea eax, [ebp - 0x278]
cmovae esi, dword [ebp - 0x230]
cmp dword [ebp - 0x264], 8
cmovae eax, dword [ebp - 0x278]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100b4fc1
mov edi, dword [0x102a0b70]
xor edx, edx
mov eax, dword [edi + 0x17fc]
mov ecx, dword [eax + 0x1a4]
mov eax, dword [eax + 0x1ac]
push dword [eax + ecx*4 - 4]
mov ecx, str.Overwrite_
call fcn.1006ce40
add esp, 4
cmp dword [edi + 0x181c], eax
jne 0x100b4fb1
mov byte [edi + 0x1828], 1
xor dl, dl
mov ecx, eax
call fcn.10065410
mov byte [0x102b37f9], 1
push 0x40
mov ecx, str.Overwrite_
call fcn.10064df0
add esp, 4
test al, al
je 0x100b5026
push esi
push str._s_already_exists._nAre_you_sure_you_want_to_overwrite_it__n_n
call fcn.1005df40
call fcn.10049e80
push 0
lea edx, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0x42f00000
mov ecx, 0x1023fd88
mov dword [ebp - 0x2334], 0
call fcn.1005cc50
add esp, 0xc
test al, al
je 0x100b5380
call fcn.10065170
call fcn.10060210
mov byte [0x102b37f9], 0
mov edi, dword [ebp - 0x233c]
push 0x2081
mov edi, dword [edi + 0x68]
mov dword [ebp - 0x2334], edi
mov ebx, dword [edi + 8]
mov edx, dword [edi + 0x4110]
mov ecx, edx
shl ecx, 5
add edi, 0x210e
mov eax, dword [ebx + 4]
mov esi, dword [ecx + eax]
mov ecx, 0x100
add esi, 0x1c
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 4]
mov ecx, edx
mov edi, dword [ebp - 0x2334]
shl ecx, 5
add edi, 0x250e
mov esi, dword [eax + ecx + 4]
mov ecx, 0x100
add esi, 0x1c
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 4]
mov ecx, edx
mov edi, dword [ebp - 0x2334]
shl ecx, 5
add edi, 0x290e
mov esi, dword [eax + ecx + 8]
mov ecx, 0x100
add esi, 0x1c
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 4]
mov ecx, edx
mov edi, dword [ebp - 0x2334]
shl ecx, 5
add edi, 0x2d0e
mov esi, dword [eax + ecx + 0xc]
mov ecx, 0x100
add esi, 0x1c
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 4]
mov ecx, edx
mov edi, dword [ebp - 0x2334]
shl ecx, 5
add edi, 0x310e
mov esi, dword [eax + ecx + 0x10]
mov ecx, 0x100
add esi, 0x1c
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 4]
mov ecx, edx
mov edi, dword [ebp - 0x2334]
shl ecx, 5
add edi, 0x350e
mov esi, dword [eax + ecx + 0x14]
mov ecx, 0x100
add esi, 0x1c
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 4]
mov ecx, edx
shl ecx, 5
shl edx, 5
mov esi, dword [eax + ecx + 0x18]
mov ecx, 0x100
mov eax, dword [ebp - 0x2334]
add esi, 0x1c
lea edi, [eax + 0x390e]
rep movsd dword es:[edi], dword [esi]
lea edi, [eax + 0x3d0e]
mov ecx, 0x100
mov eax, dword [ebx + 4]
mov esi, dword [edx + eax + 0x1c]
mov eax, dword [ebp - 0x2334]
add esi, 0x1c
add eax, 0x208d
push eax
lea eax, [ebp - 0x2330]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.10022500
add esp, 0xc
lea eax, [ebp - 0x2310]
push 0x20
push 0x102b3578
push eax
call fcn.100285b0
add esp, 0xc
lea eax, [ebp - 0x2330]
push 0x20
push 0x102b359c
push eax
call fcn.100285b0
add esp, 0xc
lea eax, [ebp - 0x22f0]
push 0x40
push 0x102b3538
push eax
call fcn.100285b0
mov al, byte [0x102b3598]
lea ecx, [ebp - 0x290]
add esp, 0xc
mov dword [ebp - 0x290], 0
mov byte [ebp - 0x22b0], al
mov dword [ebp - 0x280], 0
mov dword [ebp - 0x27c], 0xf
push 1
push 0x102492b4
mov byte [ebp - 0x290], 0
call fcn.10007eb0
mov byte [ebp - 4], 8
lea eax, [ebp - 0x230]
cmp dword [ebp - 0x21c], 0x10
lea ecx, [ebp - 0x290]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.1000b260
mov ebx, dword [ebp - 0x233c]
lea eax, [ebp - 0x2330]
push eax
push dword [ebx + 0x6c]
call fcn.100bde00
test al, al
je 0x100b53d0
cmp dword [ebp - 0x264], 8
lea ecx, [ebp - 0x278]
mov eax, dword [ebp - 0x268]
cmovae ecx, dword [ebp - 0x278]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x278]
cmovae ecx, dword [ebp - 0x278]
push ecx
push eax
push ecx
lea ecx, [ebp - 0x2a8]
call fcn.1001c500
mov byte [ebp - 4], 9
lea esi, [ebp - 0x2a8]
cmp dword [ebp - 0x294], 0x10
lea edx, [ebp - 0x230]
mov eax, dword [0x102b34c0]
cmovae esi, dword [ebp - 0x2a8]
cmp dword [ebp - 0x21c], 0x10
push esi
cmovae edx, dword [ebp - 0x230]
mov ecx, dword [eax]
push edx
push str._system__Custom_palette__s_successfully_saved_to:_n_s_n
push eax
call dword [ecx + 4]
add esp, 0x10
lea ecx, [ebp - 0x290]
push 0x14
push str._saved_successfully
call fcn.1000bc50
mov ecx, dword [0x102b34c0]
push 0
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [0x102b34c0]
mov esi, dword [0x102ab250]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [0x102b34c0]
push str._system__Reloading_custom_palettes..._n
push eax
mov edx, dword [eax]
call dword [edx + 4]
add esp, 8
mov ecx, esi
call fcn.100be2d0
mov ecx, dword [0x102b34c0]
push 1
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [0x102ab250]
push 0x102b359c
push dword [ebx + 0x6c]
call fcn.100bdcb0
mov dword [ebx + 0x70], eax
test eax, eax
jns 0x100b532a
mov eax, dword [0x102b34c0]
push str._error__Saved_custom_palette_couldnt_be_reloaded._Not_found._n
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
mov dword [ebx + 0x70], 0
xor eax, eax
mov ecx, dword [0x102ab250]
push eax
push dword [ebx + 0x68]
push dword [ebx + 0x6c]
call fcn.100bdbe0
mov esi, dword [ebx + 0x68]
mov ecx, ebx
mov eax, dword [ebx + 0x74]
mov edx, dword [esi + 0x4110]
lea edx, [eax + edx*8]
mov eax, dword [esi + 8]
mov eax, dword [eax + 4]
mov esi, dword [eax + edx*4]
add esi, 0x1c
call fcn.100b65b0
lea edi, [ebx + 0x78]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x2a8]
call fcn.10007c80
jmp 0x100b540a
add ecx, 2
jmp 0x100b4ed4
movss xmm1, dword [0x10293f64]
xorps xmm0, xmm0
call fcn.10049930
push 0
lea edx, [ebp - 0x2340]
mov dword [ebp - 0x2340], 0x42f00000
mov ecx, str.Cancel
mov dword [ebp - 0x233c], 0
call fcn.1005cc50
add esp, 4
test al, al
je 0x100b53c9
call fcn.10065170
mov byte [0x102b37f9], 0
call fcn.10060210
jmp 0x100b543f
cmp dword [ebp - 0x21c], 0x10
lea edx, [ebp - 0x230]
mov eax, dword [0x102b34c0]
cmovae edx, dword [ebp - 0x230]
push edx
push str._error__Custom_palette__s_failed_to_be_saved._n
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
add esp, 0xc
lea ecx, [ebp - 0x290]
push 0xd
push str._save_failed
call fcn.1000bc50
cmp dword [ebp - 0x27c], 0x10
lea ecx, [ebp - 0x290]
mov eax, dword [ebp - 0x280]
cmovae ecx, dword [ebp - 0x290]
inc eax
push eax
push ecx
push 0x102b3728
call fcn.10022500
add esp, 0xc
lea ecx, [ebp - 0x290]
call fcn.10007c80
lea ecx, [ebp - 0x260]
call fcn.1000d100
lea ecx, [ebp - 0x230]
call fcn.10007c80
lea ecx, [ebp - 0x278]
call fcn.1000d100
jmp 0x100b5539
push 0x1b
mov dword [ebp - 0x248], 0
lea ecx, [ebp - 0x248]
push str.Error__not_a_valid_filename
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], 0
call fcn.10007eb0
mov dword [ebp - 4], 1
lea esi, [ebp - 0x248]
cmp dword [ebp - 0x234], 0x10
mov edi, dword [ebp - 0x238]
cmovae esi, dword [ebp - 0x248]
test edi, edi
je 0x100b551b
test esi, esi
je 0x100b54de
cmp edi, 0xc8
ja 0x100b54de
push edi
push esi
push 0x102b3728
call fcn.10022500
add esp, 0xc
jmp 0x100b551b
push 0xc8
push 0
push 0x102b3728
call fcn.10022330
add esp, 0xc
test esi, esi
jne 0x100b5503
call fcn.1002e1a1
mov dword [eax], 0x16
jmp 0x100b5516
cmp edi, 0xc8
jbe 0x100b551b
call fcn.1002e1a1
mov dword [eax], 0x22
call fcn.1002d914
push str._error__Could_not_save_custom_palette:_not_a_valid_filename_n
mov eax, dword [0x102b34c0]
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
lea ecx, [ebp - 0x248]
call fcn.10007c80
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.1001ed23
mov esp, ebp
pop ebp
ret