Function at 0x100bdee0
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c8ef5
mov eax, dword fs:[0]
push eax
sub esp, 0x33c
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 eax, ecx
mov dword [ebp - 0x30c], eax
call fcn.100bb2f0
push 0x104
lea eax, [ebp - 0x248]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x18], 7
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100bdf50
sub ecx, edx
lea eax, [ebp - 0x248]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.1000e550
push dword [ebp - 0x2f4]
mov edi, dword [ebp - 0x18]
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp - 0x2c]
cmp edi, 8
mov edx, dword [ebp - 0x1c]
cmovae ecx, esi
push 1
sub esp, 8
call fcn.1001c4c0
add esp, 0x10
mov ebx, eax
cmp edi, 8
jb 0x100bdfca
lea ecx, [edi*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x100bdfc0
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100be739
push ecx
push esi
call fcn.1001ee69
add esp, 8
xor eax, eax
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
lea edx, [ecx + 2]
mov word [ebp - 0x2c], ax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100bdff0
sub ecx, edx
lea eax, [ebp - 0x248]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.1000e550
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x264]
xor eax, eax
mov dword [ebp - 0x264], 0
cmp dword [ebp - 0x1c], ebx
mov word [ebp - 0x264], ax
lea eax, [ebp - 0x2c]
cmovb ebx, dword [ebp - 0x1c]
cmp dword [ebp - 0x18], 8
push ebx
cmovae eax, dword [ebp - 0x2c]
push eax
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 7
call fcn.1000e550
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x100be09a
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100be090
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100be748
push edx
push ecx
call fcn.1001ee69
add esp, 8
push 0xd
push str.palettes.ini
lea ecx, [ebp - 0x264]
call fcn.1000f210
cmp dword [ebp - 0x250], 8
lea eax, [ebp - 0x264]
cmovae eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100be0e3
mov eax, dword [0x102a89bc]
push str._error__palettes.ini_file_was_not_found__n
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
jmp 0x100be6e1
call fcn.10019ce0
mov ecx, eax
test ecx, ecx
je 0x100be73e
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x24c], esi
mov byte [ebp - 4], 3
lea edi, [ebp - 0x264]
cmp dword [ebp - 0x250], 8
mov ecx, 1
mov eax, dword [esi - 8]
cmovae edi, dword [ebp - 0x264]
sub eax, 0x104
sub ecx, dword [esi - 4]
or eax, ecx
jge 0x100be142
push 0x104
lea ecx, [ebp - 0x24c]
call fcn.1001d1a0
mov esi, dword [ebp - 0x24c]
push edi
push 0x104
push esi
push 0x1024a0e0
push str.OnlinePalettes
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push dword [esi - 8]
push esi
call fcn.1002e75f
add esp, 8
test eax, eax
js 0x100be75d
cmp eax, dword [esi - 8]
jg 0x100be75d
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call fcn.1002f549
mov ecx, dword [ebp - 0x30c]
add esp, 4
test eax, eax
setne al
xor ebx, ebx
mov byte [ecx + 0x24], al
mov eax, dword [0x102ac0d8]
sub eax, dword [0x102ac0d4]
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x300], ebx
test eax, eax
jle 0x100be6c5
mov byte [ebp - 0x32c], bl
mov dword [ebp - 0x304], ebx
nop dword [eax + eax]
mov eax, 1
mov dword [ebp - 0x2fc], 0x18
mov dword [ebp - 0x310], eax
lea edi, [ebp - 0x12]
mov ecx, eax
test eax, eax
jns 0x100be220
neg ecx
mov eax, 0xcccccccd
sub edi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [edi], cx
mov ecx, edx
test ecx, ecx
jne 0x100be1f0
add edi, 0xfffffffe
mov eax, 0x2d
mov word [edi], ax
jmp 0x100be240
mov eax, 0xcccccccd
sub edi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [edi], cx
mov ecx, edx
test ecx, ecx
jne 0x100be220
xor eax, eax
mov dword [ebp - 0x344], 0
mov word [ebp - 0x344], ax
lea eax, [ebp - 0x12]
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 7
cmp edi, eax
je 0x100be27f
sub eax, edi
lea ecx, [ebp - 0x344]
sar eax, 1
push eax
push edi
call fcn.1000e550
mov ecx, ebx
mov byte [ebp - 4], 4
call fcn.1008e4c0
mov edi, eax
mov eax, dword [edi + 0x14]
mov ebx, dword [edi + 0x10]
cmp eax, 0x10
jb 0x100be29b
add ebx, dword [edi]
jmp 0x100be2a2
add ebx, edi
cmp eax, 0x10
jb 0x100be2a4
mov edi, dword [edi]
xor eax, eax
mov dword [ebp - 0x328], 0
mov word [ebp - 0x328], ax
lea ecx, [ebp - 0x328]
mov eax, ebx
mov dword [ebp - 0x318], 0
sub eax, edi
mov dword [ebp - 0x314], 7
push eax
call fcn.1000d1c0
push dword [ebp - 0x32c]
lea ecx, [ebp - 0x328]
push ebx
push edi
call fcn.1000d340
mov byte [ebp - 4], 5
lea edi, [ebp - 0x264]
cmp dword [ebp - 0x250], 8
mov ecx, 1
mov eax, dword [esi - 8]
cmovae edi, dword [ebp - 0x264]
sub eax, 0x104
sub ecx, dword [esi - 4]
or eax, ecx
jge 0x100be330
push 0x104
lea ecx, [ebp - 0x24c]
call fcn.1001d1a0
mov esi, dword [ebp - 0x24c]
cmp dword [ebp - 0x330], 8
lea ecx, [ebp - 0x344]
push edi
cmovae ecx, dword [ebp - 0x344]
lea eax, [ebp - 0x328]
cmp dword [ebp - 0x314], 8
push 0x104
cmovae eax, dword [ebp - 0x328]
push esi
push 0x1024a21c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x314]
cmp edx, 8
jb 0x100be3b0
mov ecx, dword [ebp - 0x328]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100be3a6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100be739
push edx
push ecx
call fcn.1001ee69
add esp, 8
xor eax, eax
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x330]
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x314], 7
mov word [ebp - 0x328], ax
cmp edx, 8
jb 0x100be411
mov ecx, dword [ebp - 0x344]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100be407
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100be739
push edx
push ecx
call fcn.1001ee69
add esp, 8
push dword [esi - 8]
push esi
call fcn.1002e75f
add esp, 8
test eax, eax
js 0x100be75d
cmp eax, dword [esi - 8]
jg 0x100be75d
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov ebx, dword [esi - 0xc]
mov dword [ebp - 0x2f4], ebx
test ebx, ebx
js 0x100be75d
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x100be46b
push ebx
lea ecx, [ebp - 0x24c]
call fcn.1001d1a0
mov esi, dword [ebp - 0x24c]
mov edx, esi
mov eax, edx
lea ecx, [edx + ebx*2]
mov dword [ebp - 0x2f8], ecx
cmp edx, ecx
jae 0x100be4c6
mov ebx, ecx
nop
cmp word [edx], 0x22
lea ecx, [edx + 2]
mov dword [ebp - 0x308], ecx
je 0x100be4ba
lea ebx, [eax + 2]
xor edi, edi
cmp eax, ebx
je 0x100be4b4
cmp edi, 1
jae 0x100be4ae
mov cx, word [edx]
inc edi
mov word [eax], cx
add edx, 2
add eax, 2
cmp eax, ebx
jne 0x100be498
mov ecx, dword [ebp - 0x308]
mov ebx, dword [ebp - 0x2f8]
mov edx, ecx
cmp ecx, ebx
jb 0x100be480
mov ebx, dword [ebp - 0x2f4]
sub edx, eax
xor ecx, ecx
sar edx, 1
sub ebx, edx
mov word [eax], cx
js 0x100be75d
cmp ebx, dword [esi - 8]
jg 0x100be75d
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
cmp dword [esi - 0xc], eax
jl 0x100be5e5
push 0x10249810
push esi
call fcn.100219be
mov edi, eax
add esp, 8
test edi, edi
je 0x100be5e5
sub edi, esi
sar edi, 1
js 0x100be5e5
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100be520
mov ebx, dword [esi - 0xc]
sub ecx, edx
xor edx, edx
mov eax, 0x7fffffff
sar ecx, 1
cmovns edx, ecx
sub eax, edx
cmp eax, edi
jl 0x100be767
lea eax, [edx + edi]
mov ecx, ebx
sub ecx, edi
cmp eax, ebx
cmovg edx, ecx
mov dword [ebp - 0x2f4], edx
test edx, edx
jle 0x100be5e5
sub ecx, edx
sub ebx, edx
cmp dword [esi - 4], 1
mov dword [ebp - 0x308], ecx
jle 0x100be590
push dword [esi - 0xc]
lea ecx, [ebp - 0x24c]
call fcn.1001d240
mov esi, dword [ebp - 0x24c]
mov edx, dword [ebp - 0x2f4]
mov ecx, dword [ebp - 0x308]
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x2f4], eax
lea ecx, [esi + edi*2]
lea eax, [edx + edi]
mov edx, dword [ebp - 0x2f4]
lea eax, [esi + eax*2]
test edx, edx
je 0x100be5cb
test ecx, ecx
je 0x100be74d
test eax, eax
je 0x100be74d
push edx
push eax
push ecx
call fcn.10022000
add esp, 0xc
test ebx, ebx
js 0x100be75d
cmp ebx, dword [esi - 8]
jg 0x100be75d
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
push 0x84
lea eax, [ebp - 0x2f0]
push 0
push eax
call fcn.10021e30
add esp, 0xc
lea eax, [ebp - 0x2ec]
lea ecx, [ebp - 0x2f0]
mov dword [ebp - 0x2f0], eax
push 3
push esi
call fcn.1001d030
mov eax, dword [ebp - 0x30c]
mov ecx, dword [ebp - 0x2fc]
mov byte [ebp - 4], 6
add ecx, 0xffffffe8
mov edi, dword [ebp - 0x2f0]
mov edx, edi
mov eax, dword [eax + 0xc]
add eax, dword [ebp - 0x304]
lea ebx, [edx + 1]
mov eax, dword [eax]
add ecx, eax
mov al, byte [edx]
inc edx
test al, al
jne 0x100be640
sub edx, ebx
push edx
push edi
call fcn.10007eb0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2ec]
mov eax, dword [ebp - 0x2f0]
cmp eax, ecx
je 0x100be66d
push eax
call fcn.100285e5
add esp, 4
mov ecx, dword [ebp - 0x2fc]
mov eax, dword [ebp - 0x310]
add ecx, 0x18
mov ebx, dword [ebp - 0x300]
inc eax
mov dword [ebp - 0x310], eax
mov dword [ebp - 0x2fc], ecx
cmp ecx, 0x240
jle 0x100be1e5
mov eax, dword [0x102ac0d8]
inc ebx
sub eax, dword [0x102ac0d4]
add dword [ebp - 0x304], 0xc
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x300], ebx
cmp ebx, eax
jl 0x100be1d0
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100be6e1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x250]
cmp edx, 8
jb 0x100be71d
mov ecx, dword [ebp - 0x264]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100be713
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100be748
push edx
push ecx
call fcn.1001ee69
add esp, 8
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
call fcn.1002d424
push 0x80004005
call fcn.10019bb0
call fcn.1002d424
call fcn.1002dca1
mov dword [eax], 0x16
call fcn.1002d414
push 0x80070057
call fcn.10019bb0
push 0x80070216
call fcn.10019bb0
int3