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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c8352
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.100baba0
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 0x100bd430
sub ecx, edx
lea eax, [ebp - 0x248]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.1000e4e0
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.1001cbc0
add esp, 0x10
mov ebx, eax
cmp edi, 8
jb 0x100bd4aa
lea ecx, [edi*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x100bd4a0
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bdc19
push ecx
push esi
call fcn.1001eec9
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 0x100bd4d0
sub ecx, edx
lea eax, [ebp - 0x248]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.1000e4e0
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.1000e4e0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x100bd57a
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100bd570
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bdc28
push edx
push ecx
call fcn.1001eec9
add esp, 8
push 0xd
push str.palettes.ini
lea ecx, [ebp - 0x264]
call fcn.1000f1a0
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 0x100bd5c3
mov eax, dword [0x102b3490]
push str._error__palettes.ini_file_was_not_found__n
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
jmp 0x100bdbc1
call fcn.1001a3f0
mov ecx, eax
test ecx, ecx
je 0x100bdc1e
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 0x100bd622
push 0x104
lea ecx, [ebp - 0x24c]
call fcn.1001d7b0
mov esi, dword [ebp - 0x24c]
push edi
push 0x104
push esi
push 0x10248ee0
push str.OnlinePalettes
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push dword [esi - 8]
push esi
call fcn.1002e79f
add esp, 8
test eax, eax
js 0x100bdc3d
cmp eax, dword [esi - 8]
jg 0x100bdc3d
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call fcn.1002f589
mov ecx, dword [ebp - 0x30c]
add esp, 4
test eax, eax
setne al
xor ebx, ebx
mov byte [ecx + 0x24], al
mov eax, dword [0x102ab100]
sub eax, dword [0x102ab0fc]
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x300], ebx
test eax, eax
jle 0x100bdba5
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 0x100bd700
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 0x100bd6d0
add edi, 0xfffffffe
mov eax, 0x2d
mov word [edi], ax
jmp 0x100bd720
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 0x100bd700
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 0x100bd75f
sub eax, edi
lea ecx, [ebp - 0x344]
sar eax, 1
push eax
push edi
call fcn.1000e4e0
mov ecx, ebx
mov byte [ebp - 4], 4
call fcn.1008d6b0
mov edi, eax
mov eax, dword [edi + 0x14]
mov ebx, dword [edi + 0x10]
cmp eax, 0x10
jb 0x100bd77b
add ebx, dword [edi]
jmp 0x100bd782
add ebx, edi
cmp eax, 0x10
jb 0x100bd784
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.1000d0d0
push dword [ebp - 0x32c]
lea ecx, [ebp - 0x328]
push ebx
push edi
call fcn.1000d250
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 0x100bd810
push 0x104
lea ecx, [ebp - 0x24c]
call fcn.1001d7b0
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 0x1024901c
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 0x100bd890
mov ecx, dword [ebp - 0x328]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100bd886
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bdc19
push edx
push ecx
call fcn.1001eec9
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 0x100bd8f1
mov ecx, dword [ebp - 0x344]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100bd8e7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bdc19
push edx
push ecx
call fcn.1001eec9
add esp, 8
push dword [esi - 8]
push esi
call fcn.1002e79f
add esp, 8
test eax, eax
js 0x100bdc3d
cmp eax, dword [esi - 8]
jg 0x100bdc3d
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 0x100bdc3d
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x100bd94b
push ebx
lea ecx, [ebp - 0x24c]
call fcn.1001d7b0
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 0x100bd9a6
mov ebx, ecx
nop
cmp word [edx], 0x22
lea ecx, [edx + 2]
mov dword [ebp - 0x308], ecx
je 0x100bd99a
lea ebx, [eax + 2]
xor edi, edi
cmp eax, ebx
je 0x100bd994
cmp edi, 1
jae 0x100bd98e
mov cx, word [edx]
inc edi
mov word [eax], cx
add edx, 2
add eax, 2
cmp eax, ebx
jne 0x100bd978
mov ecx, dword [ebp - 0x308]
mov ebx, dword [ebp - 0x2f8]
mov edx, ecx
cmp ecx, ebx
jb 0x100bd960
mov ebx, dword [ebp - 0x2f4]
sub edx, eax
xor ecx, ecx
sar edx, 1
sub ebx, edx
mov word [eax], cx
js 0x100bdc3d
cmp ebx, dword [esi - 8]
jg 0x100bdc3d
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
cmp dword [esi - 0xc], eax
jl 0x100bdac5
push 0x102486a0
push esi
call fcn.100219fe
mov edi, eax
add esp, 8
test edi, edi
je 0x100bdac5
sub edi, esi
sar edi, 1
js 0x100bdac5
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100bda00
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 0x100bdc47
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 0x100bdac5
sub ecx, edx
sub ebx, edx
cmp dword [esi - 4], 1
mov dword [ebp - 0x308], ecx
jle 0x100bda70
push dword [esi - 0xc]
lea ecx, [ebp - 0x24c]
call fcn.1001d850
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 0x100bdaab
test ecx, ecx
je 0x100bdc2d
test eax, eax
je 0x100bdc2d
push edx
push eax
push ecx
call fcn.10022040
add esp, 0xc
test ebx, ebx
js 0x100bdc3d
cmp ebx, dword [esi - 8]
jg 0x100bdc3d
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.10021e70
add esp, 0xc
lea eax, [ebp - 0x2ec]
lea ecx, [ebp - 0x2f0]
mov dword [ebp - 0x2f0], eax
push 3
push esi
call fcn.1001d640
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 0x100bdb20
sub edx, ebx
push edx
push edi
call fcn.10007ee0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2ec]
mov eax, dword [ebp - 0x2f0]
cmp eax, ecx
je 0x100bdb4d
push eax
call fcn.10028625
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 0x100bd6c5
mov eax, dword [0x102ab100]
inc ebx
sub eax, dword [0x102ab0fc]
add dword [ebp - 0x304], 0xc
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x300], ebx
cmp ebx, eax
jl 0x100bd6b0
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100bdbc1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x250]
cmp edx, 8
jb 0x100bdbfd
mov ecx, dword [ebp - 0x264]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100bdbf3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100bdc28
push edx
push ecx
call fcn.1001eec9
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.1001e883
mov esp, ebp
pop ebp
ret
call fcn.1002d464
push 0x80004005
call fcn.1001a2c0
call fcn.1002d464
call fcn.1002dce1
mov dword [eax], 0x16
call fcn.1002d454
push 0x80070057
call fcn.1001a2c0
push 0x80070216
call fcn.1001a2c0
int3