Function at 0x100b4130
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c892d
mov eax, dword fs:[0]
push eax
mov eax, 0x2334
call fcn.10046330
mov eax, dword [0x102a100c]
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 [0x10294474]
call fcn.100a8d70
call fcn.100499a0
cmp byte [edi + 0x87c], 0
je 0x100b4197
push str.Cannot_save_with_Highlight_mode_on_
call fcn.1005d8e0
add esp, 4
jmp 0x100b4dc9
mov edx, 0x102b4530
mov ecx, str.Save_with_bloom_effect
call fcn.100566f0
mov ecx, str.Bloom_effects_cannot_be_changed_until_a_new_round_is_started
call fcn.100a8e20
mov ecx, dword [0x102a1b70]
mov eax, dword [ecx + 0x17fc]
mov byte [eax + 0x8e], 1
mov eax, dword [ecx + 0x17fc]
cmp byte [eax + 0x90], 0
jne 0x100b41f4
xorps xmm1, xmm1
mov dword [ebp - 0x2338], 0
lea ecx, [ebp - 0x2338]
mov dword [ebp - 0x2334], 0
call fcn.1006a070
push str.Palette_name:
call fcn.1005da60
movss xmm0, dword [0x10294508]
add esp, 4
call fcn.1005f3c0
push 0
push 0x100b40f0
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x20
mov edx, 0x102b4534
mov dword [ebp - 0x2334], 0
mov ecx, str.palName
call fcn.100511e0
mov ecx, dword [0x102a1b70]
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 0x100b427d
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b4289
mov eax, dword [ecx + 0x160]
movss xmm0, dword [eax + edx*4 - 4]
push str.Creator__optional_:
movss dword [ecx + 0x144], xmm0
call fcn.1005da60
movss xmm0, dword [0x10294508]
add esp, 4
call fcn.1005f3c0
push 0
push 0x100b40f0
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x20
mov edx, 0x102b4510
mov dword [ebp - 0x2334], 0
mov ecx, str.palcreator
call fcn.100511e0
mov ecx, dword [0x102a1b70]
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 0x100b431a
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b4326
mov eax, dword [ecx + 0x160]
movss xmm0, dword [eax + edx*4 - 4]
push str.Palette_description__optional_:
movss dword [ecx + 0x144], xmm0
call fcn.1005da60
movss xmm0, dword [0x10294508]
add esp, 4
call fcn.1005f3c0
push 0
push 0x100b40f0
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x40
mov edx, 0x102b44d0
mov dword [ebp - 0x2334], 0
mov ecx, str.palDesc
call fcn.100511e0
mov edx, dword [0x102a1b70]
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 0x100b43b7
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b43c3
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 0x100b4409
xorps xmm1, xmm1
mov dword [ebp - 0x2338], 0
lea ecx, [ebp - 0x2338]
mov dword [ebp - 0x2334], 0
call fcn.1006a070
push 0
lea edx, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0x42fa0000
mov ecx, str.Save_palette
mov dword [ebp - 0x2334], 0x41c80000
call fcn.1005c770
add esp, 4
mov bl, al
push 0x102b46d0
call fcn.1005da60
add esp, 4
test bl, bl
jne 0x100b4451
cmp byte [0x102b47a1], bl
je 0x100b4dc9
push 0x20
push 0x100d8b12
push 0x102b4534
call fcn.1002d1f0
add esp, 0xc
test eax, eax
jne 0x100b4539
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 0x100b452f
test esi, esi
je 0x100b44e5
cmp edi, 0xc8
ja 0x100b44e5
push edi
push esi
push 0x102b46d0
call fcn.10022000
add esp, 0xc
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b4db0
push 0xc8
push 0
push 0x102b46d0
call fcn.10021e30
add esp, 0xc
test esi, esi
jne 0x100b4517
call fcn.1002dca1
mov dword [eax], 0x16
call fcn.1002d414
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b4db0
cmp edi, 0xc8
jbe 0x100b452f
call fcn.1002dca1
mov dword [eax], 0x22
call fcn.1002d414
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b4db0
push 0x20
push str.Default
push 0x102b4534
call fcn.1002d1f0
add esp, 0xc
test eax, eax
je 0x100b4cf5
push 0x20
push str.Random
push 0x102b4534
call fcn.1002d1f0
add esp, 0xc
test eax, eax
je 0x100b4cf5
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.1001bee0
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.1001be90
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 4
call fcn.1000d100
push 0x12
push 0x102497e8
lea ecx, [ebp - 0x278]
call fcn.1000f210
mov edx, dword [edi + 0x6c]
lea ecx, [ebp - 0x2a8]
call fcn.1008e430
mov byte [ebp - 4], 5
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x100b4614
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 0x102497e4
lea ecx, [ebp - 0x278]
call fcn.1000f210
mov ecx, 0x102b4534
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 0x100b4671
sub ecx, edx
push ecx
push 0x102b4534
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 0x100b47b2
lea ebx, [eax + ecx*2]
mov ecx, eax
lea eax, [ebx - 8]
sub eax, ecx
sar eax, 1
je 0x100b47b2
nop dword [eax]
cmp word [ecx], 0x2e
je 0x100b4780
add ecx, 2
sub eax, 1
jne 0x100b4770
jmp 0x100b47b2
mov edx, 0x10249810
mov edi, ecx
mov esi, 5
sub edi, edx
nop
mov ax, word [edi + edx]
cmp ax, word [edx]
jne 0x100b4c08
add edx, 2
sub esi, 1
jne 0x100b4790
sub ecx, dword [ebp - 0x2334]
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x100b47d4
push 0x10249810
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 0x100b4851
mov edi, dword [0x102a1b70]
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.1006c960
add esp, 4
cmp dword [edi + 0x181c], eax
jne 0x100b4841
mov byte [edi + 0x1828], 1
xor dl, dl
mov ecx, eax
call fcn.10064f30
mov byte [0x102b47a1], 1
push 0x40
mov ecx, str.Overwrite_
call fcn.10064910
add esp, 4
test al, al
je 0x100b48b6
push esi
push str._s_already_exists._nAre_you_sure_you_want_to_overwrite_it__n_n
call fcn.1005da60
call fcn.100499a0
push 0
lea edx, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0x42f00000
mov ecx, 0x1023fd88
mov dword [ebp - 0x2334], 0
call fcn.1005c770
add esp, 0xc
test al, al
je 0x100b4c10
call fcn.10064c90
call fcn.1005fd30
mov byte [0x102b47a1], 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.10022000
add esp, 0xc
lea eax, [ebp - 0x2310]
push 0x20
push 0x102b4510
push eax
call fcn.100280b0
add esp, 0xc
lea eax, [ebp - 0x2330]
push 0x20
push 0x102b4534
push eax
call fcn.100280b0
add esp, 0xc
lea eax, [ebp - 0x22f0]
push 0x40
push 0x102b44d0
push eax
call fcn.100280b0
mov al, byte [0x102b4530]
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 0x10249824
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.100bd770
test al, al
je 0x100b4c60
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.1001bf10
mov byte [ebp - 4], 9
lea esi, [ebp - 0x2a8]
cmp dword [ebp - 0x294], 0x10
lea edx, [ebp - 0x230]
mov eax, dword [0x102a89bc]
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 [0x102a89bc]
push 0
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [0x102a89bc]
mov esi, dword [0x102ac1f8]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [0x102a89bc]
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.100bdc40
mov ecx, dword [0x102a89bc]
push 1
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [0x102ac1f8]
push 0x102b4534
push dword [ebx + 0x6c]
call fcn.100bd620
mov dword [ebx + 0x70], eax
test eax, eax
jns 0x100b4bba
mov eax, dword [0x102a89bc]
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 [0x102ac1f8]
push eax
push dword [ebx + 0x68]
push dword [ebx + 0x6c]
call fcn.100bd550
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.100b5e40
lea edi, [ebx + 0x78]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x2a8]
call fcn.10007c80
jmp 0x100b4c9a
add ecx, 2
jmp 0x100b4764
movss xmm1, dword [0x10294564]
xorps xmm0, xmm0
call fcn.10049450
push 0
lea edx, [ebp - 0x2340]
mov dword [ebp - 0x2340], 0x42f00000
mov ecx, str.Cancel
mov dword [ebp - 0x233c], 0
call fcn.1005c770
add esp, 4
test al, al
je 0x100b4c59
call fcn.10064c90
mov byte [0x102b47a1], 0
call fcn.1005fd30
jmp 0x100b4ccf
cmp dword [ebp - 0x21c], 0x10
lea edx, [ebp - 0x230]
mov eax, dword [0x102a89bc]
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 0x102b46d0
call fcn.10022000
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 0x100b4dc9
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 0x100b4dab
test esi, esi
je 0x100b4d6e
cmp edi, 0xc8
ja 0x100b4d6e
push edi
push esi
push 0x102b46d0
call fcn.10022000
add esp, 0xc
jmp 0x100b4dab
push 0xc8
push 0
push 0x102b46d0
call fcn.10021e30
add esp, 0xc
test esi, esi
jne 0x100b4d93
call fcn.1002dca1
mov dword [eax], 0x16
jmp 0x100b4da6
cmp edi, 0xc8
jbe 0x100b4dab
call fcn.1002dca1
mov dword [eax], 0x22
call fcn.1002d414
push str._error__Could_not_save_custom_palette:_not_a_valid_filename_n
mov eax, dword [0x102a89bc]
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.1001e823
mov esp, ebp
pop ebp
ret