Function at 0x100b3ac0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c7d6d
mov eax, dword fs:[0]
push eax
mov eax, 0x2334
call fcn.100462d0
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 [0x10293254]
call fcn.100a94a0
call fcn.10049910
cmp byte [edi + 0x87c], 0
je 0x100b3b27
push str.Cannot_save_with_Highlight_mode_on_
call fcn.1005d850
add esp, 4
jmp 0x100b4759
mov edx, 0x102b3568
mov ecx, str.Save_with_bloom_effect
call fcn.10056660
mov ecx, str.Bloom_effects_cannot_be_changed_until_a_new_round_is_started
call fcn.100a9550
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 0x100b3b84
xorps xmm1, xmm1
mov dword [ebp - 0x2338], 0
lea ecx, [ebp - 0x2338]
mov dword [ebp - 0x2334], 0
call fcn.10069fe0
push str.Palette_name:
call fcn.1005d9d0
movss xmm0, dword [0x102932e8]
add esp, 4
call fcn.1005f330
push 0
push 0x100b3a80
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x20
mov edx, 0x102b356c
mov dword [ebp - 0x2334], 0
mov ecx, str.palName
call fcn.10051150
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 0x100b3c0d
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b3c19
mov eax, dword [ecx + 0x160]
movss xmm0, dword [eax + edx*4 - 4]
push str.Creator__optional_:
movss dword [ecx + 0x144], xmm0
call fcn.1005d9d0
movss xmm0, dword [0x102932e8]
add esp, 4
call fcn.1005f330
push 0
push 0x100b3a80
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x20
mov edx, 0x102b3548
mov dword [ebp - 0x2334], 0
mov ecx, str.palcreator
call fcn.10051150
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 0x100b3caa
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b3cb6
mov eax, dword [ecx + 0x160]
movss xmm0, dword [eax + edx*4 - 4]
push str.Palette_description__optional_:
movss dword [ecx + 0x144], xmm0
call fcn.1005d9d0
movss xmm0, dword [0x102932e8]
add esp, 4
call fcn.1005f330
push 0
push 0x100b3a80
push 0x200
lea eax, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0
push eax
push 0x40
mov edx, 0x102b3508
mov dword [ebp - 0x2334], 0
mov ecx, str.palDesc
call fcn.10051150
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 0x100b3d47
movss xmm0, dword [ecx + 0x1e4]
jmp 0x100b3d53
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 0x100b3d99
xorps xmm1, xmm1
mov dword [ebp - 0x2338], 0
lea ecx, [ebp - 0x2338]
mov dword [ebp - 0x2334], 0
call fcn.10069fe0
push 0
lea edx, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0x42fa0000
mov ecx, str.Save_palette
mov dword [ebp - 0x2334], 0x41c80000
call fcn.1005c6e0
add esp, 4
mov bl, al
push 0x102b36d8
call fcn.1005d9d0
add esp, 4
test bl, bl
jne 0x100b3de1
cmp byte [0x102b37a9], bl
je 0x100b4759
push 0x20
push 0x100d7af2
push 0x102b356c
call fcn.1002d230
add esp, 0xc
test eax, eax
jne 0x100b3ec9
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.10007ee0
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 0x100b3ebf
test esi, esi
je 0x100b3e75
cmp edi, 0xc8
ja 0x100b3e75
push edi
push esi
push 0x102b36d8
call fcn.10022040
add esp, 0xc
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b4740
push 0xc8
push 0
push 0x102b36d8
call fcn.10021e70
add esp, 0xc
test esi, esi
jne 0x100b3ea7
call fcn.1002dce1
mov dword [eax], 0x16
call fcn.1002d454
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b4740
cmp edi, 0xc8
jbe 0x100b3ebf
call fcn.1002dce1
mov dword [eax], 0x22
call fcn.1002d454
push str._error__Could_not_save_custom_palette__no_filename_was_given_n
jmp 0x100b4740
push 0x20
push str.Default
push 0x102b356c
call fcn.1002d230
add esp, 0xc
test eax, eax
je 0x100b4685
push 0x20
push str.Random
push 0x102b356c
call fcn.1002d230
add esp, 0xc
test eax, eax
je 0x100b4685
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.1000dce0
sub esp, 8
mov ecx, eax
call fcn.1001c5e0
lea ecx, [ebp - 0x248]
mov esi, eax
call fcn.1000d010
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.1000dce0
push esi
push ecx
lea ecx, [ebp - 0x278]
mov dword [ebp - 4], 2
push ecx
mov ecx, eax
call fcn.1001c590
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 4
call fcn.1000d010
push 0x12
push 0x10248678
lea ecx, [ebp - 0x278]
call fcn.1000f1a0
mov edx, dword [edi + 0x6c]
lea ecx, [ebp - 0x2a8]
call fcn.1008d620
mov byte [ebp - 4], 5
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x100b3fa4
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x278]
call fcn.1000f1a0
lea ecx, [ebp - 0x2a8]
mov byte [ebp - 4], 4
call fcn.1000d010
push 1
push 0x10248674
lea ecx, [ebp - 0x278]
call fcn.1000f1a0
mov ecx, 0x102b356c
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 0x100b4001
sub ecx, edx
push ecx
push 0x102b356c
lea ecx, [ebp - 0x230]
call fcn.10007ee0
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.1000d0d0
mov byte [ebp - 0x2334], 0
lea ecx, [ebp - 0x260]
push dword [ebp - 0x2334]
push ebx
push edi
call fcn.1000d250
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.1000f1a0
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 0x100b4142
lea ebx, [eax + ecx*2]
mov ecx, eax
lea eax, [ebx - 8]
sub eax, ecx
sar eax, 1
je 0x100b4142
nop dword [eax]
cmp word [ecx], 0x2e
je 0x100b4110
add ecx, 2
sub eax, 1
jne 0x100b4100
jmp 0x100b4142
mov edx, 0x102486a0
mov edi, ecx
mov esi, 5
sub edi, edx
nop
mov ax, word [edi + edx]
cmp ax, word [edx]
jne 0x100b4598
add edx, 2
sub esi, 1
jne 0x100b4120
sub ecx, dword [ebp - 0x2334]
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x100b4164
push 0x102486a0
lea ecx, [ebp - 0x278]
call fcn.1000f430
push 5
push str..cfpl
lea ecx, [ebp - 0x230]
call fcn.1000ba50
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 0x100b41e1
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.1006c8d0
add esp, 4
cmp dword [edi + 0x181c], eax
jne 0x100b41d1
mov byte [edi + 0x1828], 1
xor dl, dl
mov ecx, eax
call fcn.10064ea0
mov byte [0x102b37a9], 1
push 0x40
mov ecx, str.Overwrite_
call fcn.10064880
add esp, 4
test al, al
je 0x100b4246
push esi
push str._s_already_exists._nAre_you_sure_you_want_to_overwrite_it__n_n
call fcn.1005d9d0
call fcn.10049910
push 0
lea edx, [ebp - 0x2338]
mov dword [ebp - 0x2338], 0x42f00000
mov ecx, 0x1023ed68
mov dword [ebp - 0x2334], 0
call fcn.1005c6e0
add esp, 0xc
test al, al
je 0x100b45a0
call fcn.10064c00
call fcn.1005fca0
mov byte [0x102b37a9], 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.10022040
add esp, 0xc
lea eax, [ebp - 0x2310]
push 0x20
push 0x102b3548
push eax
call fcn.100280f0
add esp, 0xc
lea eax, [ebp - 0x2330]
push 0x20
push 0x102b356c
push eax
call fcn.100280f0
add esp, 0xc
lea eax, [ebp - 0x22f0]
push 0x40
push 0x102b3508
push eax
call fcn.100280f0
mov al, byte [0x102b3568]
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 0x102486b4
mov byte [ebp - 0x290], 0
call fcn.10007ee0
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.1000b040
mov ebx, dword [ebp - 0x233c]
lea eax, [ebp - 0x2330]
push eax
push dword [ebx + 0x6c]
call fcn.100bcc50
test al, al
je 0x100b45f0
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.1001c610
mov byte [ebp - 4], 9
lea esi, [ebp - 0x2a8]
cmp dword [ebp - 0x294], 0x10
lea edx, [ebp - 0x230]
mov eax, dword [0x102b3490]
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.1000ba50
mov ecx, dword [0x102b3490]
push 0
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [0x102b3490]
mov esi, dword [0x102ab220]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [0x102b3490]
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.100bd120
mov ecx, dword [0x102b3490]
push 1
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [0x102ab220]
push 0x102b356c
push dword [ebx + 0x6c]
call fcn.100bcb00
mov dword [ebx + 0x70], eax
test eax, eax
jns 0x100b454a
mov eax, dword [0x102b3490]
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 [0x102ab220]
push eax
push dword [ebx + 0x68]
push dword [ebx + 0x6c]
call fcn.100bca30
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.100b57d0
lea edi, [ebx + 0x78]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x2a8]
call fcn.10007de0
jmp 0x100b462a
add ecx, 2
jmp 0x100b40f4
movss xmm1, dword [0x10293344]
xorps xmm0, xmm0
call fcn.100493c0
push 0
lea edx, [ebp - 0x2340]
mov dword [ebp - 0x2340], 0x42f00000
mov ecx, str.Cancel
mov dword [ebp - 0x233c], 0
call fcn.1005c6e0
add esp, 4
test al, al
je 0x100b45e9
call fcn.10064c00
mov byte [0x102b37a9], 0
call fcn.1005fca0
jmp 0x100b465f
cmp dword [ebp - 0x21c], 0x10
lea edx, [ebp - 0x230]
mov eax, dword [0x102b3490]
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.1000ba50
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 0x102b36d8
call fcn.10022040
add esp, 0xc
lea ecx, [ebp - 0x290]
call fcn.10007de0
lea ecx, [ebp - 0x260]
call fcn.1000d010
lea ecx, [ebp - 0x230]
call fcn.10007de0
lea ecx, [ebp - 0x278]
call fcn.1000d010
jmp 0x100b4759
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.10007ee0
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 0x100b473b
test esi, esi
je 0x100b46fe
cmp edi, 0xc8
ja 0x100b46fe
push edi
push esi
push 0x102b36d8
call fcn.10022040
add esp, 0xc
jmp 0x100b473b
push 0xc8
push 0
push 0x102b36d8
call fcn.10021e70
add esp, 0xc
test esi, esi
jne 0x100b4723
call fcn.1002dce1
mov dword [eax], 0x16
jmp 0x100b4736
cmp edi, 0xc8
jbe 0x100b473b
call fcn.1002dce1
mov dword [eax], 0x22
call fcn.1002d454
push str._error__Could_not_save_custom_palette:_not_a_valid_filename_n
mov eax, dword [0x102b3490]
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
lea ecx, [ebp - 0x248]
call fcn.10007de0
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.1001e883
mov esp, ebp
pop ebp
ret