Function at 0x4bf8b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x60
mov ecx, dword [0x5e687c]
mov eax, dword [ecx + 8]
mov dword [esp + 0x40], eax
lea edx, [eax + 1]
mov dword [ecx + 8], edx
mov ecx, dword [0x5e687c]
mov edx, dword [ecx + 0xc]
test edx, edx
je 0x4bf8f5
test eax, eax
jne 0x4bf8f5
push str.Enter
push str._rwPalQuantResolvePalette
push 0x322
push str.C:_daily_rwsdk_driver_common_palquant.c
push 4
call fcn.0047bec0
add esp, 0x14
push ebx
mov ebx, dword [esp + 0x6c]
push ebp
push esi
cmp ebx, 0x100
push edi
jle 0x4bf92a
push ebx
push str.256____d__maxcols
call fcn.0047c120
push eax
push str._rwPalQuantResolvePalette
push 0x327
push str.C:_daily_rwsdk_driver_common_palquant.c
push 3
call fcn.0047bec0
add esp, 0x1c
mov ebp, dword [esp + 0x74]
test ebp, ebp
jne 0x4bf950
push str.palette
push str._rwPalQuantResolvePalette
push 0x32c
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
cmp ebx, 0x100
jle 0x4bf976
push str.maxcols___256
push str._rwPalQuantResolvePalette
push 0x32d
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
mov edi, dword [esp + 0x7c]
test edi, edi
jne 0x4bf99c
push 0x5d1b2c
push str._rwPalQuantResolvePalette
push 0x32e
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
mov edx, dword [edi + 8]
push 5
push edx
mov dword [esp + 0x40], ebx
call fcn.004c1330
mov esi, eax
add esp, 8
cmp ebx, esi
jl 0x4bfa19
mov eax, dword [edi + 8]
push 5
push 0
push ebp
push eax
mov dword [esp + 0x48], esi
call fcn.004c1420
mov edi, eax
add esp, 0x10
cmp edi, esi
je 0x4bf9ed
push str.kk__numcols
push str._rwPalQuantResolvePalette
push 0x33f
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
cmp edi, ebx
jge 0x4c00d6
mov ecx, dword [esp + 0x78]
lea eax, [ebp + edi*4 + 2]
sub ecx, edi
mov byte [eax - 2], 0
mov byte [eax - 1], 0
mov byte [eax], 0
mov byte [eax + 1], 0
add eax, 4
dec ecx
jne 0x4bf9ff
jmp 0x4c00d6
mov ecx, dword [edi]
mov byte [ecx], 0
mov edx, dword [edi]
mov byte [edx + 1], 0
mov eax, dword [edi]
mov byte [eax + 2], 0
mov ecx, dword [edi]
mov al, 0x20
mov byte [ecx + 3], 0
mov edx, dword [edi]
mov byte [edx + 4], al
mov ecx, dword [edi]
mov byte [ecx + 5], al
mov edx, dword [edi]
mov byte [edx + 6], al
mov ecx, dword [edi]
mov byte [ecx + 7], al
mov edx, dword [edi]
mov eax, dword [edi + 8]
push edx
push eax
call fcn.004c0c00
mov ecx, dword [edi + 4]
mov esi, 1
add esp, 8
cmp ebx, esi
fstp dword [ecx]
mov dword [esp + 0x7c], esi
jle 0x4bfe32
jmp 0x4bfa71
mov esi, dword [esp + 0x7c]
fld dword [0x5b285c]
or ebx, 0xffffffff
xor ecx, ecx
test esi, esi
mov dword [esp + 0x1c], ebx
jle 0x4bfe30
mov edx, dword [edi + 4]
fcom dword [edx]
fnstsw ax
test ah, 5
jp 0x4bfa9a
fstp st(0)
fld dword [edx]
mov ebx, ecx
inc ecx
add edx, 4
cmp ecx, esi
jl 0x4bfa8b
cmp ebx, 0xffffffff
mov dword [esp + 0x1c], ebx
fstp st(0)
je 0x4bfe32
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi]
mov ebp, dword [edi + 8]
lea ebx, [edx*8]
lea esi, [ecx*8]
add ebx, eax
add esi, eax
mov eax, dword [0x5e687c]
mov ecx, dword [eax + 8]
mov dword [esp + 0x30], ecx
lea edx, [ecx + 1]
mov dword [eax + 8], edx
mov eax, dword [0x5e687c]
mov edx, dword [eax + 0xc]
test edx, edx
je 0x4bfb10
test ecx, ecx
jne 0x4bfb10
push str.Enter
push str.nCut
push 0x23d
push str.C:_daily_rwsdk_driver_common_palquant.c
push 4
call fcn.0047bec0
add esp, 0x14
test ebp, ebp
jne 0x4bfb32
push str.root
push str.nCut
push 0x23e
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
test esi, esi
jne 0x4bfb54
push str.set1
push str.nCut
push 0x23f
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
test ebx, ebx
jne 0x4bfb76
push str.set2
push str.nCut
push 0x240
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
push esi
lea ecx, [esp + 0x58]
push ebp
push ecx
call fcn.004c0600
lea edx, [esp + 0x60]
lea eax, [esp + 0x24]
push edx
push eax
push 1
push esi
push ebp
call fcn.004c0d50
fstp dword [esp + 0x4c]
lea ecx, [esp + 0x74]
lea edx, [esp + 0x34]
push ecx
push edx
push 2
push esi
push ebp
call fcn.004c0d50
fstp dword [esp + 0x5c]
lea eax, [esp + 0x88]
lea ecx, [esp + 0x68]
push eax
push ecx
push 3
push esi
push ebp
call fcn.004c0d50
fstp dword [esp + 0x6c]
add esp, 0x48
lea edx, [esp + 0x54]
lea eax, [esp + 0x20]
push edx
push eax
push 4
push esi
push ebp
call fcn.004c0d50
fld dword [esp + 0x40]
fcomp dword [0x5b285c]
add esp, 0x14
fnstsw ax
test ah, 0x41
jp 0x4bfcda
fld dword [esp + 0x28]
fcomp dword [0x5b285c]
fnstsw ax
test ah, 0x41
jp 0x4bfcda
fld dword [esp + 0x24]
fcomp dword [0x5b285c]
fnstsw ax
test ah, 0x41
jp 0x4bfcda
fcom dword [0x5b285c]
fnstsw ax
test ah, 0x41
jp 0x4bfcda
mov eax, dword [0x5e687c]
mov esi, dword [esp + 0x30]
fstp st(0)
mov ecx, dword [eax + 8]
dec ecx
mov dword [eax + 8], ecx
mov ecx, dword [0x5e687c]
cmp dword [ecx + 8], esi
je 0x4bfc7d
push 0x80000005
call fcn.0047c0a0
push eax
push str.nCut
push 0x24e
push str.C:_daily_rwsdk_driver_common_palquant.c
push 2
call fcn.0047bec0
mov edx, dword [0x5e687c]
add esp, 0x18
mov dword [edx + 8], esi
mov eax, dword [0x5e687c]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4bfcab
test esi, esi
jne 0x4bfcab
push str.Exit
push str.nCut
push 0x24e
push str.C:_daily_rwsdk_driver_common_palquant.c
push 4
call fcn.0047bec0
add esp, 0x14
mov eax, dword [esp + 0x7c]
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x7c], eax
mov esi, eax
mov dword [ecx + edx*4], 0
mov eax, dword [esp + 0x78]
inc esi
cmp esi, eax
mov dword [esp + 0x7c], esi
jl 0x4bfa6d
jmp 0x4bfe32
fld dword [esp + 0x2c]
fcomp dword [esp + 0x28]
mov ecx, dword [esi]
mov dword [ebx], ecx
mov edx, dword [esi + 4]
mov dword [ebx + 4], edx
fnstsw ax
and eax, 0x100
jne 0x4bfd20
fld dword [esp + 0x2c]
fcomp dword [esp + 0x24]
fnstsw ax
and eax, 0x100
jne 0x4bfd4c
fld dword [esp + 0x2c]
fcompp
fnstsw ax
and eax, 0x100
jne 0x4bfd67
mov al, byte [esp + 0x18]
mov byte [ebx], al
mov byte [esi + 4], al
jmp 0x4bfd71
fld dword [esp + 0x28]
fcomp dword [esp + 0x24]
fnstsw ax
and eax, 0x100
jne 0x4bfd4c
fld dword [esp + 0x28]
fcompp
fnstsw ax
and eax, 0x100
jne 0x4bfd67
mov al, byte [esp + 0x14]
mov byte [ebx + 1], al
mov byte [esi + 5], al
jmp 0x4bfd71
fld dword [esp + 0x24]
fcompp
fnstsw ax
and eax, 0x100
jne 0x4bfd67
mov al, byte [esp + 0x34]
mov byte [ebx + 2], al
mov byte [esi + 6], al
jmp 0x4bfd71
mov al, byte [esp + 0x20]
mov byte [ebx + 3], al
mov byte [esi + 7], al
mov eax, dword [0x5e687c]
mov esi, dword [esp + 0x30]
mov edx, dword [eax + 8]
dec edx
mov dword [eax + 8], edx
mov eax, dword [0x5e687c]
cmp dword [eax + 8], esi
je 0x4bfdb8
push 0x80000005
call fcn.0047c0a0
push eax
push str.nCut
push 0x283
push str.C:_daily_rwsdk_driver_common_palquant.c
push 2
call fcn.0047bec0
mov ecx, dword [0x5e687c]
add esp, 0x18
mov dword [ecx + 8], esi
mov edx, dword [0x5e687c]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4bfde7
test esi, esi
jne 0x4bfde7
push str.Exit
push str.nCut
push 0x283
push str.C:_daily_rwsdk_driver_common_palquant.c
push 4
call fcn.0047bec0
add esp, 0x14
mov esi, dword [esp + 0x1c]
mov ecx, dword [edi]
mov edx, dword [edi + 8]
lea eax, [esi*8]
add ecx, eax
push ecx
push edx
call fcn.004c0c00
mov eax, dword [edi + 4]
fstp dword [eax + esi*4]
mov esi, dword [esp + 0x84]
mov ecx, dword [edi]
mov edx, dword [edi + 8]
lea eax, [esi*8]
add ecx, eax
push ecx
push edx
call fcn.004c0c00
mov eax, dword [edi + 4]
add esp, 0x10
fstp dword [eax + esi*4]
jmp 0x4bfcc4
fstp st(0)
mov eax, dword [esp + 0x78]
mov dword [esp + 0x2c], 0
test eax, eax
jle 0x4c00d6
mov eax, dword [esp + 0x74]
add eax, 2
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x78]
cmp eax, ecx
jge 0x4c00a5
mov esi, dword [edi]
mov ebp, dword [edi + 8]
shl eax, 3
add esi, eax
mov eax, dword [0x5e687c]
mov ebx, dword [eax + 8]
lea ecx, [ebx + 1]
mov dword [eax + 8], ecx
mov edx, dword [0x5e687c]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4bfea8
test ebx, ebx
jne 0x4bfea8
push str.Enter
push str.nAssign
push 0x12c
push str.C:_daily_rwsdk_driver_common_palquant.c
push 4
call fcn.0047bec0
add esp, 0x14
test ebp, ebp
jne 0x4bfeca
push str.root
push str.nAssign
push 0x12d
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
test esi, esi
jne 0x4bfeec
push str.cube
push str.nAssign
push 0x12e
push str.C:_daily_rwsdk_driver_common_palquant.c
push 1
call fcn.0047bec0
add esp, 0x14
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
push eax
push esi
push 5
push ecx
push ebp
mov byte [esp + 0x44], 0
mov byte [esp + 0x45], 0
mov byte [esp + 0x46], 0
mov byte [esp + 0x47], 0
call fcn.004c0160
mov eax, dword [0x5e687c]
add esp, 0x14
mov ecx, dword [eax + 8]
dec ecx
mov dword [eax + 8], ecx
mov edx, dword [0x5e687c]
cmp dword [edx + 8], ebx
je 0x4bff59
push 0x80000005
call fcn.0047c0a0
push eax
push str.nAssign
push 0x135
push str.C:_daily_rwsdk_driver_common_palquant.c
push 2
call fcn.0047bec0
mov eax, dword [0x5e687c]
add esp, 0x18
mov dword [eax + 8], ebx
mov ecx, dword [0x5e687c]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x4bff88
test ebx, ebx
jne 0x4bff88
push str.Exit
push str.nAssign
push 0x135
push str.C:_daily_rwsdk_driver_common_palquant.c
push 4
call fcn.0047bec0
add esp, 0x14
mov eax, dword [esp + 0x2c]
mov edx, dword [edi]
mov ecx, dword [edi + 8]
shl eax, 3
add edx, eax
push edx
lea edx, [esp + 0x58]
push ecx
push edx
call fcn.004c0600
fld dword [esp + 0x60]
fcomp dword [0x5b285c]
add esp, 0xc
fnstsw ax
and eax, 0x4100
jne 0x4bffc8
fld dword [0x5bc870]
fdiv dword [esp + 0x54]
fstp dword [esp + 0x28]
jmp 0x4bffd0
mov dword [esp + 0x28], 0
fld dword [esp + 0x58]
fmul dword [esp + 0x28]
fstp dword [esp + 0x3c]
fnstcw word [esp + 0x7c]
fld dword [esp + 0x3c]
mov ax, word [esp + 0x7c]
or ah, 0xc
mov word [esp + 0x74], ax
fldcw word [esp + 0x74]
fistp dword [esp + 0x40]
fldcw word [esp + 0x7c]
fld dword [esp + 0x5c]
fmul dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
mov al, byte [esp + 0x40]
mov byte [ecx - 2], al
fstp dword [esp + 0x3c]
fnstcw word [esp + 0x14]
fld dword [esp + 0x3c]
mov ax, word [esp + 0x14]
or ah, 0xc
mov word [esp + 0x12], ax
fldcw word [esp + 0x12]
fistp dword [esp + 0x44]
fldcw word [esp + 0x14]
fld dword [esp + 0x60]
fmul dword [esp + 0x28]
mov dl, byte [esp + 0x44]
mov byte [ecx - 1], dl
fstp dword [esp + 0x3c]
fnstcw word [esp + 0x1c]
fld dword [esp + 0x3c]
mov ax, word [esp + 0x1c]
or ah, 0xc
mov word [esp + 0x18], ax
fldcw word [esp + 0x18]
fistp dword [esp + 0x48]
fldcw word [esp + 0x1c]
fld dword [esp + 0x64]
fmul dword [esp + 0x28]
mov al, byte [esp + 0x48]
mov byte [ecx], al
fstp dword [esp + 0x3c]
fnstcw word [esp + 0x24]
fld dword [esp + 0x3c]
mov ax, word [esp + 0x24]
or ah, 0xc
mov word [esp + 0x20], ax
fldcw word [esp + 0x20]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x24]
mov dl, byte [esp + 0x4c]
mov byte [ecx + 1], dl
jmp 0x4c00ba
mov eax, dword [esp + 0x34]
mov ecx, eax
mov byte [eax - 2], 0
mov byte [eax - 1], 0
mov byte [eax], 0
mov byte [eax + 1], 0
mov eax, dword [esp + 0x2c]
add ecx, 4
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x78]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x4bfe51
mov eax, dword [0x5e687c]
mov esi, dword [esp + 0x50]
mov edx, dword [eax + 8]
dec edx
mov dword [eax + 8], edx
mov eax, dword [0x5e687c]
cmp dword [eax + 8], esi
je 0x4c011d
push 0x80000005
call fcn.0047c0a0
push eax
push str._rwPalQuantResolvePalette
push 0x38f
push str.C:_daily_rwsdk_driver_common_palquant.c
push 2
call fcn.0047bec0
mov ecx, dword [0x5e687c]
add esp, 0x18
mov dword [ecx + 8], esi
mov edx, dword [0x5e687c]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4c014c
test esi, esi
jne 0x4c014c
push str.Exit
push str._rwPalQuantResolvePalette
push 0x38f
push str.C:_daily_rwsdk_driver_common_palquant.c
push 4
call fcn.0047bec0
add esp, 0x14
mov eax, dword [esp + 0x38]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret