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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c95b5
mov eax, dword fs:[0]
push eax
sub esp, 0x33c
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 eax, ecx
mov dword [ebp - 0x30c], eax
call fcn.100bb980
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 0x100be5e0
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.1001cab0
add esp, 0x10
mov ebx, eax
cmp edi, 8
jb 0x100be65a
lea ecx, [edi*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x100be650
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bedc9
push ecx
push esi
call fcn.1001f369
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 0x100be680
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 0x100be72a
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100be720
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bedd8
push edx
push ecx
call fcn.1001f369
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 0x100be773
mov eax, dword [0x102b34c0]
push str._error__palettes.ini_file_was_not_found__n
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
jmp 0x100bed71
call fcn.1001a2f0
mov ecx, eax
test ecx, ecx
je 0x100bedce
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 0x100be7d2
push 0x104
lea ecx, [ebp - 0x24c]
call fcn.1001d6a0
mov esi, dword [ebp - 0x24c]
push edi
push 0x104
push esi
push 0x10249ae0
push str.OnlinePalettes
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push dword [esi - 8]
push esi
call fcn.1002ec5f
add esp, 8
test eax, eax
js 0x100beded
cmp eax, dword [esi - 8]
jg 0x100beded
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call fcn.1002fa49
mov ecx, dword [ebp - 0x30c]
add esp, 4
test eax, eax
setne al
xor ebx, ebx
mov byte [ecx + 0x24], al
mov eax, dword [0x102ab138]
sub eax, dword [0x102ab134]
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x300], ebx
test eax, eax
jle 0x100bed55
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 0x100be8b0
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 0x100be880
add edi, 0xfffffffe
mov eax, 0x2d
mov word [edi], ax
jmp 0x100be8d0
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 0x100be8b0
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 0x100be90f
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.1008e5d0
mov edi, eax
mov eax, dword [edi + 0x14]
mov ebx, dword [edi + 0x10]
cmp eax, 0x10
jb 0x100be92b
add ebx, dword [edi]
jmp 0x100be932
add ebx, edi
cmp eax, 0x10
jb 0x100be934
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 0x100be9c0
push 0x104
lea ecx, [ebp - 0x24c]
call fcn.1001d6a0
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 0x10249c1c
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 0x100bea40
mov ecx, dword [ebp - 0x328]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100bea36
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bedc9
push edx
push ecx
call fcn.1001f369
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 0x100beaa1
mov ecx, dword [ebp - 0x344]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100bea97
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bedc9
push edx
push ecx
call fcn.1001f369
add esp, 8
push dword [esi - 8]
push esi
call fcn.1002ec5f
add esp, 8
test eax, eax
js 0x100beded
cmp eax, dword [esi - 8]
jg 0x100beded
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 0x100beded
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x100beafb
push ebx
lea ecx, [ebp - 0x24c]
call fcn.1001d6a0
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 0x100beb56
mov ebx, ecx
nop
cmp word [edx], 0x22
lea ecx, [edx + 2]
mov dword [ebp - 0x308], ecx
je 0x100beb4a
lea ebx, [eax + 2]
xor edi, edi
cmp eax, ebx
je 0x100beb44
cmp edi, 1
jae 0x100beb3e
mov cx, word [edx]
inc edi
mov word [eax], cx
add edx, 2
add eax, 2
cmp eax, ebx
jne 0x100beb28
mov ecx, dword [ebp - 0x308]
mov ebx, dword [ebp - 0x2f8]
mov edx, ecx
cmp ecx, ebx
jb 0x100beb10
mov ebx, dword [ebp - 0x2f4]
sub edx, eax
xor ecx, ecx
sar edx, 1
sub ebx, edx
mov word [eax], cx
js 0x100beded
cmp ebx, dword [esi - 8]
jg 0x100beded
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
cmp dword [esi - 0xc], eax
jl 0x100bec75
push 0x102492a0
push esi
call fcn.10021ebe
mov edi, eax
add esp, 8
test edi, edi
je 0x100bec75
sub edi, esi
sar edi, 1
js 0x100bec75
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100bebb0
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 0x100bedf7
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 0x100bec75
sub ecx, edx
sub ebx, edx
cmp dword [esi - 4], 1
mov dword [ebp - 0x308], ecx
jle 0x100bec20
push dword [esi - 0xc]
lea ecx, [ebp - 0x24c]
call fcn.1001d740
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 0x100bec5b
test ecx, ecx
je 0x100beddd
test eax, eax
je 0x100beddd
push edx
push eax
push ecx
call fcn.10022500
add esp, 0xc
test ebx, ebx
js 0x100beded
cmp ebx, dword [esi - 8]
jg 0x100beded
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.10022330
add esp, 0xc
lea eax, [ebp - 0x2ec]
lea ecx, [ebp - 0x2f0]
mov dword [ebp - 0x2f0], eax
push 3
push esi
call fcn.1001d530
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 0x100becd0
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 0x100becfd
push eax
call fcn.10028ae5
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 0x100be875
mov eax, dword [0x102ab138]
inc ebx
sub eax, dword [0x102ab134]
add dword [ebp - 0x304], 0xc
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x300], ebx
cmp ebx, eax
jl 0x100be860
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100bed71
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x250]
cmp edx, 8
jb 0x100bedad
mov ecx, dword [ebp - 0x264]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100beda3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bedd8
push edx
push ecx
call fcn.1001f369
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.1001ed23
mov esp, ebp
pop ebp
ret
call fcn.1002d924
push 0x80004005
call fcn.1001a1c0
call fcn.1002d924
call fcn.1002e1a1
mov dword [eax], 0x16
call fcn.1002d914
push 0x80070057
call fcn.1001a1c0
push 0x80070216
call fcn.1001a1c0
int3